Bug Hunting Session
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 6 raal 2019-09-22 19:26:29 UTC
one of these commits:
git log 78b5211f3464d7374b2888f2078da387f5a01ae6
commit 78b5211f3464d7374b2888f2078da387f5a01ae6
Author: Jenkins Build User <tdf@pollux.tdf>
Date:   Thu Nov 29 23:49:03 2018 +0100

    source sha:bc0146c2ae43256552c276d2dd86291c98556c42
    
    source sha:bc0146c2ae43256552c276d2dd86291c98556c42
    source sha:6686eaa079f5557d0f3bbe92781ad9854d8a5ef6
    source sha:86c60a6af62bf50d5a6e7bc59bb29bfc1983584a
    source sha:8cbdc6a068ad88fc43a98bd0f88fcb7c4ad3ebd9
    source sha:faf2b0f165e9d9e3160e5d54e3d2e9973facf0b8
    source sha:07e4261ceaea31a20ab2bc1a76df722ed0bd54c4
    source sha:cff219f792085645a13b4a703882a8984ce78ddc
    source sha:b368e4043582e6785a88b444e148fdffdc2aece1
    source sha:b4601ff6d9261d185cd440ebdbca8d78f3b5d459
    source sha:a0f02b8856fce1ee0eb5f1748c7c7fc04bd568a6
    source sha:952e4a6ffd95b49d421b6477b3f8e33a6550097f
    source sha:e1bb5b2cd8ecc4db760b1d413e28edc388da5c3e
    source sha:ef9e16fd1720249620c628da66ec856a5629ff2a
    source sha:ff4896a2af1df6138e9246fe1588dfe8c3748f1a
    source sha:1a2ebd24e5daaefa209dea7f4b1889a8295b5794
    source sha:bc34eaa0a87ff89b07581551991ac83d69f64d63
    source sha:226ede405ed4549b7652c9a8421af37511e0046a
    source sha:76e22667625ce8d16dfaa8617a199b774e987a70
    source sha:5c7fb4b4cd9409f8b92a4bb3fe288ba83ced2502
    source sha:cb443d07d54d6698eff51b5be2c6b56323f10315

repro in gtk3
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.