Bug 108189 - inspection of object hangs LO - memory leak
Summary: inspection of object hangs LO - memory leak
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: BASIC (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: haveBacktrace
Depends on:
Blocks: Memory BASIC-IDE
  Show dependency treegraph
 
Reported: 2017-05-28 08:30 UTC by Oliver Brinzing
Modified: 2022-04-26 17:41 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments
inspection of object crashes LO - memory leak (237.03 KB, image/jpeg)
2017-06-02 16:08 UTC, Oliver Brinzing
Details
3 backtraces between set watchpoint and freeze on subelement of oCursor (54.36 KB, text/plain)
2020-04-19 15:02 UTC, b.
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Oliver Brinzing 2017-05-28 08:30:05 UTC
steps to reproduce:

- open new spreadsheet document
- insert macro
- set breakpoint
- try to inspect variable "oCursor"

-> LO will use all memory until operating system freezes


REM  *****  BASIC  *****
OPTION EXPLICIT
Sub Main
	Dim oSheet as Object
	Dim oCursor as Object

	oSheet = ThisComponent.getSheets().getByIndex(0)
	oCursor = oSheet.createCursor()
	Wait(50)
	MsgBox "Set a BreakPoint at MsgBox, Enter >oCursor< into the watch field"
              & Chr(13) & "Try to open the [+] oCursor" 
End Sub
Comment 1 Xisco Faulí 2017-05-31 22:00:10 UTC
I can't reproduce it in

Version: 5.5.0.0.alpha0+
Build ID: 36b1e6270bf2fbb333e2a69c4bb5931eba418289
CPU threads: 1; OS: Windows 6.1; UI render: default; 
TinderBox: Win-x86@62-TDF, Branch:MASTER, Time: 2017-05-29_14:06:19
Locale: es-ES (es_ES); Calc: group

Could you please try to reproduce it with the latest version of LibreOffice from https://www.libreoffice.org/download/libreoffice-fresh/ ?
I have set the bug's status to 'NEEDINFO'. Please change it back to 'UNCONFIRMED' if the bug is still present in the latest version.
Comment 2 Oliver Brinzing 2017-06-02 16:08:34 UTC
Created attachment 133812 [details]
inspection of object crashes LO - memory leak

reprocucible with

Version: 5.5.0.0.alpha0+
Build ID: 2b916da6cdcf3f7abe7e10f83321576ae2695954
CPU threads: 4; OS: Windows 6.19; UI render: default; 
Locale: de-DE (de_DE); Calc: group
Comment 3 Xisco Faulí 2017-11-13 17:47:30 UTC
I can reproduce it in

Version: 6.0.0.0.alpha1+
Build ID: a7f961ddd88df4117de5f7c199881cf75d2905b5
CPU threads: 4; OS: Linux 4.10; UI render: default; VCL: gtk3; 
Locale: ca-ES (ca_ES.UTF-8); Calc: group

Steps to reproduce:
1. Create new calc document
2. Tools - Macros - Edit macros
3. Paste the macro from the description
4. Set the breakpoint in line 10
5. Compile
6. Once the brekpoint is hit, select oCursor in line 8 and press F7
7. In the Variable box, click on the arrow next to oCursor
-> LibreOffice hangs
Comment 4 Buovjaga 2017-11-13 18:32:37 UTC Comment hidden (obsolete)
Comment 5 Xisco Faulí 2017-11-13 18:37:33 UTC
(In reply to Buovjaga from comment #4)
> It says
> BASIC syntax error.
> Unexpected symbol: &.
> 
> for the first & on line 11. So I can't test.
> 
> Arch Linux 64-bit, KDE Plasma 5
> Version: 6.0.0.0.alpha1+
> Build ID: d73225119476de1826f648acca9e93bf6797e813
> CPU threads: 8; OS: Linux 4.13; UI render: default; VCL: kde4; 
> Locale: fi-FI (fi_FI.UTF-8); Calc: group
> Built on November 12th 2017

Line 10 and 11 should be the same, however, bugzilla cuts them in 2
Comment 6 Buovjaga 2017-11-13 19:19:20 UTC
Ok.. Unfortunately gdb did not give me a trace.
Comment 7 Noel Grandin 2018-03-27 15:25:17 UTC
This is trying to generate a string to represent the DataArray of the cursor, down in 
    ScCellRangeObj::getDataArray

Unfortunately, (given the input file), this is an array of the entire spreadsheet.

Also unfortunately, we are using UNO introspection APIs here, and there is no way to say "we only first a representative sample of the data here, not the whole thing", which is what most debuggers do.

Probably the easiest fix is to teach basic in
   SbUnoObject::Notify
to use some some kind of special case handling for property calls which can generate such large chunks of data.
Comment 8 Oliver Brinzing 2019-08-25 17:09:55 UTC
still reproducible with:

Version: 6.2.6.2 (x64)
Build-ID: 684e730861356e74889dfe6dbddd3562aae2e6ad
CPU-Threads: 4; BS: Windows 10.0; UI-Render: Standard; VCL: win; 
Gebietsschema: de-DE (de_DE); UI-Sprache: de-DE
Calc:
Comment 9 Oliver Brinzing 2020-03-01 07:21:17 UTC
repro with:

Version: 7.0.0.0.alpha0+ (x64)
Build ID: f2db813374b8d65e1edec1387fa0c534b40885e1
CPU threads: 4; OS: Windows 10.0 Build 18363; UI render: default; VCL: win; 
Locale: de-DE (de_DE); UI-Language: en-US
Calc: threaded
Comment 10 b. 2020-04-19 15:02:51 UTC
Created attachment 159717 [details]
3 backtraces between set watchpoint and freeze on subelement of oCursor

-> keyword: wantbackrace ... 

are such things of any help? 

7.0 dev ver. from last week
Comment 11 QA Administrators 2022-04-26 03:41:04 UTC Comment hidden (obsolete)
Comment 12 Oliver Brinzing 2022-04-26 17:41:15 UTC
repro with:
Version: 7.3.2.2 (x64) / LibreOffice Community
Build ID: 49f2b1bff42cfccbd8f788c8dc32c1c309559be0
CPU threads: 4; OS: Windows 10.0 Build 19044; UI render: Skia/Raster; VCL: win
Locale: de-DE (de_DE); UI: de-DE
Calc: threaded