Bug 156186 - EDITING ReportBuilder: LO hangs when trying to create a function field in a group named with underscore (like "this_group")
Summary: EDITING ReportBuilder: LO hangs when trying to create a function field in a g...
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Base (show other bugs)
Version:
(earliest affected)
6.1.0.3 release
Hardware: All All
: medium normal
Assignee: Not Assigned
URL: https://ask.libreoffice.org/t/lo-7-5-...
Whiteboard:
Keywords: haveBacktrace, perf
Depends on:
Blocks: Database-Reports-Builder Performance
  Show dependency treegraph
 
Reported: 2023-07-07 09:21 UTC by TISSENDIER Pierre
Modified: 2024-02-01 10:39 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments
Open the report for editing. Try to create accumulation for field [ecrdebit] in group footer. (11.61 KB, application/vnd.oasis.opendocument.database)
2023-07-07 10:33 UTC, Robert Großkopf
Details
My base test : test accumulate on field "debit" (17.95 KB, application/vnd.oasis.opendocument.database)
2023-07-07 17:04 UTC, TISSENDIER Pierre
Details
Report will work without problem when group isn't underscored. (11.46 KB, application/vnd.oasis.opendocument.database)
2023-07-09 05:57 UTC, Robert Großkopf
Details
LLDB backtrace on macOS Arm (160.60 KB, text/plain)
2023-07-10 08:38 UTC, Alex Thurgood
Details

Note You need to log in before you can comment on or make changes to this bug.
Description TISSENDIER Pierre 2023-07-07 09:21:40 UTC
Version: 7.5.3.2 (X86_64) / LibreOffice Community
Build ID: 9f56dff12ba03b9acd7730a5a481eea045e468f3
CPU threads: 4; OS: Linux 5.19; UI render: default; VCL: gtk3
Locale: fr-FR (fr_FR.UTF-8); UI: fr-FR
Calc: threaded

Hello,
Libreoffice fail when i want create a function (accumulation, minimum,maximum) field in ReportBuilder.
This problem not appear in precedent version.

Have you an idea ?
Thanks
Comment 1 Robert Großkopf 2023-07-07 09:44:51 UTC
Could you please attach an example with a report, which calculates right in earlier versions?
Comment 2 Robert Großkopf 2023-07-07 10:33:02 UTC
Created attachment 188242 [details]
Open the report for editing. Try to create accumulation for field [ecrdebit] in group footer.

Have found the example here:
https://ask.libreoffice.org/t/lo-7-5-3-2-reports-impossible-de-creer-un-champ-fonction-accumulation/93352

Could confirm LO hangs when trying to create a function in Report Builder.

Note: 
LO will hang, no respond when trying to create the function. Has nothing to do with footer of the group.
Function will be created if there has been added an alias to the field in the query.
Comment 3 Robert Großkopf 2023-07-07 10:35:02 UTC
This bug appears in LO 7.5.5.1 and also in older versions. Could test it with different versions of LO 7, also could reproduce it with LO 6.4.7.2 on OpenSUSE 15.4 64bit rpm Linux.
Comment 4 TISSENDIER Pierre 2023-07-07 17:04:46 UTC
Created attachment 188254 [details]
My base test : test accumulate on field "debit"
Comment 5 TISSENDIER Pierre 2023-07-07 17:10:25 UTC
I have tested in
7.3.7.2 (ubuntu package)
7.4.0.3
7.4.4.2
7.4.7.2
7.5.0.3
All are wrong, LO failed

Before all test i "sudo apt remove libreoffice*"
Comment 6 TISSENDIER Pierre 2023-07-07 17:27:00 UTC
Excuse me I found ...;
In reality with or without alias the problem is "solved" at my place, but it is necessary to wait between 2 and 3 minutes that the creation is made by responding to wait for each message from Cratch!

Problem of memory.... ?
Comment 7 TISSENDIER Pierre 2023-07-08 08:27:07 UTC
Is really a big bug
Please give hight priority
Thanks
Comment 8 TISSENDIER Pierre 2023-07-08 17:16:48 UTC
In Page Header, Report Header, Page Footer, Report Footer NO PROBLEM !

