Quoting the forum thread: 2) Next fix is... obscure? Problem occurs in MarbleLegendBrowser::generateSectionsHtml (file MarbleLegendBrowser.cpp). Generating html from dgml, we add image properties tags. Among these properties is the path to the image file. Path generated by adding two strings - "file://" and canonical path. On Linux all seems to be ok, because Linux canonical paths begins with '/' symbol. The result is an url like "file:///opt/marble/data/bitmaps/flag.png", according to this article. But on Windows the result is invalid, like "file://c:/marble/data/bitmaps/flag.png". This result cannot be shown correctly in LegendWidget. We must add one more '/' to get normal "file:///c:/marble/data/bitmaps/flag.png" url. When we fix this, we fall into another problem. When image file is not used and canonical path is null, we finally get a stupid url like "file:///". On Windows, in release build such urls provokes an internal crash in Qt, resulting in application crash with error message from Microsoft Visual C++ Runtime Library: "Runtime error! <...> This application has requested the Runtime to terminate it in an unusual way. <...>". See Atlas theme (data/maps/earth/srtm/srtm.dgml - elevation explanation section) for such imageless elements. Consider to check is the following fix correct: Code: Select all ///- QString src = "file://" + path; QString src; ///+ if( !path.isEmpty() ) { ///+ src = "file://"; ///+ if( path.at( 0 ) != '/' ) ///+ path.push_front( '/' ); ///+ src += path; ///+ } ///+
Git commit cbeb5a0e7e9c4f7a0defed8a87fb309618130317 by Dennis Nienhüser. Committed on 22/04/2013 at 22:04. Pushed by nienhueser into branch 'master'. Use QUrl to generate URLs from local filenames. This should fix URL generation on windows, where e.g. c:/foo should be file:///c:/foo, not file://c:/foo. M +1 -1 src/lib/MarbleLegendBrowser.cpp http://commits.kde.org/marble/cbeb5a0e7e9c4f7a0defed8a87fb309618130317