https://issues.qgis.org/https://issues.qgis.org/favicon.ico2012-05-14T22:17:39ZQGIS Issue TrackingQGIS Application - Bug report #5597: External URL access via PyQt crashes QGIS on Mac OS Xhttps://issues.qgis.org/issues/5597?journal_id=318972012-05-14T22:17:39ZGiovanni Manghigiovanni.manghi@gmail.com
<ul><li><strong>Status</strong> changed from <i>Open</i> to <i>Feedback</i></li></ul><p>If this is a regression since 1.7.4 please tag this as blocker. I cannot test myself as I have not access to a Mac.</p> QGIS Application - Bug report #5597: External URL access via PyQt crashes QGIS on Mac OS Xhttps://issues.qgis.org/issues/5597?journal_id=319242012-05-15T03:19:42ZLarry Shaffer
<ul></ul><p>Giovanni Manghi wrote:</p>
<blockquote>
<p>If this is a regression since 1.7.4 please tag this as blocker.</p>
</blockquote>
<p>How do I change the status to blocker? I can find no method to do so. Maybe I do not have those privileges.</p> QGIS Application - Bug report #5597: External URL access via PyQt crashes QGIS on Mac OS Xhttps://issues.qgis.org/issues/5597?journal_id=319262012-05-15T06:01:33ZGiovanni Manghigiovanni.manghi@gmail.com
<ul><li><strong>Priority</strong> changed from <i>High</i> to <i>Severe/Regression</i></li></ul><p>Larry Shaffer wrote:</p>
<blockquote>
<p>Giovanni Manghi wrote:</p>
<blockquote>
<p>If this is a regression since 1.7.4 please tag this as blocker.</p>
</blockquote>
<p>How do I change the status to blocker? I can find no method to do so. Maybe I do not have those privileges.</p>
</blockquote>
<p>so it is confirmed is a regression?</p> QGIS Application - Bug report #5597: External URL access via PyQt crashes QGIS on Mac OS Xhttps://issues.qgis.org/issues/5597?journal_id=319322012-05-15T06:54:58ZLarry Shaffer
<ul></ul><p>I have tested it on latest 1.8 under Mac OS X 10.7.3, too. Also crashes.</p>
<p>Here is where William Kyngesburye mentioned it also crashed his build:<br /><a class="external" href="http://osgeo-org.1560.n6.nabble.com/Config-fails-on-find-of-spatialindex-library-tp4939392p4941036.html">http://osgeo-org.1560.n6.nabble.com/Config-fails-on-find-of-spatialindex-library-tp4939392p4941036.html</a></p>
<p>I would be more comfortable having some other Mac users confirming this, with latest 1.8 RC, before setting the issue to blocker.</p>
<p>I'm no C++ coder, but, if I were to guess, I think it might be an incompatibility of Qt 4.8.1 on Mac, possibly with some networking routines, like src/core/qgsnetworkaccessmanager.cpp (though I don't use a proxy). 1.7.4 on Mac used Qt 4.8.0.</p>
<p>Note: similar PyQt QWebView/QUrl functions (like a HTML help browser I am working on for QGIS) work fine with Qt 4.8.1 when run <em>outside</em> of the QGIS.app 1.8 RC bundle, which is created from the same Qt install.</p> QGIS Application - Bug report #5597: External URL access via PyQt crashes QGIS on Mac OS Xhttps://issues.qgis.org/issues/5597?journal_id=319582012-05-17T21:13:51ZMarco Hugentoblermarco.hugentobler@sourcepole.ch
<ul><li><strong>Priority</strong> changed from <i>Severe/Regression</i> to <i>High</i></li></ul><p>That looks like a packaging or Qt compilation problem on OS X. Therefore I think it should not be classified as a blocker.</p> QGIS Application - Bug report #5597: External URL access via PyQt crashes QGIS on Mac OS Xhttps://issues.qgis.org/issues/5597?journal_id=319592012-05-17T21:29:53ZLarry Shaffer
<ul></ul><p>Hi Marco,</p>
<p>I agree that it should just be classified as high until more testing can show if QGIS src to be the cause. I'll test the compilation under 10.6.8/Qt 4.7.4 to see if it reappears.</p>
<p>It does not occur with 1.8 RC under Ubuntu 11.10/Qt 4.7.4 (compiled and tested today).</p> QGIS Application - Bug report #5597: External URL access via PyQt crashes QGIS on Mac OS Xhttps://issues.qgis.org/issues/5597?journal_id=319712012-05-18T08:02:35ZLarry Shaffer
<ul></ul><p>Ok, I tested under 10.6.8/Qt 4.7.4 with no issues (external URLs loaded fine in QWebViews).</p>
<p>To remove PyQt from the equation (when compiling against Qt 4.8.1), I added/linked a QWebView into one of the C++ plugin's forms and connected one it buttons to load <a class="external" href="http://www.qgis.org">http://www.qgis.org</a> into the web view when clicked. Results: same as with PyQt, crashes QGIS immediately. So, it seems to have nothing to do with the Python bindings or bundling.</p>
<p>Will now look into any recent changes in Qt bundling/linking that might be an issue for 4.8.1, but not 4.7.4.</p> QGIS Application - Bug report #5597: External URL access via PyQt crashes QGIS on Mac OS Xhttps://issues.qgis.org/issues/5597?journal_id=319802012-05-19T01:23:05ZMartin Dobiaswonder.sk@gmail.com
<ul></ul><p>Does that code produce a crash also outside of QGIS environment?</p> QGIS Application - Bug report #5597: External URL access via PyQt crashes QGIS on Mac OS Xhttps://issues.qgis.org/issues/5597?journal_id=319832012-05-19T05:23:10ZLarry Shaffer
<ul></ul><p>Hi Martin,</p>
<blockquote>
<p>Does that code produce a crash also outside of QGIS environment?</p>
</blockquote>
<p>Not with PyQt. My help browser works fine while testing in Eric4 IDE. I'm too much of a C++ neophyte to test in a separate program outside QGIS. It also works fine when tested with Qt 4.8.0 (QGIS Mac ver. 1.7.4-4). It seems to be some kind of incompatibility or missing component with bundling specific to Qt 4.8.1.</p>
<p>There have been some changes in QNetwork with 4.8.1, mostly mobile stuff, so I tried bundling/relinking the .dyld 'bearer' Qt plugins, but that didn't make a difference. That's the only missing network stuff not bundled/relinked that I could see.</p>
<p><a class="external" href="http://qt-project.org/doc/qt-4.8/bearer-management.html">http://qt-project.org/doc/qt-4.8/bearer-management.html</a></p>
<p>Also, Qt-bundled WebKit version was increased with 4.8.1:</p>
<p><a class="external" href="http://qt.nokia.com/products/changes/changes-4.8.1/">http://qt.nokia.com/products/changes/changes-4.8.1/</a></p>
<p>This appears to happen <em>whenever an external URL resource is requested</em>, regardless of C++ or Python binding. Here with OpenLayers plugin:<br />#5027</p>
<p>Not sure how many plugins/tools use external URL resources, but I'd guess it would be enough to hamper many Mac user's experience with QGIS, especially if their projects already include plugin layers like OpenLayers.</p>
<p>I'm starting to be at a loss for what to test next. Maybe install Qt debug libraries, but I have no knowledge of their use.</p> QGIS Application - Bug report #5597: External URL access via PyQt crashes QGIS on Mac OS Xhttps://issues.qgis.org/issues/5597?journal_id=320182012-05-21T02:04:05ZLarry Shaffer
<ul></ul><p>Done some more research, and think I have maybe found where to look for the problem/fix. A core C++ dev will need to verify my guesstimation on whether QGIS source code is causing the issue. I think it may be, which means it may be a blocking issue for any QGIS compiled against Qt >= 4.8.1.</p>
<p>I now think this issue is the same problem causing the crashes of WMS and WFS connections as well (<a class="issue tracker-1 status-5 priority-5 priority- closed" href="https://issues.qgis.org/issues/5338" title="QGIS master crashes adding a WFS layer on OsX Snow Leopard (Closed)">#5338</a> for WFS issue ). I tested with the default WMS servers added, also a crash.</p>
<p><strong>QgsNetworkAccessManager incompatible with QNetworkAccessManager (4.8.1)?</strong></p>
<p>So here's my guess... According to this info on threads, there have been changes to QNetworkAccessManager.</p>
<p><a class="external" href="http://qt-project.org/wiki/Threads_Events_QObjects#605fc5d1bdd8d9f08192df140937a7c7">http://qt-project.org/wiki/Threads_Events_QObjects#605fc5d1bdd8d9f08192df140937a7c7</a></p>
<blockquote>
<p>As of Qt 4.8, QNetworkAccessManager now handles HTTP requests in a separate thread by default...</p>
</blockquote>
<p>The QgsNetworkAccessManager class looks like it re-implements QNetworkAccessManager to intercept QGIS network connections, allowing the insertion of proxy settings from app-level options (Network section of QGIS preferences, yes?). Maybe QgsNetworkAccessManager needs updated to jive with changes in Qt 4.8.1.</p>
<p>Does QgsNetworkAccessManager intercept <em>any external URL request</em> from within QGIS, including those from a QWebView in a plugin, or only those that have QgsNetworkAccessManager instantiated? If it does intercept all outgoing connections, it would explain a lot.</p>
<p>QgsNetworkAccessManager is utilized in the WMS and WFS providers, both of which are crashing the app on connection, but not always immediately.</p>
<p>If anyone on a platform other than Mac, that has QGIS 1.8 compiled against Qt 4.8.1, can test this issue, it would help. No sense looking for a possible incompatibility in QgsNetworkAccessManager unless necessary.</p> QGIS Application - Bug report #5597: External URL access via PyQt crashes QGIS on Mac OS Xhttps://issues.qgis.org/issues/5597?journal_id=320292012-05-21T07:19:35ZJohn Tull
<ul></ul><p>Let's hope you have found the source of the phantom crashes in trunk on OSX. Perhaps this is also related to the crashing open layers plugin, #5027.</p> QGIS Application - Bug report #5597: External URL access via PyQt crashes QGIS on Mac OS Xhttps://issues.qgis.org/issues/5597?journal_id=320512012-05-21T19:27:50ZLarry Shaffer
<ul></ul><p>Well, I just installed Ubuntu Pangolin 12.04 and loaded up QGIS 1.8, which is compiled against Qt 4.8.1 and it does not have the issue. In fact it works very well.</p>
<p>It appears to be Mac-only, when bundled in QGIS, and tied to QNetwork somehow. I don't see how QgsNetworkAccessManager could intercept plugins, just merely offer a different proxy setup. So, it apparently is falling prey to the same underlying connection issue. The OpenLayers plugin has its own proxy setup, and my test code (in initial issue report) has no proxy setup at all.</p>
<p>I browsed the commits on Qt 4.8.2 to see if there is a possible fix in the pipeline, regarding QNetworkAccessManager on Mac, and only came up with this:</p>
<p><a class="external" href="http://qt.gitorious.org/qt/qt/commit/ba166b618e2360d2fa7e927adf239d737a443f5a">http://qt.gitorious.org/qt/qt/commit/ba166b618e2360d2fa7e927adf239d737a443f5a</a></p>
<p>Since I have seen affected QWebViews actually load most of a page, and start rendering, just before they crash, it looks like the 'premature' quit() of the HTTP connection thread may be causing the crash (though unrelated to SSL, as in the above bug). Kind of a chore to compile Qt for Mac only to incorporate the 3 lines of 5-second waits, but it may do the trick.</p>
<p>I will load up a copy of Lion under Parallels and give it a try.</p> QGIS Application - Bug report #5597: External URL access via PyQt crashes QGIS on Mac OS Xhttps://issues.qgis.org/issues/5597?journal_id=320862012-05-22T10:13:42ZJohn Tull
<ul></ul><p>I can tell you that the crash still occurs with 4.8.2 installed on my machine, so it does not appear that the commit has fixed this. Unless you were suggesting something different from the linked commit you pointed out.</p> QGIS Application - Bug report #5597: External URL access via PyQt crashes QGIS on Mac OS Xhttps://issues.qgis.org/issues/5597?journal_id=320872012-05-22T10:24:44ZJürgen Fischerjef@norbit.de
<ul></ul><p>John Tull wrote:</p>
<blockquote>
<p>I can tell you that the crash still occurs with 4.8.2 installed on my machine, so it does not appear that the commit has fixed this. Unless you were suggesting something different from the linked commit you pointed out.</p>
</blockquote>
<p>Might <a class="external" href="https://gist.github.com/2771088">https://gist.github.com/2771088</a> help?</p> QGIS Application - Bug report #5597: External URL access via PyQt crashes QGIS on Mac OS Xhttps://issues.qgis.org/issues/5597?journal_id=320882012-05-22T10:45:05ZLarry Shaffer
<ul></ul><p>Jürgen Fischer wrote:</p>
<blockquote>
<p>Might <a class="external" href="https://gist.github.com/2771088">https://gist.github.com/2771088</a> help?</p>
</blockquote>
<p>Why, yes, it does! Wow, I was all over the place trying to find/fix that.</p>
<p><em>Can you explain your edit, please?</em></p>
<p>Here is the OpenLayers plugin working:<br /><a class="external" href="http://dl.dropbox.com/u/4058089/qgis/qt4.8.1-fix.png">http://dl.dropbox.com/u/4058089/qgis/qt4.8.1-fix.png</a></p>
<p>And my plugin's help browser working as well:</p>
<p><a class="external" href="http://dl.dropbox.com/u/4058089/qgis/qt4.8.1-fix-helpbrowser.png">http://dl.dropbox.com/u/4058089/qgis/qt4.8.1-fix-helpbrowser.png</a></p>
<p>Thank you very much, Jürgen!</p>
<p>Thanks for your help as well, John.</p> QGIS Application - Bug report #5597: External URL access via PyQt crashes QGIS on Mac OS Xhttps://issues.qgis.org/issues/5597?journal_id=320902012-05-22T11:19:45ZJürgen Fischerjef@norbit.de
<ul></ul><p>Larry Shaffer wrote:</p>
<blockquote>
<p>Jürgen Fischer wrote:</p>
<blockquote>
<p>Might <a class="external" href="https://gist.github.com/2771088">https://gist.github.com/2771088</a> help?</p>
</blockquote>
<p>Why, yes, it does! Wow, I was all over the place trying to find/fix that.</p>
<p><em>Can you explain your edit, please?</em></p>
</blockquote>
<p>The customization code tries to filter out events and apparently in some situations that causes a crash. We need to dig deeper to see what.</p>
<p>So we're not done - just starting to debug. Please revert the last patch and try this one: <a class="external" href="https://gist.github.com/2771300">https://gist.github.com/2771300</a><br />That might catch an exception instead of crashing and give some more info.</p> QGIS Application - Bug report #5597: External URL access via PyQt crashes QGIS on Mac OS Xhttps://issues.qgis.org/issues/5597?journal_id=320912012-05-22T12:09:31ZLarry Shaffer
<ul></ul><p>Jürgen Fischer wrote:</p>
<blockquote>
<p>So we're not done - just starting to debug.</p>
</blockquote>
<p>I was afraid you were going to say that.</p>
<blockquote>
<p>Please revert the last patch and try this one: <a class="external" href="https://gist.github.com/2771300">https://gist.github.com/2771300</a><br />That might catch an exception instead of crashing and give some more info.</p>
</blockquote>
<p>Sorry for the delay. I had to stash my changes and do a reset on my local git repository, then I could ensure I had the latest source from github.</p>
<p>No luck on catching an exception, just crashes again, with no more info in the log than original bug report.</p>
<p>Here is what that section of qgsapplication.cpp looks like after applying your diff:</p>
<pre>
bool QgsApplication::notify( QObject * receiver, QEvent * event )
{
bool done = false;
try
{
emit preNotify( receiver, event, &done );
if ( done )
return true;
// Send event to receiver and catch unhandled exceptions
done = true;
done = QApplication::notify( receiver, event );
}
catch ( QgsException & e )
{
QMessageBox::critical( activeWindow(), tr( "Exception" ), e.what() );
}
catch ( std::exception & e )
{
QMessageBox::critical( activeWindow(), tr( "Exception" ), e.what() );
}
catch ( ... )
{
QMessageBox::critical( activeWindow(), tr( "Exception" ), tr( "unknown exception.\
receiver: %1\
class: %2\
event: %3" )
.arg( receiver->objectName() )
.arg( receiver->metaObject()->className() )
.arg( event->type() )
);
}
return done;
}
</pre>
<p>I built QGIS with RelWithDebInfo, but still don't get anything useful output to log for the crash.</p> QGIS Application - Bug report #5597: External URL access via PyQt crashes QGIS on Mac OS Xhttps://issues.qgis.org/issues/5597?journal_id=320922012-05-22T12:21:34ZJürgen Fischerjef@norbit.de
<ul></ul><p>Larry Shaffer wrote:</p>
<blockquote>
<p>I built QGIS with RelWithDebInfo, but still don't get anything useful output to log for the crash.</p>
</blockquote>
<p>unfortunate - please try the updated gist. It'll probably produce loads of output. What's the last line?</p> QGIS Application - Bug report #5597: External URL access via PyQt crashes QGIS on Mac OS Xhttps://issues.qgis.org/issues/5597?journal_id=320932012-05-22T13:07:11ZLarry Shaffer
<ul><li><strong>File</strong> <a href="/attachments/download/4474/qgscustomization_system.log.txt">qgscustomization_system.log.txt</a><a href="/attachments/4474/qgscustomization_system.log.txt"><img alt="Magnifier" src="/images/magnifier.png" /></a> added</li></ul><p>Jürgen Fischer wrote:</p>
<blockquote>
<p>unfortunate - please try the updated gist. It'll probably produce loads of output. What's the last line?</p>
</blockquote>
<p>Attached file contains all logged events from around the last Python console entry (using code in original report for testing).</p> QGIS Application - Bug report #5597: External URL access via PyQt crashes QGIS on Mac OS Xhttps://issues.qgis.org/issues/5597?journal_id=320942012-05-22T13:11:12ZLarry Shaffer
<ul><li><strong>File</strong> <a href="/attachments/download/4475/QGIS_2012-05-22-155544_Larry-Ss-iMac.crash.txt">QGIS_2012-05-22-155544_Larry-Ss-iMac.crash.txt</a><a href="/attachments/4475/QGIS_2012-05-22-155544_Larry-Ss-iMac.crash.txt"><img alt="Magnifier" src="/images/magnifier.png" /></a> added</li></ul><p>Mac crash reporter report to go with last update.</p> QGIS Application - Bug report #5597: External URL access via PyQt crashes QGIS on Mac OS Xhttps://issues.qgis.org/issues/5597?journal_id=320952012-05-22T21:08:27ZJürgen Fischerjef@norbit.de
<ul></ul><p>Larry Shaffer wrote:</p>
<blockquote>
<p>Mac crash reporter report to go with last update.</p>
</blockquote>
<p>please try the updated gist.</p> QGIS Application - Bug report #5597: External URL access via PyQt crashes QGIS on Mac OS Xhttps://issues.qgis.org/issues/5597?journal_id=320962012-05-22T22:59:01ZLarry Shaffer
<ul><li><strong>File</strong> <a href="/attachments/download/4476/qgis_prenotify-fix.png">qgis_prenotify-fix.png</a> added</li></ul><p>Jürgen Fischer wrote:</p>
<blockquote>
<p>please try the updated gist.</p>
</blockquote>
<p>Yes, that works.</p>
<p>Do you think this stems from the HTTP connections running in separate thread? If so, I wonder why it didn't show up with Qt 4.8.0.</p>
<p>Hopefully it doesn't cause problems with anything using other threads. I'm aware of some Python plugins that use processing threads. I'm guessing those threads just can't be run through QgsCustomization. Probably not an issue, if they are non-gui?</p>
<p>I compiled this on my personal workstation (Mac Lion 10.7.3). Will try again in the morning at work with Snow Leopard 10.6.8.</p>
<p>WMS and WFS connections and layer loads appear to function as well. I did have a crash using WMS (DM Solutions server), but I think it was unrelated to this issue.</p> QGIS Application - Bug report #5597: External URL access via PyQt crashes QGIS on Mac OS Xhttps://issues.qgis.org/issues/5597?journal_id=320972012-05-22T23:05:55ZJürgen Fischerjef@norbit.de
<ul></ul><p>Larry Shaffer wrote:</p>
<blockquote>
<p>Do you think this stems from the HTTP connections running in separate thread? If so, I wonder why it didn't</p>
</blockquote>
<p>show up with Qt 4.8.0.</p>
<p>Maybe threads are now used more widely in Qt - dunno. Anyway, the customization stuff is all about the UI (Radim correct me, if I'm wrong). Therefore restricting the signal to stuff in the UI thread shouldn't do harm.</p> QGIS Application - Bug report #5597: External URL access via PyQt crashes QGIS on Mac OS Xhttps://issues.qgis.org/issues/5597?journal_id=320982012-05-22T23:45:43ZLarry Shaffer
<ul></ul><p>Posting results (and a link to your gist) to:</p>
<p><a class="issue tracker-1 status-5 priority-5 priority- closed" href="https://issues.qgis.org/issues/5338" title="QGIS master crashes adding a WFS layer on OsX Snow Leopard (Closed)">#5338</a><br />#5027</p>
<p>It may fix those issues as well. Also, be good to have more testing before committing.</p> QGIS Application - Bug report #5597: External URL access via PyQt crashes QGIS on Mac OS Xhttps://issues.qgis.org/issues/5597?journal_id=320992012-05-22T23:51:06ZJürgen Fischerjef@norbit.de
<ul></ul><p>Larry Shaffer wrote:</p>
<blockquote>
<p>It may fix those issues as well. Also, be good to have more testing before committing.</p>
</blockquote>
<p>Checking if the customization stuff (never used it so far) still works would be nice too.</p> QGIS Application - Bug report #5597: External URL access via PyQt crashes QGIS on Mac OS Xhttps://issues.qgis.org/issues/5597?journal_id=321042012-05-23T00:36:16ZLarry Shaffer
<ul></ul><p>Jürgen Fischer wrote:</p>
<blockquote>
<p>Checking if the customization stuff (never used it so far) still works would be nice too.</p>
</blockquote>
<p>After setting a custom configuration, clicking Apply does not work (live applies may not for Mac). Also, I get crashes on relaunch about 50% of the time.</p>
<p>However, I opened up a saved nightly archive QGIS.app from April and customizations appear to work/crash the same. After one crash, the app launches and the customizations are in effect.</p>
<p>The crashes are probably Mac Lion trying to (annoyingly) auto-reopen the previous session's windows, which are now different. It appears to be functional, barring the launch crashes, on 10.7. May work fine on 10.6.</p>
<p>So, your fix doesn't appear to cause any change, but that's the first time I have set any customizations.</p> QGIS Application - Bug report #5597: External URL access via PyQt crashes QGIS on Mac OS Xhttps://issues.qgis.org/issues/5597?journal_id=321052012-05-23T01:49:34ZRadim Blazekradim.blazek@gmail.com
<ul></ul><p>Jürgen Fischer wrote:</p>
<blockquote>
<p>Anyway, the customization stuff is all about the UI (Radim correct me, if I'm wrong). Therefore restricting the signal to stuff in the UI thread shouldn't do harm.</p>
</blockquote>
<p>Right. Should I add the <pre>thread() == receiver->thread()</pre> check to QgsCustomization::preNotify to keep it closer to where the problem appears?</p>
<p>We should probably add an enable/disable checkbox in customization dialog to disable it (by default) completely.</p>
<p>Sorry for problems.</p> QGIS Application - Bug report #5597: External URL access via PyQt crashes QGIS on Mac OS Xhttps://issues.qgis.org/issues/5597?journal_id=321062012-05-23T02:32:54ZJürgen Fischerjef@norbit.de
<ul></ul><p>Radim Blazek wrote:</p>
<blockquote>
<p>Right. Should I add the [...] check to QgsCustomization::preNotify to keep it closer to where the problem appears?</p>
</blockquote>
<p>I'm not sure that the slot is executed in the same thread. Signals can also be used for communication between threads. <code>QCoreApplication::instance()->thread() == receiver->thread()</code> is probably better there.</p>
<blockquote>
<p>We should probably add an enable/disable checkbox in customization dialog to disable it (by default) completely.</p>
</blockquote>
<p>Sounds good.</p> QGIS Application - Bug report #5597: External URL access via PyQt crashes QGIS on Mac OS Xhttps://issues.qgis.org/issues/5597?journal_id=321252012-05-23T07:23:07ZRadim Blazekradim.blazek@gmail.com
<ul><li><strong>Status</strong> changed from <i>Feedback</i> to <i>Closed</i></li></ul><p>Fixed in changeset <a class="changeset" href="https://issues.qgis.org/projects/qgis/repository/revisions/d77069d2b0e05cc1cac51efa56ba5a4327989076" title="check thread in customization, it should fix #5597">d77069d2b0e05cc1cac51efa56ba5a4327989076</a>.</p> QGIS Application - Bug report #5597: External URL access via PyQt crashes QGIS on Mac OS Xhttps://issues.qgis.org/issues/5597?journal_id=321262012-05-23T07:27:41ZRadim Blazekradim.blazek@gmail.com
<ul></ul><p>I have added the thread check in <a class="changeset" href="https://issues.qgis.org/projects/qgis/repository/revisions/d77069d2b0e05cc1cac51efa56ba5a4327989076" title="check thread in customization, it should fix #5597">d77069d2</a> , please test if it helps. For other 'normal' customization crashes please open another issue.</p> QGIS Application - Bug report #5597: External URL access via PyQt crashes QGIS on Mac OS Xhttps://issues.qgis.org/issues/5597?journal_id=321272012-05-23T07:28:25ZRadim Blazekradim.blazek@gmail.com
<ul><li><strong>Status</strong> changed from <i>Closed</i> to <i>Reopened</i></li></ul> QGIS Application - Bug report #5597: External URL access via PyQt crashes QGIS on Mac OS Xhttps://issues.qgis.org/issues/5597?journal_id=321282012-05-23T07:51:04ZJohn Tull
<ul><li><strong>File</strong> <a href="/attachments/download/4477/QGIS_2012-05-23-094658_Tull.crash">QGIS_2012-05-23-094658_Tull.crash</a> added</li></ul><p>Attached is my crash log with Radim's update applied. This crash was produced running the python code that Larry provided earlier in the thread. The OpenLayers plugin also produces a crash.</p> QGIS Application - Bug report #5597: External URL access via PyQt crashes QGIS on Mac OS Xhttps://issues.qgis.org/issues/5597?journal_id=321292012-05-23T07:51:27ZLarry Shaffer
<ul></ul><p>Radim Blazek wrote:</p>
<blockquote>
<p>I have added the thread check in <a class="changeset" href="https://issues.qgis.org/projects/qgis/repository/revisions/d77069d2b0e05cc1cac51efa56ba5a4327989076" title="check thread in customization, it should fix #5597">d77069d2</a> , please test if it helps. ...</p>
</blockquote>
<p>Hi, Radim. Unfortunately, moving the check to the slot does not fix. External HTTP access still crashes on Mac 10.7.3. Initial issue report, OpenLayers plugin, adding WMS or WFS layer all still cause crashes.</p>
<p>Maybe move check back to signal emit code, but possibly leave a comment in the slot about the check?</p>
<blockquote>
<p>We should probably add an enable/disable checkbox in customization dialog to disable it (by default) completely.</p>
</blockquote>
<p>I'm not understanding this. Do you see use cases where a user may want to turn off the check? Or, is this a "don't know now, but better leave it optional" type of setting?</p>
<blockquote>
<p>... For other 'normal' customization crashes please open another issue.</p>
</blockquote>
<p>I will test on Mac 10.6.8, to verify, before creating an issue.</p> QGIS Application - Bug report #5597: External URL access via PyQt crashes QGIS on Mac OS Xhttps://issues.qgis.org/issues/5597?journal_id=321302012-05-23T08:04:14ZLarry Shaffer
<ul></ul><p>Radim, instead of a checkbox, do you think that after applying this stopgap fix for 1.8 release maybe the QgsCustomization signal/slot setup could be adapted to switch to the proper receiver thread? This might allow the receiver to accept customizations even if in a different thread. Could be a lot of work for limited need.</p>
<p>I don't have experience with coding threads, though I think having the customization code working for all use cases (as originally designed) would be a good thing.</p> QGIS Application - Bug report #5597: External URL access via PyQt crashes QGIS on Mac OS Xhttps://issues.qgis.org/issues/5597?journal_id=321322012-05-23T08:08:50ZJürgen Fischerjef@norbit.de
<ul></ul><p>Larry Shaffer wrote:</p>
<blockquote>
<p>Maybe move check back to signal emit code, but possibly leave a comment in the slot about the check?</p>
</blockquote>
<p>Or like in <a class="changeset" href="https://issues.qgis.org/projects/qgis/repository/revisions/b600ff73572cae30d5bd245eae0b6fa7c36d9b1c" title="another take on #5597">b600ff7</a></p>
<blockquote>
<p>I'm not understanding this. Do you see use cases where a user may want to turn off the check? Or, is this a "don't know now, but better leave it optional" type of setting?</p>
</blockquote>
<p>That was just about disabling the customization in general by default - having no active customization is the default case, so the signal processing is useless most of the time anyway.</p> QGIS Application - Bug report #5597: External URL access via PyQt crashes QGIS on Mac OS Xhttps://issues.qgis.org/issues/5597?journal_id=321342012-05-23T08:18:04ZLarry Shaffer
<ul></ul><p>Jürgen Fischer wrote:</p>
<blockquote>
<p>Or like in <a class="changeset" href="https://issues.qgis.org/projects/qgis/repository/revisions/b600ff73572cae30d5bd245eae0b6fa7c36d9b1c" title="another take on #5597">b600ff7</a></p>
</blockquote>
<p>That fix does not work. Same crashes in PyQt code, OpenLayers plugin, adding WMS or WFS layer. WMS and WFS did connect, but maybe the server I was testing was cached somehow. Choosing a different server caused an immediate crash again on connect.</p>
<blockquote><blockquote>
<p>I'm not understanding this. Do you see use cases where a user may want to turn off the check? Or, is this a "don't know now, but better leave it optional" type of setting?</p>
</blockquote>
<p>That was just about disabling the customization in general by default - having no active customization is the default case, so the signal processing is useless most of the time anyway.</p>
</blockquote>
<p>Ok, now I understand.</p> QGIS Application - Bug report #5597: External URL access via PyQt crashes QGIS on Mac OS Xhttps://issues.qgis.org/issues/5597?journal_id=321352012-05-23T08:22:00ZJohn Tull
<ul><li><strong>File</strong> <a href="/attachments/download/4478/QGIS_2012-05-23-101745_Alita.crash">QGIS_2012-05-23-101745_Alita.crash</a> added</li></ul><p>Here is the crash report from the last update to the code.</p> QGIS Application - Bug report #5597: External URL access via PyQt crashes QGIS on Mac OS Xhttps://issues.qgis.org/issues/5597?journal_id=321362012-05-23T08:42:41ZJohn Tull
<ul></ul><p>It looks like this latest patch has fixed it, at least from my limited testing. Larry can test further and close it once he's put it through the paces also.</p> QGIS Application - Bug report #5597: External URL access via PyQt crashes QGIS on Mac OS Xhttps://issues.qgis.org/issues/5597?journal_id=321372012-05-23T08:42:45ZLarry Shaffer
<ul><li><strong>File</strong> <a href="/attachments/download/4479/qgis_prenotify_fix-860f66d-.png">qgis_prenotify_fix-860f66d-.png</a> added</li></ul><p>Jürgen, your take III (<a class="changeset" href="https://issues.qgis.org/projects/qgis/repository/revisions/860f66d3b48386a2c9dc41cdbdae794a9e482ffc" title="take III on #5597">860f66d</a>) works as before.</p>
<p>Attached screen snap shows OpenLayers, WMS and WFS layers, and QWebView all working.</p> QGIS Application - Bug report #5597: External URL access via PyQt crashes QGIS on Mac OS Xhttps://issues.qgis.org/issues/5597?journal_id=321412012-05-23T09:33:45ZJürgen Fischerjef@norbit.de
<ul><li><strong>Status</strong> changed from <i>Reopened</i> to <i>Resolved</i></li><li><strong>Resolution</strong> set to <i>fixed</i></li></ul> QGIS Application - Bug report #5597: External URL access via PyQt crashes QGIS on Mac OS Xhttps://issues.qgis.org/issues/5597?journal_id=321432012-05-23T09:36:13ZJürgen Fischerjef@norbit.de
<ul><li><strong>Status</strong> changed from <i>Resolved</i> to <i>Closed</i></li></ul> QGIS Application - Bug report #5597: External URL access via PyQt crashes QGIS on Mac OS Xhttps://issues.qgis.org/issues/5597?journal_id=321452012-05-23T10:05:19ZRadim Blazekradim.blazek@gmail.com
<ul></ul><p>Larry Shaffer wrote:</p>
<blockquote>
<p>Radim, instead of a checkbox, do you think that after applying this stopgap fix for 1.8 release maybe the QgsCustomization signal/slot setup could be adapted to switch to the proper receiver thread? This might allow the receiver to accept customizations even if in a different thread. Could be a lot of work for limited need.</p>
</blockquote>
<p>If customization crashes even with the last fix, then there must be some other problem, not related to threads. It is crashing in Qt core functions, I have no idea where is the problem. It is difficult to fix it blindly trying patches. It must be fixed by somebody on Mac.</p> QGIS Application - Bug report #5597: External URL access via PyQt crashes QGIS on Mac OS Xhttps://issues.qgis.org/issues/5597?journal_id=321482012-05-23T16:25:47ZLarry Shaffer
<ul></ul><p>Confirmed <a class="changeset" href="https://issues.qgis.org/projects/qgis/repository/revisions/860f66d3b48386a2c9dc41cdbdae794a9e482ffc" title="take III on #5597">860f66d</a> works for Mac OS X 10.6.8 as well.</p> QGIS Application - Bug report #5597: External URL access via PyQt crashes QGIS on Mac OS Xhttps://issues.qgis.org/issues/5597?journal_id=322092012-05-27T09:01:27ZLarry Shaffer
<ul></ul><p>Confirmed <a class="external" href="https://issues.qgis.org/projects/quantum-gis/repository/revisions/860f66d3b48386a2c9dc41cdbdae794a9e482ffc">https://issues.qgis.org/projects/quantum-gis/repository/revisions/860f66d3b48386a2c9dc41cdbdae794a9e482ffc</a> works with Mac OS X 10.7.4 and the new Qt 4.8.2.</p>