Issue 92504 - Crash reporter fails trying to recover after a crash in BASIC/Spreadsheet
Summary: Crash reporter fails trying to recover after a crash in BASIC/Spreadsheet
Status: CLOSED DUPLICATE of issue 92477
Alias: None
Product: Calc
Classification: Application
Component: code (show other issues)
Version: DEV300m29
Hardware: All All
: P2 Trivial (vote)
Target Milestone: ---
Assignee: niklas.nebel
QA Contact: issues@sc
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-08-06 08:06 UTC by joerg.skottke
Modified: 2013-08-07 15:14 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Latest Confirmation in: ---
Developer Difficulty: ---


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description joerg.skottke 2008-08-06 08:06:55 UTC
This problem was found as a sideeffect of issue 92477 where a macro moves a
sheet to an invalid index. The application then crashes and the document
recovery fails.

Reproduction:
- Open a new spreadsheet
- Go to Tools/Macros/BASIC Organizer
- Create a new macro below My Macros with following content:

sub crashme
    ThisComponent.getSheets().moveByName( "Sheet1", 20 )
end sub

Note: The sheet must exist by that exact name (in german "Tabelle1"), the index
(20) must be well out of range

- Close the BASIC IDE
- From the spreadsheet run the macro (Tools/Macro/Run Macro...)

The result:
- Either autosaving the document hangs or we get a recovery loop.
Comment 1 joerg.skottke 2008-08-06 08:08:07 UTC
Setting target 3.0, i guess the crash recovery should work under any condition. 
Comment 2 hennes.rohling 2008-08-06 10:46:52 UTC
This is not crash reporting (it works and has already generated crash data which
is available at nhext start).

Autosaving does not work because the crash destroyed some global data used by
calc when saving. Autosave on crash may hang if some globally used data was
corrupted by the crash.

Anyhow the loop during autosave is in calc here:

xo680mi!UniRefBase::release+0x1 [o:\oog680\src\xmloff\source\style\uniref.cxx @ 48]
sc680mi!ScXMLExport::_ExportAutoStyles+0x990
[o:\oog680\src\sc\source\filter\xml\xmlexprt.cxx @ 2027]
xo680mi!SvXMLExport::ImplExportAutoStyles+0x1a6
[o:\oog680\src\xmloff\source\core\xmlexp.cxx @ 1154]
xo680mi!SvXMLExport::exportDoc+0x597
[o:\oog680\src\xmloff\source\core\xmlexp.cxx @ 1407]
sc680mi!ScXMLExport::exportDoc+0xa5
[o:\oog680\src\sc\source\filter\xml\xmlexprt.cxx @ 3671]
xo680mi!SvXMLExport::filter+0xa6 [o:\oog680\src\xmloff\source\core\xmlexp.cxx @ 903]
sc680mi!ScXMLExport::filter+0x3a
[o:\oog680\src\sc\source\filter\xml\xmlexprt.cxx @ 3698]
sc680mi!ScXMLImportWrapper::ExportToComponent+0x2f9
[o:\oog680\src\sc\source\filter\xml\xmlwrap.cxx @ 758]
sc680mi!ScXMLImportWrapper::Export+0xa68
[o:\oog680\src\sc\source\filter\xml\xmlwrap.cxx @ 942]
sc680mi!ScDocShell::SaveXML+0x37 [o:\oog680\src\sc\source\ui\docshell\docsh.cxx
@ 676]
sc680mi!ScDocShell::SaveAs+0x82 [o:\oog680\src\sc\source\ui\docshell\docsh.cxx @
1302]
sfx680mi!SfxObjectShell::SaveAsOwnFormat+0x75
[o:\oog680\src\sfx2\source\doc\objstor.cxx @ 2964]
sfx680mi!SfxObjectShell::SaveTo_Impl+0x6e0
[o:\oog680\src\sfx2\source\doc\objstor.cxx @ 1397]
sfx680mi!SfxObjectShell::PreDoSaveAs_Impl+0x1e1
[o:\oog680\src\sfx2\source\doc\objstor.cxx @ 2667]
sfx680mi!SfxObjectShell::CommonSaveAs_Impl+0x41c
[o:\oog680\src\sfx2\source\doc\objstor.cxx @ 2538]
sfx680mi!SfxObjectShell::APISaveAs_Impl+0x234
[o:\oog680\src\sfx2\source\doc\objserv.cxx @ 438]
sfx680mi!SfxBaseModel::impl_store+0x1d9
[o:\oog680\src\sfx2\source\doc\sfxbasemodel.cxx @ 2583]
sfx680mi!SfxBaseModel::storeToURL+0x9b
[o:\oog680\src\sfx2\source\doc\sfxbasemodel.cxx @ 1607]
fwk680mi!framework::AutoRecovery::implts_saveOneDoc+0x191
[o:\oog680\src\framework\source\services\autorecovery.cxx @ 2422]
fwk680mi!framework::AutoRecovery::implts_saveDocs+0x2b9
[o:\oog680\src\framework\source\services\autorecovery.cxx @ 2338]
Comment 3 joerg.skottke 2008-08-06 14:22:33 UTC
Moving forward to 3.0.1
Comment 4 niklas.nebel 2008-10-15 12:25:26 UTC
It's not global data, but the document itself that was left in a bad state by
issue 92477. Recovery failed because trying to save the file crashed again.
So there is only 92477 to be fixed.

*** This issue has been marked as a duplicate of 92477 ***
Comment 5 niklas.nebel 2008-10-15 12:25:52 UTC
closing duplicate