Bug 100303 - REPORT BUILDER - ORB Report crashes on conditional formatting
Summary: REPORT BUILDER - ORB Report crashes on conditional formatting
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Base (show other bugs)
Version:
(earliest affected)
5.1.3.2 release
Hardware: All Linux (All)
: highest critical
Assignee: Caolán McNamara
URL:
Whiteboard: target:5.3.0 target:5.2.0.2 target:5.1.5
Keywords:
Depends on:
Blocks: Conditional-Formatting Database-Reports-Builder
  Show dependency treegraph
 
Reported: 2016-06-10 07:13 UTC by Fred
Modified: 2017-07-17 19:51 UTC (History)
5 users (show)

See Also:
Crash report or crash signature:


Attachments
gdbtrace log (466 bytes, application/gzip)
2016-06-13 16:31 UTC, Fred
Details
backtrace (4.71 KB, text/plain)
2016-06-22 10:38 UTC, Alex Thurgood
Details
test odb file (7.46 KB, application/vnd.oasis.opendocument.database)
2016-06-22 10:46 UTC, Alex Thurgood
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Fred 2016-06-10 07:13:41 UTC
After updating to LO 5.1.3.2 on Ubuntu Xenial, Base Reports (built with ORB) crash when trying to apply conditional formatting to a field. LO Base is connected to MySQL in MySQL native mode. To reproduce:

1. open/create a report
2. select a field
3. Format - Conditional formatting
4. Create a condition, select a format (bold, color, italics, whatever)
5. Apply

A message box pops-up with "std::bad_cast" and the whole of LO Base crashes.

Existing reports containing conditional formatting created before the update to LO 5.1.3.2 do run properly, with fields being conditionally applied. However, when trying to edit these and modify their conditional formatting, the same bug happens and LO Base crashes.
Comment 1 Buovjaga 2016-06-11 14:45:42 UTC
Please install the debug package and try to get a backtrace: https://wiki.documentfoundation.org/QA/BugReport/Debug_Information
Comment 2 Alex Thurgood 2016-06-13 15:33:31 UTC
Fred :
Please provide a sample DB with instructions for testing, thanks.
Comment 3 Alex Thurgood 2016-06-13 15:56:25 UTC
@Fred :
I have created a sample ODB file with embedded hsql.
I create a report using the wizard, and save it.
I then right mouse button click on the report and choose Edit. The report definition opens for editing.

If I right mouse button click on a selected field, I don't see any Formatting entry. Even if I display the Properties for the control, in the General tab, I only see entries for "Conditional Print Expression" and "Formatting"

Please explain what it is you are doing.
Comment 4 Fred 2016-06-13 16:21:55 UTC
@Alex
Create a report, put in a field. Select the field, then Menu Format - Conditional formatting...
Condition 1 : "Expression is", enter a condition, select a format (like a different font color). Click OK, a message box comes up and Base crashes entirely.
Comment 5 Fred 2016-06-13 16:31:25 UTC
Created attachment 125641 [details]
gdbtrace log
Comment 6 Alex Thurgood 2016-06-13 20:54:40 UTC
@Fred : thanks.

I can not reproduce with 

Version: 5.1.3.2
Build ID: 644e4637d1d8544fd9f56425bd6cec110e49301b
Threads CPU : 8; Version de l'OS :Mac OS X 10.11.5; UI Render : par défaut; 
Locale : fr-FR (fr.UTF-8)

I chose an ID field in my report, then Conditional Formmatting with function ISEVEN() and red font. Saved the report, executed the report which gave correct font colour for even numbered ID values, no crash.
Comment 7 Alex Thurgood 2016-06-13 20:56:32 UTC
@Fred: are you using the distrib provided version (or PPA) of LO or TDF-provided download ?
Comment 8 Fred 2016-06-14 06:30:26 UTC
@Alex
Am using the distro provided version of LO, which gets updated as I apply system updates. I do apply updates on a very regular basis.
Comment 9 Fred 2016-06-21 17:01:50 UTC
Hello all,

I conducted further testing. I set up a Debian Jessie VM in which I upgraded LO to 5.1.3.2 and again, same crashes when trying to use some conditional formatting in reports.

Still in Debian Jessie, I then reverted back to LO 4.3.3 (official version in the official repo) and there, perfect, no crash. I saved the odb, opened it up in LO 5.1.3.2 and it ran fine, with conditional format. But again, it crashed if I tried to modify anything relative to conditional formatting.

Back in Ubuntu Xenial, I installed a snap version of LO 5.2.0 beta and again, ORB crashed repeatedly when defining conditional formatting.

Every time, with those different distros and those different LO versions, I tested both with my existing ODB file and with a new, blank one. Crashes occurred every single time, be it with my existing ODB or with a new one.

I am surprised nobody can reproduce the crash -- I tried it on 2 different linux distros (although related -- Ubuntu Xenial and Debian Jessie), and on both distros ORB crashed exactly in the same way when trying to define a conditional format on a field, as previously described.
Comment 10 Alex Thurgood 2016-06-22 09:44:35 UTC
Fred : 

which JDK is running on those machines when the crash occurs ?

