Opened 10 years ago

Closed 10 years ago

Last modified 10 years ago

#2347 closed defect (fixed)

NaN issue in MapView::drawScale

Reported by: Mateusz Loskot Owned by: Chris Browet
Priority: major Milestone:
Component: merkaartor Version:
Keywords: Cc:

Description

Using Merkaartor from current trunk (r17945) built using Visual C++ 8.0 and Qt 4.5.3 on Windows XP.

First launch of Merkaartor (under VS debugger) causes assertion caught in QRasterizer::rasterizeLine:

 Q_ASSERT(width > 0.0);

because sometimes the width is NaN. The NaN value is forced by NaN result of log calculation in MapView::drawScale function.

I attached patch that shows where is the problem and applies a sort of escape fix - simple isnan() based check - that prevents execution stops. However, the real fix needs to be provided to that math.

Attachments (1)

mapwindow-drawscale-isnan.patch (816 bytes) - added by Mateusz Loskot 10 years ago.
Patch presenting where is the log calculation problem - temporary fix included.

Download all attachments as: .zip

Change History (4)

Changed 10 years ago by Mateusz Loskot

Patch presenting where is the log calculation problem - temporary fix included.

comment:1 Changed 10 years ago by Chris Browet

Owner: changed from cbro@… to Chris Browet
Status: newassigned

Strange... Never had this assert before... Might be something new in 4.5.3

comment:2 Changed 10 years ago by Chris Browet

Resolution: fixed
Status: assignedclosed

(In [17970]) FIX : assert when drawing scale (fixes #2347)

comment:3 Changed 10 years ago by Mateusz Loskot

Indeed, I've in observed a random nature of this particular issue. Somewhat related to on-load size of the application Window, but haven't had time to debug it.

Note: See TracTickets for help on using tickets.