Bug 87155 - Assertion failure when loading a (perhaps pathological) spreadsheet document
Summary: Assertion failure when loading a (perhaps pathological) spreadsheet document
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
(earliest affected) Master
Hardware: Other All
: medium normal
Assignee: Not Assigned
Whiteboard: target:4.5.0
Depends on:
Reported: 2014-12-09 13:44 UTC by Tor Lillqvist
Modified: 2016-09-16 05:06 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:
Regression By:


Note You need to log in before you can comment on or make changes to this bug.
Description Tor Lillqvist 2014-12-09 13:44:03 UTC
When loading the sample document from bug#87119, I get an assertion failure:

Assertion `n < std::numeric_limits<long>::max() / nMapNum' failed

from vcl/source/outdev/map.cxx:385. Debugging shows that n==0 and nMapNum==-1. The root cause seems to be that nAvailable gets the value -1 at sc/source/ui/view/output2.cxx:1722 because aAreaParam.maAlignRect.GetWidth()==3 and nTotalMargin==4.
Comment 1 Commit Notification 2014-12-11 21:23:50 UTC
Tor Lillqvist committed a patch related to this issue.
It has been pushed to "master":


fdo#87155: Avoid negative scaling (and assertion failures further on)

It will be available in 4.5.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 2 Joel Madero 2014-12-12 05:52:11 UTC
@Tor - is this fixed now?

Setting to NEW at least since you know what you're doing and reported it.
Comment 3 Tor Lillqvist 2014-12-12 08:08:53 UTC
Well, it fixed the problem for me. I don't know if it was the "right" fix, though.
Comment 4 QA Administrators 2015-12-20 16:15:10 UTC Comment hidden (obsolete)
Comment 5 Xisco Faulí 2016-09-15 22:27:05 UTC
Is this bug fixed?
If so, could you please close it as RESOLVED FIXED?