Bug 74696 - BASIC: Crash after adding second instance of nested grouped objects after deleting in CALC
Summary: BASIC: Crash after adding second instance of nested grouped objects after del...
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: BASIC (show other bugs)
(earliest affected) release
Hardware: All Windows (All)
: low major
Assignee: Not Assigned
Whiteboard: BSA
Depends on:
Reported: 2014-02-07 20:28 UTC by cmoller
Modified: 2015-10-17 13:48 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:

Test Kit including code which crashes (138.82 KB, application/vnd.oasis.opendocument.spreadsheet)
2014-02-07 20:28 UTC, cmoller

Note You need to log in before you can comment on or make changes to this bug.
Description cmoller 2014-02-07 20:28:20 UTC
Created attachment 93632 [details]
Test Kit including code which crashes

Problem description: 
After creating a nested grouped object in CALC using BASIC, you can delete the object using the DrawPage.remove(group) function. When you go an re-create the objects the second time after removing them, the first object in the next group will be created, but the second object will cause LO to crash and hang indefinitely when trying to add the object to the drawpage.

The code works perfectly in OpenOffice.org 3.2.1.

Steps to reproduce:
1. Open Test Kit, test1.ods
2. Press "Create Tested Grouped Objects and CRASH" button (one ore more times)
3. Press "Delete All Grouped Objects"
4. Press "Create Tested Grouped Objects and CRASH" button
- this will cause LO to hang at the code: on line 142 (last code)

Private function fnCreateGroupedObjects(oPage as Object, aNewPos As com.sun.star.awt.Point) As Object

  Dim oSquare1 As Object
  Dim oSquare2 As Object
  oSquare1 = createSquare(1000,1000,3000)
  oSquare1.FillColor = RGB(255,128,128) ' light red
  oSquare2 = createSquare(1000, 7000, 3000)
  oSquare2.FillColor = RGB(255,64,64) ' darker red 
  oPage.add(oSquare2) '<CRASH HERE second time through Line 142

Current behavior:
Crashes. Code makes it through the first instance of oSquare1 and adds to the page using oPage.add(), then when it gets to the next instance, it crashes.
One can manually select and delete the nested objects without this behaviour occurring (you can re-create)

Expected behavior:
Should create without an problem. 

One probably could create some cleaner code to isolate the problem. However, I'm not an expert at coding...

Operating System: Windows 7
Version: release
Comment 1 Owen Genat (retired) 2014-02-08 11:20:57 UTC
Thanks for the simple test case. I have downloaded and tested the attachment under these setups:

- Debian 7.3.0 x86_64 running v4.1.4.2 Build ID: 0a0440ccc0227ad9829de5f46be37cfb6edcf72
- Crunchbang 11 x86_64 running v4.2.0.4 Build ID: 05dceb5d363845f2cf968344d7adab8dcfb2ba71

In both cases I can press the buttons any repeated number of times, in any order, without a crash. It would appear to be a Windows-specific issue.
Comment 2 cmoller 2014-02-10 20:15:58 UTC
I can confirm the same behaviour on the same system in 32-bit XP-Mode without any extensions installed. 
The issue does not seem to occur on my colleagues computer with LO version 4.0.2.
Comment 3 Joel Madero 2014-06-18 19:39:50 UTC

Windows 8
LibreOffice rc

Major - crash
Low - corner case that is very unlikely to affect many users

CC - Noel - thoughts on this one?

@cmoller - is this a regression that you know of?
Comment 4 QA Administrators 2015-07-18 17:43:22 UTC
** Please read this message in its entirety before responding **

To make sure we're focusing on the bugs that affect our users today, LibreOffice QA is asking bug reporters and confirmers to retest open, confirmed bugs which have not been touched for over a year.

There have been thousands of bug fixes and commits since anyone checked on this bug report. During that time, it's possible that the bug has been fixed, or the details of the problem have changed. We'd really appreciate your help in getting confirmation that the bug is still present.

If you have time, please do the following:

Test to see if the bug is still present on a currently supported version of LibreOffice (4.4.1 or later): https://www.libreoffice.org/download/

If the bug is present, please leave a comment that includes the version of LibreOffice and your operating system, and any changes you see in the bug behavior
If the bug is NOT present, please set the bug's Status field to RESOLVED-WORKSFORME and leave a short comment that includes your version of LibreOffice and Operating System

Please DO NOT

Update the version field
Reply via email (please reply directly on the bug tracker)
Set the bug's Status field to RESOLVED - FIXED (this status has a particular meaning that is not appropriate in this case)

If you want to do more to help you can test to see if your issue is a REGRESSION. To do so: 1. Download and install oldest version of LibreOffice (usually 3.3 unless your bug pertains to a feature added after 3.3)


2. Test your bug 3. Leave a comment with your results. 4a. If the bug was present with 3.3 - set version to "inherited from OOo"; 4b. If the bug was not present in 3.3 - add "regression" to keyword

Feel free to come ask questions or to say hello in our QA chat: http://webchat.freenode.net/?channels=libreoffice-qa

Thank you for your help!

-- The LibreOffice QA Team This NEW Message was generated on: 2015-07-18
Comment 5 Buovjaga 2015-10-17 13:48:15 UTC
Not a problem anymore. WFM.

Win 7 Pro 64-bit Version:
Build ID: 186f32f63434e16ff5776251657f902d5808ed3d
TinderBox: Win-x86@39, Branch:master, Time: 2015-10-16_09:42:47
Locale: en-US (fi_FI)