Bug 127682 - New Print dialog: Crash selecting (*) Even/Odd Pages with a 1 page document
Summary: New Print dialog: Crash selecting (*) Even/Odd Pages with a 1 page document
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
6.3.1.2 release
Hardware: All All
: high major
Assignee: Caolán McNamara
URL:
Whiteboard: target:6.4.0 target:6.3.3
Keywords: bibisected, haveBacktrace, regression
Depends on:
Blocks: Print-Dialog
  Show dependency treegraph
 
Reported: 2019-09-21 09:13 UTC by Oliver Brinzing
Modified: 2019-09-24 07:25 UTC (History)
8 users (show)

See Also:
Crash report or crash signature:


Attachments
bt with debug symbols (gtk3) (2.66 KB, text/plain)
2019-09-21 10:11 UTC, Julien Nabet
Details
WinDbg ST of abort error and crash on selecting print of non exsitant Even pages of a Calc sheet (7.01 KB, text/plain)
2019-09-21 16:13 UTC, V Stuart Foote
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Oliver Brinzing 2019-09-21 09:13:26 UTC
steps to reproduce:

- open new spreadsheet
- Menu File/Print...
- select (*) Even Pages
- [Cancel]
-> Crash: invalid vector <T> subscribt
Comment 1 Julien Nabet 2019-09-21 10:11:03 UTC
Created attachment 154339 [details]
bt with debug symbols (gtk3)

On pc Debian x86-64 with master sources updated today, I could reproduce this.
Comment 2 Julien Nabet 2019-09-21 10:11:41 UTC
I can reproduce this too with gen and kf5 renderings
Comment 3 V Stuart Foote 2019-09-21 14:24:13 UTC
Confirmed on Windows builds 6.3.1.2 and recent master/6.4.0, STR should note the new Calc sheet is either empty or has less than one page worth of cell data--the fatal error/crash only occurs if selecting the print dialog '(*) Even pages' radio button for a document without a second page.
Comment 4 V Stuart Foote 2019-09-21 16:11:27 UTC
Not sure if there had been any changes to logic since added with https://cgit.freedesktop.org/libreoffice/core/commit/?id=faf2b0f165e9d9e3160e5d54e3d2e9973facf0b8  but the crash out is pretty drastic and hides details of the call from WinDbg's stack trace and Julien's Linux trace.

This is just affecting the Calc page printing of nonexistent 'Even pages'; Writer and Draw/Impress handle print of non-existent Even pages gracefully and do not crash.

@Daniel, bubli -- might be of interest
Comment 5 V Stuart Foote 2019-09-21 16:13:29 UTC
Created attachment 154346 [details]
WinDbg ST of abort error and crash on selecting print of non exsitant Even pages of a  Calc  sheet
Comment 7 Xisco Faulí 2019-09-23 08:53:26 UTC
I believe the problem started in https://cgit.freedesktop.org/libreoffice/core/commit/?id=faf2b0f165e9d9e3160e5d54e3d2e9973facf0b8
Comment 8 Julien Nabet 2019-09-23 09:31:56 UTC
Interestingly, I don't reproduce this on Impress and Writer.
Idem for you?
Comment 9 Xisco Faulí 2019-09-23 10:23:06 UTC
(In reply to Julien Nabet from comment #8)
> Interestingly, I don't reproduce this on Impress and Writer.
> Idem for you?

and it doesn't crash if the document has at least 2 pages to print
Comment 10 Xisco Faulí 2019-09-23 10:41:49 UTC
Hi Caolán,
I thought you might be interested in this issue...
Comment 11 Caolán McNamara 2019-09-23 15:09:24 UTC
I can make it not crash anyway.
Comment 12 Commit Notification 2019-09-23 16:13:45 UTC
Caolán McNamara committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/203865e128ddea66041bb1597333dfb04ec81186

Resolves: tdf#127682 out_of_range thrown on print empty calc doc

It will be available in 6.4.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 13 Caolán McNamara 2019-09-23 16:16:41 UTC
fixed in master, backport to 6-3 in gerrit
Comment 14 Julien Nabet 2019-09-23 19:25:00 UTC
On pc Debian x86-64 with master sources updated today, I don't reproduce this.
Thank you for the fix!
Comment 15 Commit Notification 2019-09-24 07:25:25 UTC
Caolán McNamara committed a patch related to this issue.
It has been pushed to "libreoffice-6-3":

https://git.libreoffice.org/core/commit/d7bd0b2d010b4fa64dd6773ad63f864e13fffb29

Resolves: tdf#127682 out_of_range thrown on print empty calc doc

It will be available in 6.3.3.

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.