Bug 249633 - [Patch] Crash when MarbleWidget cannot find the "inital tile" for OSM
Summary: [Patch] Crash when MarbleWidget cannot find the "inital tile" for OSM
Status: RESOLVED FIXED
Alias: None
Product: marble
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Compiled Sources Microsoft Windows
: NOR crash (vote)
Target Milestone: 1.1.0
Assignee: marble-bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-08-31 15:29 UTC by Volker Lanz
Modified: 2011-03-28 23:59 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In: 1.2.0 (KDE 4.7.0)


Attachments
tile-of-death.diff (2.24 KB, patch)
2010-08-31 21:41 UTC, Dennis Nienhüser
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Volker Lanz 2010-08-31 15:29:02 UTC
Version:           unspecified (using Devel) 
OS:                MS Windows

Calling MarbleWidget::setMapThemeId("earth/openstreetmap/openstreetmap.dgml") in the code when that file is present but earth/openstreetmap/0/0/0.png is not crashes the marble widget.

I noticed this on MS Windows and have not tried to reproduce on Mac or Linux.

Reproducible: Always
Comment 1 Dennis Nienhüser 2010-08-31 21:41:56 UTC
Created attachment 51151 [details]
tile-of-death.diff

Also happens under Linux.

Attached is the first part of a fix: Falling back to a blue tile of death if the level zero tile is missing. It uses a hardcoded tile size of 256x256 pixel. A proper patch needs to replace this with the actual tile size of the theme, however. To get this done, we should add a tile size tag to texture layers defined in dgml files.
Comment 2 Dennis Nienhüser 2011-01-15 13:51:25 UTC
Comment on attachment 51151 [details]
tile-of-death.diff

Superseded by http://reviewboard.kde.org/r/6334/
Comment 3 Dennis Nienhüser 2011-01-27 21:20:36 UTC
SVN commit 1217541 by nienhueser:

Allow using absolute source directories in texture layers in .dgml files.
Extend .dgml by a tileSize tag (width and height attribute), usable inside textureLayer tags. Such .dgml files are backwards compatible.
Handle 'base tile missing' case more gracefully and return an empty image instead of triggering an assertion.
Move the default tile size (675) to global.h and replace hardcoded default tile sizes with it.
CCBUG: 249633
CCBUG: 263010
REVIEW: 6334

 M  +1 -0      data/maps/earth/bluemarble/bluemarble.dgml  
 M  +2 -0      data/maps/earth/openstreetmap/openstreetmap.dgml  
 M  +2 -1      src/lib/FileStoragePolicy.cpp  
 M  +2 -2      src/lib/ImageLoadThread.cpp  
 M  +1 -1      src/lib/MapWizard.cpp  
 M  +32 -36    src/lib/TileCreator.cpp  
 M  +18 -4     src/lib/TileLoader.cpp  
 M  +1 -0      src/lib/geodata/handlers/dgml/DgmlAttributeDictionary.cpp  
 M  +1 -0      src/lib/geodata/handlers/dgml/DgmlAttributeDictionary.h  
 M  +1 -0      src/lib/geodata/handlers/dgml/DgmlElementDictionary.cpp  
 M  +1 -0      src/lib/geodata/handlers/dgml/DgmlElementDictionary.h  
 A             src/lib/geodata/handlers/dgml/DgmlTileSizeTagHandler.cpp   [License: LGPL]
 A             src/lib/geodata/handlers/dgml/DgmlTileSizeTagHandler.h   [License: LGPL]
 M  +27 -5     src/lib/geodata/scene/GeoSceneTexture.cpp  
 M  +1 -0      src/lib/geodata/scene/GeoSceneTexture.h  
 M  +3 -0      src/lib/global.h  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1217541
Comment 4 Dennis Nienhüser 2011-01-27 21:29:10 UTC
Please reopen if it happens again for some reason.
Comment 5 Dennis Nienhüser 2011-03-28 23:59:03 UTC
SVN commit 1226352 by nienhueser:

Allow using absolute source directories in texture layers in .dgml files.
Extend .dgml by a tileSize tag (width and height attribute), usable inside textureLayer tags. Such .dgml files are backwards compatible.
Handle 'base tile missing' case more gracefully and return an empty image instead of triggering an assertion.
Move the default tile size (675) to global.h and replace hardcoded default tile sizes with it.
CCBUG: 249633
CCBUG: 263010
REVIEW: 6334
Backport of commit 1217541.

 M  +1 -0      data/maps/earth/bluemarble/bluemarble.dgml  
 M  +1 -0      data/maps/earth/openstreetmap/openstreetmap.dgml  
 M  +2 -1      src/lib/FileStoragePolicy.cpp  
 M  +2 -2      src/lib/ImageLoadThread.cpp  
 M  +32 -36    src/lib/TileCreator.cpp  
 M  +18 -4     src/lib/TileLoader.cpp  
 M  +1 -0      src/lib/geodata/handlers/dgml/DgmlAttributeDictionary.cpp  
 M  +1 -0      src/lib/geodata/handlers/dgml/DgmlAttributeDictionary.h  
 M  +1 -0      src/lib/geodata/handlers/dgml/DgmlElementDictionary.cpp  
 M  +1 -0      src/lib/geodata/handlers/dgml/DgmlElementDictionary.h  
 A             src/lib/geodata/handlers/dgml/DgmlTileSizeTagHandler.cpp   [License: LGPL]
 A             src/lib/geodata/handlers/dgml/DgmlTileSizeTagHandler.h   [License: LGPL]
 M  +27 -5     src/lib/geodata/scene/GeoSceneTexture.cpp  
 M  +1 -0      src/lib/geodata/scene/GeoSceneTexture.h  
 M  +3 -0      src/lib/global.h  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1226352