<div dir="ltr">Hi Dirk,<br><div class="gmail_extra"><br><div class="gmail_quote">On 11 July 2015 at 23:11, Dirk Hohndel <span dir="ltr"><<a href="mailto:dirk@hohndel.org" target="_blank">dirk@hohndel.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><span class="">On Sat, Jul 11, 2015 at 07:16:32PM +1000, Rick Walsh wrote:<br>
> Full output is:<br>
><br>
> fullpath /bitmaps/default_location.png results in<br>
> fullpath /bitmaps/empty.png results in<br>
<br>
</span>Yeah, so this is the one that used to cause you the crash.<br>
It somehow tried to open the default_location.png file before internally<br>
the paths were set up correctly. And then it didn't find the empty.png<br>
file, either, and went into infinite recursion.<br>
<br>
But this gives me something to work with to understand why it would do<br>
such a thing for you but not for me in my testing.<br>
<br>
Thanks for helping to track this down.<br>
<span class=""></span></blockquote><div><br></div><div>I think I've tracked down the problem.  The short answer is that the problem is me.  Quite clearly this has not been my weekend.  First my attempt at data collection exercise was foiled.  And by that I mean our lovely Melbourne winter made our seas too windy and/or rough for me to dive a wreck in the Ships' Graveyard, sitting 45m - perfect for my deco course.<br><br>I assume I must have had old files in my subsurface build directory so something was compiled without MARBLE_DATA_PATH defined, or MARBLE_DATA_PATH was set to something incorrect.<br></div><div><br></div><div>Now the long answer:<br></div><div>From MarbleDirs.cpp:<br><br><div style="margin-left:40px">QString MarbleDirs::path( const QString& relativePath )<br>{ <br>    QString  localpath = localPath() + '/' + relativePath;    // local path<br>    QString  systempath  = systemPath() + '/' + relativePath;    // system path<br><br>    QString fullpath = systempath;<br>...<br></div></div><div><br></div><div>And from running subsurface with the MarbelDirs::path() debugging:<br><br></div><div><div style="margin-left:40px">[rick@localhost build]$ ./subsurface  <br>fullpath /bitmaps/default_location.png results in  <br>fullpath /bitmaps/empty.png results in  <br>fullpath /maps/earth/srtm2/srtm2.dgml results in</div><br><br>This essentially says that systemPath() is returning empty.  So I added debugging lines to the MarbleDirs::systemPath() function to work out where it was going wrong (not a patch, just showing what I changed):<br></div><div><br><div style="margin-left:40px">QString MarbleDirs::systemPath()<br>{<br>    QString systempath;<br><br>#ifdef Q_OS_MACX<br>...<br>    if ( QFile::exists( systempath ) ){ <br>+    fprintf(stderr, "systempath returned: %s\n", qPrintable(systempath));<br>      return systempath;<br>    }<br>#endif   // mac bundle<br><br>// Should this happen before the Mac bundle already?<br>if ( !runTimeMarbleDataPath.isEmpty() ) {<br>+    fprintf(stderr, "runTimeMarbleDataPath returned: %s\n", qPrintable(runTimeMarbleDataPath));<br>    return runTimeMarbleDataPath;<br>}<br><br>#ifdef MARBLE_DATA_PATH<br>    //MARBLE_DATA_PATH is a compiler define set by cmake<br>    QString compileTimeMarbleDataPath(MARBLE_DATA_PATH);<br><br>    if(QDir(compileTimeMarbleDataPath).exists()) {<br>+    fprintf(stderr, "compileTimeMarbleDataPath returned: %s\n", qPrintable(compileTimeMarbleDataPath));<br>        return compileTimeMarbleDataPath;<br>    }<br>#endif  // MARBLE_DATA_PATH<br><br>-    return QDir( QCoreApplication::applicationDirPath() <br>    QString QDirString = QDir( QCoreApplication::applicationDirPath() <br><br>#if defined(QTONLY)<br>                     + QLatin1String( "/data" )<br>#else<br>                     + QLatin1String( "/../share/apps/marble/data" )<br>#endif<br>                     ).canonicalPath();<br>+    fprintf(stderr, "QDirString returned: %s\n", qPrintable(QDirString));<br>+    return QDirString;<br>}<br></div><br></div><div>With this compiled, the output was:<br></div><div><div style="margin-left:40px">[rick@localhost build]$ ./subsurface  <br>QDirString returned:  <br>fullpath /bitmaps/default_location.png results in  <br>QDirString returned:  <br>fullpath /bitmaps/empty.png results in  <br>QDirString returned:  <br>fullpath /maps/earth/srtm2/srtm2.dgml results in  <br>Map theme file does not exist: ""<br>QDirString returned:  <br>QDirString returned:  <br>QInotifyFileSystemWatcherEngine::addPaths: inotify_add_watch failed: No such file or directory<br>QDirString returned:  <br>runTimeMarbleDataPath returned: /home/rick/build/subsurface/build/marbledata<br>runTimeMarbleDataPath returned: /home/rick/build/subsurface/build/marbledata<br>runTimeMarbleDataPath returned: /home/rick/build/subsurface/build/marbledata<br>runTimeMarbleDataPath returned: /home/rick/build/subsurface/build/marbledata<br>runTimeMarbleDataPath returned: /home/rick/build/subsurface/build/marbledata<br>runTimeMarbleDataPath returned: /home/rick/build/subsurface/build/marbledata<br>runTimeMarbleDataPath returned: /home/rick/build/subsurface/build/marbledata<br>fullpath /home/rick/build/subsurface/build/marbledata/placemarks/cityplacemarks.kml results in  <br>runTimeMarbleDataPath returned: /home/rick/build/subsurface/build/marbledata<br>fullpath /home/rick/build/subsurface/build/marbledata/placemarks/cityplacemarks.cache results in  <br>runTimeMarbleDataPath returned: /home/rick/build/subsurface/build/marbledata<br></div><br></div><div>So something being executed early when Subsurface starts appears to have been compiled without MARBLE_DATA_PATH defined correctly.  So I nuked the contents of /home/rick/build/subsurface/build/, and rebuilt Subsurface (based on the build.sh script, but only building Subsurface because I didn't want to re-download Marble and lose the debugging lines).  Now it's running without a problem, and not even looking for empty.png.<br><div style="margin-left:40px"><br>[rick@localhost build]$ ./subsurface  <br>compileTimeMarbleDataPath returned: /home/rick/build/install-root/share/marble/data<br>compileTimeMarbleDataPath returned: /home/rick/build/install-root/share/marble/data<br>...<br>compileTimeMarbleDataPath returned: /home/rick/build/install-root/share/marble/data<br>runTimeMarbleDataPath returned: /home/rick/build/subsurface/build/marbledata<br>...<br>runTimeMarbleDataPath returned: /home/rick/build/subsurface/build/marbledata<br>fullpath /home/rick/build/subsurface/build/marbledata/placemarks/cityplacemarks.kml results in  <br>runTimeMarbleDataPath returned: /home/rick/build/subsurface/build/marbledata<br>fullpath /home/rick/build/subsurface/build/marbledata/placemarks/cityplacemarks.cache results in  <br>runTimeMarbleDataPath returned: /home/rick/build/subsurface/build/marbledata<br>...<br>runTimeMarbleDataPath returned: /home/rick/build/subsurface/build/marbledata<br>fullpath /home/rick/build/subsurface/build/marbledata/placemarks/baseplacemarks.kml results in  <br>runTimeMarbleDataPath returned: /home/rick/build/subsurface/build/marbledata<br>fullpath /home/rick/build/subsurface/build/marbledata/placemarks/baseplacemarks.cache results in  <br>runTimeMarbleDataPath returned: /home/rick/build/subsurface/build/marbledata<br>runTimeMarbleDataPath returned: /home/rick/build/subsurface/build/marbledata<br></div>  </div><div>Just to be sure, I created an entirely new directory to fetch Subsurface and run build.sh.  It works fine.  Sorry for the noise.<br><br></div><div>Cheers,<br><br></div><div>Rick<br></div><div><br></div></div></div></div>