Bug Hunting Session
Bug 120151 - Cannot create/edit base report (crashes)
Summary: Cannot create/edit base report (crashes)
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Base (show other bugs)
Version:
(earliest affected)
6.1.2.1 release
Hardware: All All
: highest critical
Assignee: Not Assigned
URL:
Whiteboard: target:6.2.0 target:6.1.4
Keywords: bibisected, bisected, haveBacktrace, regression
: 121709 (view as bug list)
Depends on:
Blocks: AW080-Regressions
  Show dependency treegraph
 
Reported: 2018-09-27 12:05 UTC by perie_gut
Modified: 2018-11-26 17:16 UTC (History)
8 users (show)

See Also:
Crash report or crash signature: ["rptui::OViewsWindow::EndDragObj(bool,rptui::OSectionView const *,Point const &)"]


Attachments
base sample (6.70 KB, application/vnd.sun.xml.base)
2018-09-27 12:05 UTC, perie_gut
Details
bt + logs (7.65 KB, text/plain)
2018-09-29 18:12 UTC, Julien Nabet
Details
how to reproduce it! (1.55 MB, video/mp4)
2018-10-31 13:14 UTC, Xisco Faulí
Details

Note You need to log in before you can comment on or make changes to this bug.
Description perie_gut 2018-09-27 12:05:07 UTC
Created attachment 145212 [details]
base sample

How to reproduce:
1. open the attached file
2. create a report using the report builder wizard
3. save the changes. 
4. Edit the report by moving a field 
5. LO Base should crash.


crash report
crashreport.libreoffice.org/stats/crash_details/84be5d84-e499-4509-8168-c84b71591096

