Bug 50632 - VIEWING: IDE Crash because Object Catalog not updated when closing a document
Summary: VIEWING: IDE Crash because Object Catalog not updated when closing a document
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: UI (show other bugs)
Version:
(earliest affected)
Master old -3.6
Hardware: Other All
: high critical
Assignee: Uray M. János
URL:
Whiteboard: BSA target:3.7.0 target:3.6.1
Keywords:
Depends on:
Blocks:
 
Reported: 2012-06-03 03:59 UTC by pierre-yves samyn
Modified: 2012-08-25 15:14 UTC (History)
0 users

See Also:
Crash report or crash signature:


Attachments
Screenshot after step 5 (10.97 KB, image/png)
2012-06-03 03:59 UTC, pierre-yves samyn
Details
Screenshot after step 6 (6.02 KB, image/png)
2012-06-30 21:59 UTC, pierre-yves samyn
Details
Spreadsheet with 2 macros (8.26 KB, application/vnd.oasis.opendocument.spreadsheet)
2012-06-30 22:00 UTC, pierre-yves samyn
Details
[PATCH] (3.39 KB, patch)
2012-07-25 05:30 UTC, Uray M. János
Details

Note You need to log in before you can comment on or make changes to this bug.
Description pierre-yves samyn 2012-06-03 03:59:40 UTC
Created attachment 62444 [details]
Screenshot after step 5

Hello

Steps to reproduce:
1. Start LibO
2. File> New> Text document (document's type doesn't matter)
3. Tools> Macros> Organize Macros> LODev Basic> My Macros> Standard> Edit 

Expected & Actual results : IDE opens, 3 items in the object catalog (My macros, LODev Macros, Untitled1)

4. Windows> Untitled (untitled document to front)
5. File> Close (close untitled document & return to IDE)

Expected result : object catalog updated, only 2 items (My macros, LODev Macros)

Actual result : object catalog not updated, still 3 items  (My macros, LODev Macros, Untitled1)

See screenshot after step 5

Platform : 
version 3.6.0alpha0+ (Build ID: b5f066)              
Browser: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/536.5 (KHTML, like Gecko) Chrome/19.0.1084.52 Safari/536.5

Regards
Pierre-Yves
Comment 1 pierre-yves samyn 2012-06-29 09:35:40 UTC
Hello

Still occurs with Windows 7 64bits & Version 3.6.0.0.beta2 (Build ID: f010139)

Regards
Pierre-Yves
Comment 2 pierre-yves samyn 2012-06-30 21:58:48 UTC
(In reply to comment #1)

> Still occurs with Windows 7 64bits & Version 3.6.0.0.beta2 (Build ID: f010139)

The non-updating catalog causes a crash in the following case:

1. Open the attached spreadsheet (BugCatalogObject.ods)
2. Tools> Macros> Organize Macros> LODev Basic> BugCatalogObject> Standard> Module1> Main1> Edit 

Expected & Actual results : IDE opens, 3 items in the object catalog (My macros, LODev Macros, BugCatalogObject)

3. In the left panel (catalog) unfold BugCatalogObject> Standard> Module1, then double-click Main2
4. Windows> BugCatalogObject.ods (spreadsheet document to front)
5. File> Close (close BugCatalogObject & return to IDE)

Expected result : object catalog updated, only 2 items (My macros, LODev
Macros)

Actual result Regression : object catalog not updated, still 3 items  (My macros, LODev Macros, BugCatalogObject)

This is the Issue described above, now the crash :

6. In the left panel (catalog) double-click on BugCatalogObject> Standard> Module1> Main1

Note: this should not be possible if the catalog was updated

Actual result : Crash (see Screenshot after step 6)

Regards
Pierre-Yves
Comment 3 pierre-yves samyn 2012-06-30 21:59:28 UTC
Created attachment 63655 [details]
Screenshot after step 6
Comment 4 pierre-yves samyn 2012-06-30 22:00:49 UTC
Created attachment 63656 [details]
Spreadsheet with 2 macros
Comment 5 pierre-yves samyn 2012-07-07 10:36:15 UTC
Still occurs with Windows 7 64bits & Version 3.6.0.0.beta3 (Build ID: 3e2b862)
Comment 6 pierre-yves samyn 2012-07-17 17:15:01 UTC
Still occurs with Windows 7 64bits & Version 3.6.0.1 (Build ID: 73f9fb6)
Comment 7 Uray M. János 2012-07-25 05:30:39 UTC
Created attachment 64643 [details]
[PATCH]

The Object Catalog was not updated, because at the point when onDocumentClosed() event was generated in BasicTreeListBox, the to-be-closed document is still alive, so UpdateEntries() doesn't remove the entry. I removed this entry manually in onDocumentClosed().

Uray M. János
Comment 8 Not Assigned 2012-07-26 09:19:35 UTC
Uray M. Janos committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=bb66a2c3ee9807e79ba437c770559787abe61b9b

fdo#50632 IDE: update Object Catalog when closing a document
Comment 9 Not Assigned 2012-08-10 19:55:11 UTC
Uray M. Janos committed a patch related to this issue.
It has been pushed to "libreoffice-3-6":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=3784488acbe16c4581e164e3c9a0af9ad57c1cef&g=libreoffice-3-6

fdo#50632 IDE: update Object Catalog when closing a document


It will be available in LibreOffice 3.6.1.
Comment 10 pierre-yves samyn 2012-08-25 15:14:52 UTC
Hello

WORKSFORME with Version 3.6.1.2 (Build ID: e29a214) & windows 7 64bits

Regards
Pierre-Yves