Bug 91195 - Export from Writer to png crashes with assertion failure due to MapMode overflow
Summary: Export from Writer to png crashes with assertion failure due to MapMode overflow
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: graphics stack (show other bugs)
(earliest affected) Master
Hardware: Other All
: medium normal
Assignee: Michael Stahl (allotropia)
Whiteboard: target:5.0.0
Keywords: bibisected, bisected, regression
Depends on:
Reported: 2015-05-10 03:37 UTC by Matthew Francis
Modified: 2015-12-17 09:09 UTC (History)
5 users (show)

See Also:
Crash report or crash signature:

bt with debug symbols (13.46 KB, text/plain)
2015-05-15 20:39 UTC, Julien Nabet

Note You need to log in before you can comment on or make changes to this bug.
Description Matthew Francis 2015-05-10 03:37:56 UTC
Found while attempting to reproduce bug 91146
On current dbgutil master (4048311aae6993357c2d0be1f1968a8c57dd4e85), exporting a .png from Writer crashes

Steps to reproduce:
- Open Writer
- File - Export
- Select .png
- Click OK
Comment 1 Matthew Francis 2015-05-10 03:46:48 UTC
The (assert) crash started at the below commit - which clearly isn't the root cause, but that's all bibisect is going to tell us
Adding Cc: to mstahl@redhat.com; Any thoughts on this one? Thanks

commit 52ce5239b43bf6b9ce1ceddfe90227920aa57657
Author: Michael Stahl <mstahl@redhat.com>
Date:   Tue Nov 25 16:42:49 2014 +0100

    vcl: assert when LogicToPixel overflows
    Change-Id: I86d1c3e0c177c671b280c05b47312c79389884ed
Comment 2 Julien Nabet 2015-05-15 20:39:29 UTC
Created attachment 115633 [details]
bt with debug symbols

On pc Debian x86-64 with master sources updated today, I could reproduce this.
Some added logs gave:
nMapNum 2601847729296527
n 16837
std::numeric_limits<long>::max() 9223372036854775807
nDPI 96
just before the crash.
Comment 3 Julien Nabet 2015-05-15 20:47:37 UTC
Stephan: since you added the assert, thought you might be interested.

Miklos: in https://bugs.documentfoundation.org/show_bug.cgi?id=90502#c5, you talked about FAR_AWAY. Thought you might be interested too.

Perhaps by fixing this one, tdf#90502 could be fixed too.

(I increased importance since: it's a crash+regression)
Comment 4 Michael Stahl (allotropia) 2015-05-15 20:54:47 UTC
fixed on master
Comment 5 Commit Notification 2015-05-15 20:55:05 UTC
Michael Stahl committed a patch related to this issue.
It has been pushed to "master":


tdf#91195: vcl: reduce MapMode Fraction precision to avoid...

It will be available in 5.0.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:
Affected users are encouraged to test the fix and report feedback.
Comment 6 Robinson Tryon (qubit) 2015-12-17 09:09:04 UTC
Migrating Whiteboard tags to Keywords: (bibisected)