Bug 116981 - EDITING: Libo6.1 crash when deleting table column
Summary: EDITING: Libo6.1 crash when deleting table column
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Base (show other bugs)
Version:
(earliest affected)
6.1.0.0.alpha0+
Hardware: All All
: highest critical
Assignee: Not Assigned
URL:
Whiteboard: target:6.1.0
Keywords: bibisected, bisected, haveBacktrace, regression
Depends on:
Blocks:
 
Reported: 2018-04-12 22:21 UTC by Drew Jensen
Modified: 2018-04-18 15:26 UTC (History)
5 users (show)

See Also:
Crash report or crash signature:


Attachments
test file to reproduce crash (3.02 KB, application/vnd.oasis.opendocument.database)
2018-04-12 22:21 UTC, Drew Jensen
Details
file after crash; before recovery (4.35 KB, application/vnd.oasis.opendocument.database)
2018-04-12 22:21 UTC, Drew Jensen
Details
crash report (555.63 KB, application/vnd.tcpdump.pcap)
2018-04-12 22:48 UTC, Drew Jensen
Details
Full bt (11.78 KB, text/plain)
2018-04-13 07:50 UTC, Alex Thurgood
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Drew Jensen 2018-04-12 22:21:12 UTC
Created attachment 141317 [details]
test file to reproduce crash

Testing with 6.1_alpha0 (daily build yesterday), Ubuntu 17.10 64bit

To reproduce: grabbed the first attached file.
Open it.
Open the table TaskEmployees
Select column TaskID (or any other)
Delete the column (delete key or menu delete act the same)
LibO crashes

Tested on Libo6.0.4 w/embedded firebird; No problems.

Second attachment is a copy of the ODB file before recovery. Sent crash reports, I don't remember how to tie that directly to an issue here.
Comment 1 Drew Jensen 2018-04-12 22:21:58 UTC
Created attachment 141318 [details]
file after crash; before recovery
Comment 2 Drew Jensen 2018-04-12 22:48:51 UTC
Created attachment 141319 [details]
crash report

Ah, so I remembered where the crash report dump files are. Assuming you still want those attached.
Comment 3 Xisco Faulí 2018-04-13 07:43:40 UTC Comment hidden (obsolete)
Comment 4 Alex Thurgood 2018-04-13 07:48:48 UTC
Lldb reports :

* thread #1, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=1, address=0x90b3baff0)
    frame #0: 0x0000000183d9754e libdbulo.dylib`dbaui::OTableEditorDelUndoAct::OTableEditorDelUndoAct(dbaui::OTableEditorCtrl*) [inlined] std::__1::shared_ptr<dbaui::OTableRow>::shared_ptr(std::__1::shared_ptr<dbaui::OTableRow> const&) at memory:4091
   4088	template<class _Tp>
   4089	inline
   4090	shared_ptr<_Tp>::shared_ptr(const shared_ptr& __r) _NOEXCEPT
-> 4091	    : __ptr_(__r.__ptr_),
   4092	      __cntrl_(__r.__cntrl_)
   4093	{
   4094	    if (__cntrl_)
Target 0: (soffice) stopped.

@Xisco : did you open the table for table definition editing ? (right mouse button click on table, Edit, then delete a field ?)
Comment 5 Alex Thurgood 2018-04-13 07:50:26 UTC
Created attachment 141321 [details]
Full bt
Comment 6 Alex Thurgood 2018-04-13 07:52:46 UTC
Tested on

Version: 6.1.0.0.alpha0+
Build ID: d5ed07d2a249e61937dd42a4b2efb7e7fbef02d6
CPU threads: 4; OS: Mac OS X 10.13.4; UI render: default; 
Locale: fr-FR (fr_FR.UTF-8); Calc: group
Comment 7 Alex Thurgood 2018-04-13 07:57:12 UTC
Actually, I have no idea who deals with shared pointer management in this part of the code ?
Comment 8 Xisco Faulí 2018-04-13 14:46:09 UTC
Regression introduced by:

author	Noel Grandin <noel.grandin@collabora.co.uk>	2017-12-13 13:07:28 +0200
committer	Noel Grandin <noel.grandin@collabora.co.uk>	2017-12-14 10:05:50 +0100
commit 433fc2214c980abd82fa6240f45e634a53a3c61c (patch)
tree 85405a421b5d90daa37bf46ea0979b6ebea51419
parent 76de866e162502518acbc0ab020c257b80946c2d (diff)
sal_uIntPtr->sal_Int32 in MultiSelection
also replace the long/size_t with sal_Int32 so we have some consistency

Bisected with: bibisect-linux64-6.1 

Adding Cc: to Noel Grandin
Comment 9 Commit Notification 2018-04-14 07:12:46 UTC
Noel Grandin committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=0fe5d61ad2c9e21f393bdad4b706e398728a70d8

tdf#116981 Base when deleting table column

It will be available in 6.1.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 10 Commit Notification 2018-04-16 08:42:55 UTC
Noel Grandin committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=0973e1f4e727a3204c843398bcb0e6a411b1a02d

follow on for tdf#116981

It will be available in 6.1.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 11 Xisco Faulí 2018-04-18 15:26:29 UTC
Verified in

Version: 6.1.0.0.alpha0+
Build ID: b07e8a7e16ba69e822a309ec280d1987f90021a3
CPU threads: 4; OS: Linux 4.13; UI render: default; VCL: gtk3; 
Locale: ca-ES (ca_ES.UTF-8); Calc: group

Noel, thanks for fixing this!!