Bug 365009 - Crash with AzimuthalEquidistantProjection and calculation of x,y for labels
Summary: Crash with AzimuthalEquidistantProjection and calculation of x,y for labels
Status: RESOLVED FIXED
Alias: None
Product: marble
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Other Linux
: NOR crash
Target Milestone: ---
Assignee: marble-bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-07-02 17:28 UTC by Friedrich W. H. Kossebau
Modified: 2016-07-05 20:59 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments
Stack trace on crash (11.61 KB, text/plain)
2016-07-02 17:29 UTC, Friedrich W. H. Kossebau
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Friedrich W. H. Kossebau 2016-07-02 17:28:54 UTC
Marble crashed. You suck!

Reproducible: Always

Steps to Reproduce:
1. Open Marble, use OSM map theme, mercator view
2. Enter "11° 17' 23,0"E,  51° 59' 12,6"N" in Search field and press Enter
3. Keep search result and it's label in the view
4. Select "Azimuthal Equidistant"

Actual Results:  
Boom.

Expected Results:  
No boom.

The crash results from x & y being NaNs. They are because there is a division by 0 in
bool AzimuthalEquidistantProjection::screenCoordinates( const GeoDataCoordinates &coordinates,
                                             const ViewportParams *viewport,
                                             qreal &x, qreal &y, bool &globeHidesPoint ) const
For some reason cosC becomes 1, so c becomes 0 , so k gets NaN (due to divide by 0), thus x & y get NaN.
No clue about the calculations happening there, so no idea what the fix would be.
Comment 1 Friedrich W. H. Kossebau 2016-07-02 17:29:52 UTC
Created attachment 99809 [details]
Stack trace on crash
Comment 2 Friedrich W. H. Kossebau 2016-07-05 20:59:41 UTC
Fixed by tackat with 251a9f66a39241d71b6567e2724a3a26368f5932