In Group Header and Group Footer even creation, modification, moving a field cause problem!
Comment 9 TISSENDIER Pierre 2023-07-08 19:12:17 UTC
I have found !  I think

The base field name (grouping)having a underscore (evt_Libel)!

If i rename without underscore the problem disepears !

Yessss !

Perhaps a incompatibility whith Wayland ?  I read somewhere that Libreoffice and Wayland are problems.

Thanks for your read
Comment 10 Robert Großkopf 2023-07-09 05:54:29 UTC
Hi Pierre,

but is really a bug. Now a developer could look why Report Builder gets confused by a undersored name.
Comment 11 Robert Großkopf 2023-07-09 05:57:26 UTC
Created attachment 188270 [details]
Report will work without problem when group isn't underscored.

Open the report of this example.
Group isn't underscored.
You could create an accumulation without any problem here.
Comment 12 Stéphane Guillou (stragu) 2023-07-09 15:40:31 UTC
Could also reproduce in:

Version: 6.1.0.3
Build ID: efb621ed25068d70781dc026f7e9c5187a4decd1
CPU threads: 8; OS: Linux 5.15; UI render: default; VCL: gtk2; 
Locale: en-AU (en_AU.UTF-8); Calc: CL

Also hangs on macOS (I tested 7.5.4), so unrelated to Wayland.

Robert and Pierre, could you please check if the following reports are at all related?
- bug 77897
- bug 152170
- bug 152782

Thank you!
Comment 13 Stéphane Guillou (stragu) 2023-07-09 16:12:24 UTC
I noticed that it eventually works, it's "just" having serious performance issues (both macOS and Linux). Using these steps:

1. Open attachment 188242 [details]
2. Reports > edit report rptSoldeEvenement
3. Click the =ecrdebit field in the Detail section
4. In the right panel, got the Data tab
5. Select "Function" in Data Field Type
6. Select "ecrdebit" for Data
7. Select "Accumulation" for Function

Results:
Hangs for ages, long enough to make the user want to force quit. Eventually resumes and populates the fields with:
- Data field type = Function
- Data field = [Accumulationecrdebitevt_Libel]

After that, clicking away and then back on the modified field again hangs LO. So not just a one-off thing: happens every time the information is displayed. After that, the fields contain:
- Data field type = User defined function
- Function = [Accumulationecrdebitevt_Libel]

Tested with:

Version: 7.5.4.2 (X86_64) / LibreOffice Community
Build ID: 36ccfdc35048b057fd9854c757a8b67ec53977b6
CPU threads: 8; OS: Linux 5.15; UI render: default; VCL: gtk3
Locale: en-AU (en_AU.UTF-8); UI: en-US
Calc: threaded
Comment 14 Robert Großkopf 2023-07-09 16:18:01 UTC
(In reply to Stéphane Guillou (stragu) from comment #12)
> 
> Robert and Pierre, could you please check if the following reports are at
> all related?
> - bug 77897

Isn't related to this bug, because it isn't about functions in Report Builder

> - bug 152170

Might be related, but there is missing an example file to reproduce.

> - bug 152782

Might also be related, but there is also missing an example file.

Reason for the buggy behavior is the name of the group. Might be it is more than only underscore. Could also be a space ore something else …
Comment 15 Alex Thurgood 2023-07-10 08:37:46 UTC
FWIW, I ran a recent version of 7.6alpha daily build from one of the buildbots, and reproduced in a LLDB session.

After several back and forth, selecting the field, setting Function, then Accumulation, and clicking elsewhere on the report, each time getting a slowdown as described, when it came to saving the report, I got a SIGSEGV.

The backtrace of the stack, including everything up to the point of the crash, is enclosed.
Comment 16 Alex Thurgood 2023-07-10 08:38:19 UTC
Created attachment 188290 [details]
LLDB backtrace on macOS Arm
Comment 17 marc 2024-02-01 10:39:21 UTC
I confirm it's still here in 7.6.4.1 running on Linux (Mint 21.3)