Bug 99619 - query design segfault on redoing an undone table join creation
Summary: query design segfault on redoing an undone table join creation
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Base (show other bugs)
Version:
(earliest affected)
4.0.0.3 release
Hardware: All All
: medium major
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: haveBacktrace
Depends on:
Blocks: Undo-Redo Database-Queries Crash
  Show dependency treegraph
 
Reported: 2016-05-02 01:20 UTC by tadanet3
Modified: 2024-04-30 02:46 UTC (History)
7 users (show)

See Also:
Crash report or crash signature: ["dbaui::OTableConnection::InvalidateConnection()"]


Attachments
procedure (630.96 KB, application/vnd.oasis.opendocument.spreadsheet)
2016-05-02 01:20 UTC, tadanet3
Details
bt with symbols (4.98 KB, text/plain)
2016-05-02 21:47 UTC, Julien Nabet
Details
bt with debug symbols (5.83 KB, text/plain)
2018-01-26 11:52 UTC, Julien Nabet
Details
bt with debug symbols (6.31 KB, text/plain)
2020-05-22 09:32 UTC, Julien Nabet
Details
Valgrind trace (28.62 KB, application/x-bzip)
2020-05-22 11:27 UTC, Julien Nabet
Details

Note You need to log in before you can comment on or make changes to this bug.
Description tadanet3 2016-05-02 01:20:27 UTC
Created attachment 124775 [details]
procedure

Hellow,

I use LibreOffice_5.1.2_Win_x86.msi, Win7 SP1

on Base 
1.Create database
2.Create table
3.Insert join
4.Undo
5.Redo
6.Crash

For more detaile procedurr, please see the attached file
Comment 1 raal 2016-05-02 06:56:53 UTC
I can confirm with Version: 5.2.0.0.alpha0+ and 4.0; win7
Comment 2 Julien Nabet 2016-05-02 21:47:14 UTC
Created attachment 124801 [details]
bt with symbols

On pc Debian x86-64 with master sources updated today, I had a crash when I tried to a create the join at the beginning.
Comment 3 Julien Nabet 2016-05-02 22:12:58 UTC
I tried to understand the problem of bt I had and noticed this new bt:
#0  com::sun::star::uno::BaseReference::iquery (pInterface=0x2bacd08, rType=invalid uno::Type) at /home/julien/lo/libreoffice/include/com/sun/star/uno/Reference.hxx:54
#1  0x00002aaad9c3cd18 in com::sun::star::uno::Reference<com::sun::star::lang::XUnoTunnel>::iquery (pInterface=0x2bacd08)
    at /home/julien/lo/libreoffice/include/com/sun/star/uno/Reference.hxx:69
#2  0x00002aaad9c39fa5 in com::sun::star::uno::Reference<com::sun::star::lang::XUnoTunnel>::Reference (this=0x7fffffff3a90, rRef=...)
    at /home/julien/lo/libreoffice/include/com/sun/star/uno/Reference.hxx:170
#3  0x00002aaad9e127c6 in dbaui::OJoinExchObj::GetSourceDescription (_rxObject=uno::Reference to (GtkDnDTransferable *) 0x2bacd08)
    at /home/julien/lo/libreoffice/dbaccess/source/ui/querydesign/JoinExchange.cxx:76
#4  0x00002aaad9ea2330 in dbaui::OTableWindowListBox::ExecuteDrop (this=0x3f66cc0, _rEvt=...)
    at /home/julien/lo/libreoffice/dbaccess/source/ui/querydesign/TableWindowListBox.cxx:308

Stephan: any thoughts?
(openjdk version "1.8.0_91"
OpenJDK Runtime Environment (build 1.8.0_91-8u91-b14-2-b14)
OpenJDK 64-Bit Server VM (build 25.91-b14, mixed mode)
)
Comment 4 Stephan Bergmann 2016-05-03 07:36:35 UTC
(In reply to Julien Nabet from comment #3)
> Stephan: any thoughts?

Smells like _rEvt.maDropEvent.Transferable in frame #4 is already corrupted.
Comment 5 Xisco Faulí 2017-02-27 17:10:55 UTC
Also reproduced in

Version: 5.3.0.3
Build ID: 1:5.3.0~rc3-0ubuntu1~yakkety1.1
CPU Threads: 4; OS Version: Linux 4.8; UI Render: default; VCL: gtk3; Layout Engine: new; 
Locale: es-ES (ca_ES.UTF-8); Calc: group
Comment 6 Julien Nabet 2018-01-26 11:52:53 UTC
Created attachment 139372 [details]
bt with debug symbols

On pc Debian x86-64 with master sources updated some days ago, I could reproduce this.
Since the bt is different, I attach a new one.
Comment 7 QA Administrators 2019-06-15 02:58:49 UTC Comment hidden (obsolete)
Comment 8 Xisco Faulí 2020-05-22 08:27:13 UTC
@Lionel, I thought you might be interested in this issue
Comment 9 Lionel Elie Mamane 2020-05-22 08:53:14 UTC
Does this happen also with joins on two different tables, or only in the "join the table to itself" case that the original bug reporter was showing in attachment 124775 [details]?
Comment 10 Julien Nabet 2020-05-22 09:29:43 UTC
(In reply to Lionel Elie Mamane from comment #9)
> Does this happen also with joins on two different tables, or only in the
> "join the table to itself" case that the original bug reporter was showing
> in attachment 124775 [details]?

In brief, yes
In detail:
on pc Debian x86-64 with master sources updated today, here are the steps I did:
- create brand new odb embedded HSQLDB file
- create ORDERS and CUSTOMERS table with wizard (I kept by default options for both).
- create a new Query with Design
- add both tables
- insert join between ORDERS.CUSTOMER_ID and CUSTOMERS.ID
- undo
- redo
=> crash
Comment 11 Julien Nabet 2020-05-22 09:32:10 UTC
Created attachment 161125 [details]
bt with debug symbols

Just to update the bt but it seems quite the same.
Comment 12 Julien Nabet 2020-05-22 11:27:19 UTC
Created attachment 161135 [details]
Valgrind trace

If it may help...
Comment 13 QA Administrators 2022-05-23 03:37:43 UTC Comment hidden (obsolete)
Comment 14 Robert Großkopf 2022-05-23 06:22:06 UTC
Took description of comment 10.

Crash could be reproduced with internal HSQLDB and also internal Firebird on OpenSUSE 15.3 with

Version: 7.3.4.1 / LibreOffice Community
Build ID: 13668373362b52f6e3ebcaaecb031bd59a3ac66b
CPU threads: 6; OS: Linux 5.3; UI render: default; VCL: kf5 (cairo+xcb)
Locale: de-DE (de_DE.UTF-8); UI: en-US
Calc: threaded
Comment 15 Stéphane Guillou (stragu) 2024-04-30 02:46:14 UTC
Still reproduced following comment 10 steps with:

Version: 24.8.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 2f5ab5b8e7bd7dd06e00153abb77a69e5d192dd2
CPU threads: 8; OS: Linux 6.5; UI render: default; VCL: gtk3
Locale: en-AU (en_AU.UTF-8); UI: en-US
Calc: CL threaded

Crash report for 24.2: https://crashreport.libreoffice.org/stats/crash_details/0b9d870f-96da-417b-b504-eec845a0ae17