libreoffice details
Version: 6.1.2.1 (x64)
Build ID: 65905a128db06ba48db947242809d14d3f9a93fe
CPU threads: 4; OS: Windows 10.0; UI render: default; 
Locale: en-PH (en_PH); Calc: threaded
Comment 1 Drew Jensen 2018-09-27 12:28:40 UTC
Confirmed with Ubuntu 18.04
Comment 2 Alex Thurgood 2018-09-27 14:26:22 UTC
Confirmed also with 6.2alpha own master build from 25/09/2018
Comment 3 Alex Thurgood 2018-09-27 14:28:28 UTC
(In reply to Alex Thurgood from comment #2)
> Confirmed also with 6.2alpha own master build from 25/09/2018

In fact, I raised this on the QA irc channel yesterday, but unfortunately no one was around at the time...
Comment 4 raal 2018-09-27 19:28:54 UTC
This seems to have begun at the on of the below commits.
Adding Cc: to Armin Le Grand, Noel Grandin ; Could you possibly take a look at this one?
Thanks

34b63425ed12b2c68557db3870f1f9c6ad90f1cf is the first bad commit
commit 34b63425ed12b2c68557db3870f1f9c6ad90f1cf
Author: Jenkins Build User <tdf@pollux.tdf>
Date:   Mon Jun 4 21:07:06 2018 +0200

    source sha:726d7e7b8b50dca9914329dbfd9491f7c8961f68
    
    source sha:726d7e7b8b50dca9914329dbfd9491f7c8961f68
    source sha:a28a839b9f9eeec1544c5ceeeabe7b1083ce1655
    source sha:4b4942224b550235da228655677b5c068a053254


author	Armin Le Grand <Armin.Le.Grand@cib.de>	2018-05-25 12:58:10 +0200
committer	Armin Le Grand <Armin.Le.Grand@cib.de>	2018-05-25 12:59:48 +0200
commit	726d7e7b8b50dca9914329dbfd9491f7c8961f68 (patch)
tree	aba7b05720e84dc38dabe93f6a51825326c2a7be
parent	a28a839b9f9eeec1544c5ceeeabe7b1083ce1655 (diff)
tdf#117629: Remove again after next step of SOSAW080 is done

author	Noel Grandin <noelgrandin@gmail.com>	2018-05-24 21:43:08 +0200
committer	Noel Grandin <noel.grandin@collabora.co.uk>	2018-05-25 12:34:37 +0200
commit	a28a839b9f9eeec1544c5ceeeabe7b1083ce1655 (patch)
tree	6e2fe3813a9a9d51429c10c97f22b5cee399d3a6
parent	4b4942224b550235da228655677b5c068a053254 (diff)
no need declare these tag structs separately

author	Armin Le Grand <Armin.Le.Grand@cib.de>	2018-04-16 22:34:50 +0200
committer	Armin Le Grand <Armin.Le.Grand@cib.de>	2018-05-25 12:31:32 +0200
commit	4b4942224b550235da228655677b5c068a053254 (patch)
tree	a660a04a1f7a3eee910da780ece271d68942201d
parent	f8edef392245c292398a80f6a858ca19f32df9c3 (diff)
SOSAW080: Derive SdrObjGroup from SdrObjList
Comment 5 Xisco Faulí 2018-09-27 20:16:35 UTC
Reproduced in 6.1.2.1. increasing severity...
Comment 6 Xisco Faulí 2018-09-27 20:20:07 UTC
> author	Armin Le Grand <Armin.Le.Grand@cib.de>	2018-04-16 22:34:50 +0200
> committer	Armin Le Grand <Armin.Le.Grand@cib.de>	2018-05-25 12:31:32 +0200
> commit	4b4942224b550235da228655677b5c068a053254 (patch)
> tree	a660a04a1f7a3eee910da780ece271d68942201d
> parent	f8edef392245c292398a80f6a858ca19f32df9c3 (diff)
> SOSAW080: Derive SdrObjGroup from SdrObjList

Regression introduced by this bug above, as the problem can't be reproduced in 6.1.1.2 but in 6.1.2.1
Comment 7 Julien Nabet 2018-09-29 18:12:56 UTC
Created attachment 145268 [details]
bt + logs

On pc Debian x86-64 with master sources updated today, I could reproduce this.
I attached bt with symbols + logs
Comment 8 Julien Nabet 2018-09-30 09:57:56 UTC
I submitted a patch here https://gerrit.libreoffice.org/#/c/61152/

I don't know if it's the right fix but at least, it doesn't crash and labels are moved.

I noticed these kinds of logs on console when applying the patch:
warn:legacy.osl:9335:9335:svx/source/svdraw/svdmrkv1.cxx:315: SdrMarkView::UndirtyMrkPnt(): Selected points on an object that is not a PolyObj!
warn:legacy.osl:9335:9335:svx/source/unodraw/unopage.cxx:796: AW: Unknown Inventor in SvxDrawPage::CreateShape()

warn:svx.uno:9335:9335:svx/source/svdraw/svdobj.cxx:2767: a UNO shape took over an SdrObject previously owned by another UNO shape!
warn:svx:9335:9335:svx/source/svdraw/svdmodel.cxx:242: SdrModel::~SdrModel: Not all incarnations of SdrObjects deleted, possible memory leak (!)
Comment 9 perie_gut 2018-10-01 10:35:28 UTC
Version: 6.1.3.0.0+ (x64)
Build ID: 4f28521bf96d4a5fedad3c85171baba412abbb0e
CPU threads: 4; OS: Windows 10.0; UI render: default; 
TinderBox: Win-x86_64@42, Branch:libreoffice-6-1, Time: 2018-10-01_00:25:00
Locale: en-PH (en_PH); Calc: CL


Still cannot edit the report in base.
Comment 10 raal 2018-10-01 12:18:47 UTC
(In reply to perie_gut from comment #9)
> Version: 6.1.3.0.0+ (x64)
> Build ID: 4f28521bf96d4a5fedad3c85171baba412abbb0e
> CPU threads: 4; OS: Windows 10.0; UI render: default; 
> TinderBox: Win-x86_64@42, Branch:libreoffice-6-1, Time: 2018-10-01_00:25:00
> Locale: en-PH (en_PH); Calc: CL
> 
> 
> Still cannot edit the report in base.

Please could you test it with dev version?  You can download it here: http://dev-builds.libreoffice.org/daily/master/
Thank you
Comment 11 Julien Nabet 2018-10-01 12:22:55 UTC
(In reply to raal from comment #10)
> ...
> Please could you test it with dev version?  You can download it here:
> http://dev-builds.libreoffice.org/daily/master/
> Thank you

Except if I missed a patch on master these 2-3 last days, I don't think it's fixed since I could reproduce this with master updated last Saturday.
I submitted a patch on gerrit (see comment 8) but it's still on review.
Comment 12 Commit Notification 2018-10-07 16:11:10 UTC
Julien Nabet committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=8b119b972b37a7e497091167bb6944a1c167f9bb

tdf#120151: fix crash in edit report

It will be available in 6.2.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 13 Xisco Faulí 2018-10-08 12:28:28 UTC
Verified in

Version: 6.2.0.0.alpha0+
Build ID: 4854acc7929ea58632c5d0f7f80a4adc3c62b8cd
CPU threads: 4; OS: Linux 4.15; UI render: default; VCL: gtk3; 
Locale: ca-ES (ca_ES.UTF-8); Calc: threaded

@Julien Nabet, thanks for fixing this!!
Comment 14 Julien Nabet 2018-10-08 12:32:51 UTC
(In reply to Xisco Faulí from comment #13)
> ...
> @Julien Nabet, thanks for fixing this!!

Hope there's no side effect here (I think about memory leak). For me, the real validation will come from Armin but I suppose he must busy for the moment.
Comment 15 Commit Notification 2018-10-30 09:23:28 UTC
Julien Nabet committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/+/f88b95032262c434647475b6af7e33068635b6c4%5E%21

Revert tdf#120782, tdf#120728, tdf#120152, tdf#120151

It will be available in 6.2.0.

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

Affected users are encouraged to test the fix and report feedback.
Comment 16 Julien Nabet 2018-10-30 09:28:39 UTC
So it should fail again with the revert.
But since the patch was wrong and brought regression, I had no choice.
Comment 17 Armin Le Grand 2018-10-31 13:06:01 UTC
Cannot eproduce in master -> probably fixed wiith tdf#120674
Comment 18 Xisco Faulí 2018-10-31 13:13:47 UTC
(In reply to Armin Le Grand (CIB) from comment #17)
> Cannot eproduce in master -> probably fixed wiith tdf#120674

Still reproducible in

Version: 6.2.0.0.alpha1+
Build ID: 612e8f05d72b96c86122396ffc960cd76a742325
CPU threads: 4; OS: Linux 4.15; UI render: default; VCL: gtk3; 
Locale: ca-ES (ca_ES.UTF-8); Calc: threaded

I'll attach a screencast...
Comment 19 Xisco Faulí 2018-10-31 13:14:10 UTC
Created attachment 146192 [details]
how to reproduce it!
Comment 20 Armin Le Grand 2018-11-01 11:48:13 UTC
Hi Xisco,
thanks a lot for the screencast, I get now wehat to do. This really helps, the reproduction descriptions for that ReportBuilder stuff are not easy to understand.

Nonetheless, seems also to be fixed with tdf#120728.
Still, there is a crash in shutdown/cleanup in SdrObjectLifetimeWatchDog - thus, in debug-only code. Good for pro and release code, but a hint for an SdrObject not being freed, so keep this one open, I may have/need a 2nd look on this one...
Comment 21 Xisco Faulí 2018-11-01 13:33:47 UTC
Hi Armin,
Thanks for looking at this. At least in a release build the original problem is no longer reproducible. Checked in

Version: 6.2.0.0.alpha1+
Build ID: 4326fb3ef3ddd7c6f9d08ba96add4f4736503ceb
CPU threads: 4; OS: Linux 4.15; UI render: default; VCL: gtk3; 
Locale: ca-ES (ca_ES.UTF-8); Calc: threaded

Anyway, let's keep this one open...
Comment 22 Armin Le Grand 2018-11-01 15:07:40 UTC
Four objects not deleted (can be seen at SdrModel::~SdrModel() in maAllIncarnatedObjects). Tried to follow adresses after Edit-open of Report, when select & D&D start...

Three objects reated by *single* call to OViewsWindow::BegDragObj_createInvisibleObjectAtPosition - none of these gets deleted.
Comment 23 Armin Le Grand 2018-11-01 15:10:11 UTC
Objects created by OViewsWindow::BegDragObj_createInvisibleObjectAtPosition are added to m_aBegDragTempList, but never get deleted. That list is just

filled in OViewsWindow::BegDragObj_createInvisibleObjectAtPosition

cleared and re-filled at OViewsWindow::BegDragObj

but never used for any sort of cleanup - looks like an error to me...
Comment 24 Armin Le Grand 2018-11-01 15:27:35 UTC
After change and close win and answering 'no save' in OViewsWindow::~OViewsWindow() still all three D&D objects are in m_aBegDragTempList. That list is <SdrObject*> so no destuct will happen.

The contained SdrObjects do not have a parent - seems as if they get removed from page, at least they seem to be added to page when constructed (see OViewsWindow::BegDragObj_createInvisibleObjectAtPosition - there, rReportSection.getPage()->InsertObject(pNewObj) is called).

Thus it should be possible to find where these get removed from page again...?
Comment 25 Dr. Edward Scott 2018-11-10 15:49:36 UTC
Any changes made to the labels on a report are not saved when the report is closed and must be reentered each time the report is opened.  Also, other actions such as merging cells do not appear to be saved either.
Comment 26 Julien Nabet 2018-11-26 09:27:49 UTC
*** Bug 121709 has been marked as a duplicate of this bug. ***
Comment 27 ambimom 2018-11-26 16:49:29 UTC
After compiling database and developing report, if you attempt to add a page number or date in either the header or footer, the whole thing crashes.  In previous versions of base report, page numbers and dates could be inserted in the report design view.  The insert menu shows tabs to click for date, time and page numbers.  Click on any of these and the whole thing crashes.

After the report is created, there is possibility to edit the document.  At this stage, you can insert the page number, date or time.  The menu works at this stage, but in previous versions these could be inserted in the design phase for the report.
Comment 28 Xisco Faulí 2018-11-26 16:51:40 UTC
@ambimom@yahoo.com, which version of LibreOffice are you using ?
Comment 29 ambimom 2018-11-26 16:52:45 UTC Comment hidden (obsolete)
Comment 30 ambimom 2018-11-26 16:54:45 UTC
Sorry about the duplicate comments...

I am using Version: 6.1.3.2
Build ID: 86daf60bf00efa86ad547e59e09d6bb77c699acb
Comment 31 Xisco Faulí 2018-11-26 17:03:19 UTC
Just for the record, this issue got fixed in https://gerrit.libreoffice.org/plugins/gitiles/core/+/52bbb04f1e39b2d778275c91f77b6c0714ecd0d0%5E%21 while fixing bug 120728,
however, it's still open due to comment 20
Comment 32 Drew Jensen 2018-11-26 17:05:42 UTC
Using Ubuntu 18.04 and two versions of LO (6.1.4 dev and 6.2Beta1) could not reproduce a crash.

I moved and edited fields already existing.
Added page numbers to the page footer.
Added a report header and the report date field to the header.
Everything functioned as expected.

So, could mark this as verified resolved, waiting on next minor release of 6.1.4
Comment 33 Xisco Faulí 2018-11-26 17:08:12 UTC
Hi Drew,
Please see comment 20
Comment 34 Xisco Faulí 2018-11-26 17:16:47 UTC
I've made up my mind and decided to create a follow-up bug for the assert -> bug 121724
Closing this one as VERIFIED FIXED

@Armin, thanks for fixing this one!!