When choosing to download too many tiles it shows negative numbers in "Number of tiles to download" and "Estimated Download size" fields. Reproducible: Always Steps to Reproduce: 1. Choose OSM maps (hasn't tried on other maps) and show the whole globe 2. Click File -> Download Region 3. Choose "Visible region" and Zoom -> "Tile level range" from 2 to 16 (actually, from any to 16 will do) Actual Results: Number of tiles to download: -1386718928 Estimated Download size: -1.80273e+10 kB Expected Results: There must be real number of according tiles, obviosly positive. Looks like a 32-bit signed integer overflow.
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