Summary: | There's signed interger overflow in Download Region window in "Number of tiles to download" and "Estimated Download size" fields | ||
---|---|---|---|
Product: | [Applications] marble | Reporter: | noktastrigo |
Component: | general | Assignee: | marble-bugs |
Status: | RESOLVED FIXED | ||
Severity: | minor | CC: | jwrigley7, nienhueser |
Priority: | NOR | ||
Version First Reported In: | 1.8 (KDE 4.13) | ||
Target Milestone: | --- | ||
Platform: | Ubuntu | ||
OS: | Linux | ||
Latest Commit: | http://commits.kde.org/marble/36373c0e20403d5e1a1f0edf418eae593e701ee2 | Version Fixed In: | |
Sentry Crash Report: | |||
Attachments: |
Downloading region dialog
Downloading region dialog (buggy) |
Description
noktastrigo
2015-01-01 19:38:21 UTC
Hi there, Are you running a 32 bit build of Marble? I cannot reproduce this with Marble 1.9.2 (64 bit). (note: I'm a Google Code-in student) Created attachment 90192 [details]
Downloading region dialog
Hi James! I've installed Marble from Ubuntu Software Center on x64 Ubuntu, so i suppose it should be 64 bit version. $marble -v Qt: 4.8.6 KDE Development Platform: 4.13.3 Marble Virtual Globe: 1.8.3 (stable relase) (I think I should post it earlier) I've just found out that it really depends on the globe position. If instead of "Visible region" I choose "Specify region" N 90, W -180, E 180, S -55,8, then I get Number of tiles -363284952. I think in your case you just got the same integer overflow, but the number just got positive again (the most significant bit became 0 again). There are 2^(2*n) tiles on zoom level n. So there must be 4294967296 tiles for zoom level 16 to 16, 5368709120 tiles for zoom level 15 to 16, ..., 5726623056 tiles for zoom level 2 to 16 for the whole globe (from 85.0511 N to -85.0511 S). And on your screenshot there are much less tiles. Actually, 5726623056 mod 2^32 = 1431655760 - something around you've got. (info about tiles here https://wiki.openstreetmap.org/wiki/Slippy_map_tilenames) Ah hah, the specify region option did it. Can confirm this on Marble 1.9.2 (64 bit). Created attachment 90199 [details]
Downloading region dialog (buggy)
The tile count is passed as 64 bit integers, but in one calculation it uses 32 bit integers, leading to this issue. I'll push a fix shortly. Git commit 36373c0e20403d5e1a1f0edf418eae593e701ee2 by Dennis Nienhüser. Committed on 08/02/2015 at 10:50. Pushed by nienhueser into branch 'master'. Fix tile count calculation when tile number exceeds 32 bit range M +2 -1 src/lib/marble/TileCoordsPyramid.cpp http://commits.kde.org/marble/36373c0e20403d5e1a1f0edf418eae593e701ee2 |