are you using the distrib provided ORB or have you installed the ORB from the extensions download site ?
Comment 11 Alex Thurgood 2016-06-22 10:14:59 UTC
Unfortunately, my Ubuntu provided version of LO 503rc2 on LinuxMint 17.3 is so unstable that it crashes as soon as I try and create any kind of database report. Just starting the wizard is enough to bring it to its knees. Will try a master build on it later.
Comment 12 Alex Thurgood 2016-06-22 10:22:52 UTC
Reproduced on my own master build :

Version: 5.3.0.0.alpha0+
Build ID: dabee9834be560c0b2ca174e88002f0eae1d155a
Threads CPU : 4; Version de l'OS :Linux 3.19; UI Render : par défaut; 
Locale : fr-FR (fr_FR.UTF-8)

Linux Mint 17.3

I used an ODB file connecting via the native mysql connector to a locally hosted mysql server. Created an initial report with the ORB, then edited the report to add conditional formatting to one of the three fields in the report, changing the font background colour to red on condition of a certain value. As soon as I pressed the OK button, LO crashed.

Confirming
Comment 13 Alex Thurgood 2016-06-22 10:33:16 UTC
Hmm, no symbols in my master build :

(gdb) bt full
#0  0x00007ffff7551c37 in __GI_raise (sig=sig@entry=6)
    at ../nptl/sysdeps/unix/sysv/linux/raise.c:56
        resultvar = 0
        pid = 27319
        selftid = 27319
#1  0x00007ffff7555028 in __GI_abort () at abort.c:89
        save_stage = 2
        act = {__sigaction_handler = {sa_handler = 0x0, sa_sigaction = 0x0}, 
          sa_mask = {__val = {0, 140737333868734, 140737351947559, 
              140733193388037, 0, 1, 140737342741808, 140737346644072, 
              140737333868734, 78947984, 140737351976149, 140737353693488, 
              140737343678253, 1, 140737353696016, 78985680}}, sa_flags = 10, 
          sa_restorer = 0x7ffff7f93a00}
        sigs = {__val = {32, 0 <repeats 15 times>}}
#2  0x00007ffff6c4d535 in __gnu_cxx::__verbose_terminate_handler() ()
   from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
No symbol table info available.
#3  0x00007ffff6c4b6d6 in ?? () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
No symbol table info available.
#4  0x00007ffff6c4a799 in ?? () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
No symbol table info available.
#5  0x00007ffff6c4b34a in __gxx_personality_v0 ()
   from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
Comment 14 Caolán McNamara 2016-06-22 10:37:43 UTC
Is there a reproducer for this with a simpler embedded database case, i.e. download this and click here ?
Comment 15 Alex Thurgood 2016-06-22 10:38:18 UTC
Created attachment 125825 [details]
backtrace
Comment 16 Alex Thurgood 2016-06-22 10:46:21 UTC
Created attachment 125826 [details]
test odb file
Comment 17 Alex Thurgood 2016-06-22 10:48:50 UTC
(In reply to Caolán McNamara from comment #14)
> Is there a reproducer for this with a simpler embedded database case, i.e.
> download this and click here ?

1) Load the test file in LO
2) Click on Forms
3) Right mouse button click on the form and choose Edit.
4) Select RefTache with the mouse and then choose Format-Conditional Formatting from the main menu.
5) Select is "equal to" in the condition drop down menu and enter the number 4. Then select a different coloured font.
6) Press OK
7) Crash.
Comment 18 Alex Thurgood 2016-06-22 10:50:15 UTC
(In reply to Alex Thurgood from comment #17)
> (In reply to Caolán McNamara from comment #14)
> > Is there a reproducer for this with a simpler embedded database case, i.e.
> > download this and click here ?
> 
> 1) Load the test file in LO
> 2) Click on Forms
> 3) Right mouse button click on the form and choose Edit.
> 4) Select RefTache with the mouse and then choose Format-Conditional
> Formatting from the main menu.
> 5) Select is "equal to" in the condition drop down menu and enter the number
> 4. Then select a different coloured font.
> 6) Press OK
> 7) Crash.

Sorry, not Forms, but Reports, of course in step 2.
Comment 19 Commit Notification 2016-06-22 11:25:21 UTC
Caolán McNamara committed a patch related to this issue.
It has been pushed to "master":

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

Resolves: tdf#100303 Report crashes on close of conditional formatting dialog

It will be available in 5.3.0.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 21 Commit Notification 2016-06-23 15:18:12 UTC
Caolán McNamara committed a patch related to this issue.
It has been pushed to "libreoffice-5-2":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=7bc9b583ab8d80fe3e03c0715f63e0421a802c5c&h=libreoffice-5-2

Resolves: tdf#100303 Report crashes on close of conditional formatting dialog

It will be available in 5.2.0.2.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 22 Commit Notification 2016-06-28 11:06:46 UTC
Caolán McNamara committed a patch related to this issue.
It has been pushed to "libreoffice-5-1":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=7cb1840b41fcb1cf0ec60a0ceecfd1cbf6e44ae7&h=libreoffice-5-1

Resolves: tdf#100303 Report crashes on close of conditional formatting dialog

It will be available in 5.1.5.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.