https://issues.qgis.org/https://issues.qgis.org/favicon.ico2013-03-27T10:11:07ZQGIS Issue TrackingQGIS Application - Bug report #7458: QGIS crashes when starting with a project while loading print composershttps://issues.qgis.org/issues/7458?journal_id=396742013-03-27T10:11:07ZLarry Shaffer
<ul></ul><p>Hi Andreas,</p>
<p>Can not confirm on Mac.</p>
<p>Does this happen consistently for the projects that do crash?</p>
<p>Try this: in Options->General set the 'Open project on launch' to 'Most recent' and apply settings; then, open the problem project manually. On next launch (just launching app, not from file) QGIS should auto-open the most recent project. Please let me know if it crashes then.</p>
<p>You can also just set the 'Open project on launch' to 'Specific' and directly specify the project's path.</p>
<p>If it continues to crash (in either setup), subsequent launches should show a red (critical) message bar indicating that the auto-opening project could not be previously opened, and the Options->General set the 'Open project on launch' will be reset to 'New'.</p>
<p>This will help be determine if it the problem stems from the code I introduced there, or possibly something wrong in the new Composer GUI updates.</p>
<p>Also, do you already have 'Open project on launch' set to something other than New, then loading a project from the command line?</p> QGIS Application - Bug report #7458: QGIS crashes when starting with a project while loading print composershttps://issues.qgis.org/issues/7458?journal_id=396752013-03-27T10:22:30ZMatthias Kuhn
<ul></ul><p>Larry, the code crashing is not being compiled on Mac.</p>
<p>lines 4790 to 4793 in qgisapp.cpp</p>
<p>#ifndef Q_OS_MACX<br /> composer->setWindowState( Qt::WindowMinimized );<br /> composer->show();<br />#endif</p> QGIS Application - Bug report #7458: QGIS crashes when starting with a project while loading print composershttps://issues.qgis.org/issues/7458?journal_id=396762013-03-27T10:28:59ZLarry Shaffer
<ul></ul><p>Matthias Kuhn wrote:</p>
<blockquote>
<p>Larry, the code crashing is not being compiled on Mac.</p>
<p>lines 4790 to 4793 in qgisapp.cpp</p>
<p>#ifndef Q_OS_MACX<br />composer->setWindowState( Qt::WindowMinimized );<br />composer->show();<br />#endif</p>
</blockquote>
<p>Ok, I updated that code and tested on Ubuntu and Win 7, but maybe my test composers wern't complicated enough (or something like that). Could you try "reverting that change in the commit":commit:160a5c47273a8052c7155e451961be379f63264e#src/app/qgisapp.cpp, and see if that helps?</p> QGIS Application - Bug report #7458: QGIS crashes when starting with a project while loading print composershttps://issues.qgis.org/issues/7458?journal_id=396772013-03-27T10:32:17ZMatthias Kuhn
<ul></ul><p>No. Still crashes...</p> QGIS Application - Bug report #7458: QGIS crashes when starting with a project while loading print composershttps://issues.qgis.org/issues/7458?journal_id=396782013-03-27T10:33:34ZAndreas Neumann
<ul><li><strong>Crashes QGIS or corrupts data</strong> changed from <i>No</i> to <i>Yes</i></li></ul><p>Will have to test tomorrow at work - I am at home now and do not have the projects at hand. I wasn't aware about this new setting "Open project on launch" - so I did not use that (knowingly).</p>
<p>We had a similar problem some time ago, which was fixed by you (I did not report a bug - just mentioned it on the qgis-dev list) - then the problem was gone. Now there seems to be a regression.</p>
<p>See e-mail thread at <a class="external" href="http://lists.osgeo.org/pipermail/qgis-developer/2013-February/024469.html">http://lists.osgeo.org/pipermail/qgis-developer/2013-February/024469.html</a><br />and your fix at<br /><a class="changeset" href="https://issues.qgis.org/projects/qgis/repository/revisions/cc0c2b1853d1608a43845b05dd9677b6eb8f03db" title="Fix crash when loading a project that hits a group box with 'collapse' set">cc0c2b1853d1608a43845b05dd9677b6eb8f03db</a></p>
<p>Maybe this is related?</p>
<p>Will do more tests tomorrow.</p> QGIS Application - Bug report #7458: QGIS crashes when starting with a project while loading print composershttps://issues.qgis.org/issues/7458?journal_id=396792013-03-27T10:36:08ZLarry Shaffer
<ul></ul><p>Matthias Kuhn wrote:</p>
<blockquote>
<p>No. Still crashes...</p>
</blockquote>
<p>And when you comment those lines out?</p> QGIS Application - Bug report #7458: QGIS crashes when starting with a project while loading print composershttps://issues.qgis.org/issues/7458?journal_id=396802013-03-27T12:11:38ZMarco Hugentoblermarco.hugentobler@sourcepole.ch
<ul></ul><p>No crash for me here on KDE / Kubuntu 12.04</p> QGIS Application - Bug report #7458: QGIS crashes when starting with a project while loading print composershttps://issues.qgis.org/issues/7458?journal_id=396812013-03-27T12:18:40ZMatthias Kuhn
<ul></ul><p>The problem is related to svg symbol loading ( <a class="changeset" href="https://issues.qgis.org/projects/qgis/repository/revisions/34f3d50099c7e90e614fc68a5ebe37c9bd04cae0" title="Fix missing SVG previews for existing composer picture item - Previews now load when picture is ...">34f3d50099c7e90e614fc68a5ebe37c9bd04cae0</a> )<br />details have been discussed on #qgis and Larry is currently working on a patch</p>
<p>No need for further investigation. Sorry for not updating this topic.</p> QGIS Application - Bug report #7458: QGIS crashes when starting with a project while loading print composershttps://issues.qgis.org/issues/7458?journal_id=396842013-03-27T18:57:15ZLarry Shaffer
<ul></ul><p>Ok, I think this may work (I can't get anything to crash on launch with project from command line, so... ):</p>
<p><a class="external" href="https://github.com/dakcarto/Quantum-GIS/tree/fix_7458_2">https://github.com/dakcarto/Quantum-GIS/tree/fix_7458_2</a></p>
<p>Please test. It's not ideal. The repetitive loading of the same SVG previews for every composer picture is what is slowing things down (and the need for the busy indicator), especially on Mac. The SVG preview list widget should be moved to model-view setup or a shared cache. (Don't have time to do that this week, myself.)</p> QGIS Application - Bug report #7458: QGIS crashes when starting with a project while loading print composershttps://issues.qgis.org/issues/7458?journal_id=396862013-03-27T23:14:29ZMatthias Kuhn
<ul></ul><p>This fix works here (just gave it a short test and no crash).</p> QGIS Application - Bug report #7458: QGIS crashes when starting with a project while loading print composershttps://issues.qgis.org/issues/7458?journal_id=402982013-04-18T04:42:20ZMatthias Kuhn
<ul><li><strong>Assignee</strong> set to <i>Larry Shaffer</i></li></ul><p>Larry, did you merge this branch?</p> QGIS Application - Bug report #7458: QGIS crashes when starting with a project while loading print composershttps://issues.qgis.org/issues/7458?journal_id=402992013-04-18T05:12:29ZLarry Shaffer
<ul></ul><p>Well, I could but it is not a good solution, more a band-aid, loading all SVG previews for all composer picture items (can be very slow if there are a lot) <em>before</em> the composer is shown.</p>
<p>Recently I pulled the <a href="https://github.com/qgis/Quantum-GIS/blob/master/src/gui/symbology-ng/qgssvgselectorwidget.h" class="external"><strong>SVG selector</strong> for symbology out into its own class</a> to use in the label background settings, which, if edited further will offer a much better and basically permanent fix.</p>
<p><strong>Here is what needs done to the class</strong>:</p>
<ul>
<li>Allow passing in already constructed QgsSvgSelectorListModel and QgsSvgSelectorGroupsModel. This will allow a base SVG and groups model that can be constructed in QgisApp or QgsComposer, independent of the views.</li>
</ul>
<ul>
<li>Add a get/setter for retrieving/adding SVG search paths. This way, any instance of the views can offer the ability to edit the search paths.</li>
</ul>
<ul>
<li>Add a parameter for construction that builds the widget in code instead (currently a .ui file), offering the option for horizontal (side-by-side) or vertical (groups above SVG listing) generation of the layout. This way the widget can be dropped in and easily configured for horizontal- or vertical-aspect-prominent dialogs.</li>
</ul>
<p>Shouldn't take too long, and could possibly be done under the concept of fixing this bad bug. Unfortunately, I don't have the time prior to 2.0.</p>
<p><strong>Then, here's what can be done in the Print Composer</strong>:</p>
<ul>
<li>Add the widget to composer's picture item panel, setting its orientation to vertical (groups above SVG listing).</li>
</ul>
<ul>
<li>On construction of the composer, the SVG selector widget for each composer picture item added to the QGraphicsScene does not need to load all of the SVG previews, just reference the existing model. This should be a much better model-view approach and not take long to load.</li>
</ul>
<ul>
<li>Composer uses a set of special SVG paths in addition to the base search paths. This could be continued by utilizing the get/setter for the search paths. However, I think it is odd that there are search paths only available in the composer, and that the functionality be dropped in favor of only the paths that can be defined in the Options dialog, or added to the base search paths, if it is not.</li>
</ul>
<p>Additionally, the SVG selector widget could have simple + and - buttons (or just one that says 'search paths', etc.) that pops up the SVG paths editor. All of this could be tied into remote repositories for SVGs as well, etc. like gradients in symbology.</p>
<p>Also, the SVG selector widget needs 'backported' to the symbology code, which I did not edit, so changes to the selector are available there as well. And, if the models are part of QgisApp, then the new label backgrounds SVG selector can be quickly adapted to use them as well.</p> QGIS Application - Bug report #7458: QGIS crashes when starting with a project while loading print composershttps://issues.qgis.org/issues/7458?journal_id=409432013-05-14T23:21:17ZAndreas Neumann
<ul></ul><p>Here is a dump-file from a crash when loading one of my projects by double-clicking the file in Windows explorer.</p> QGIS Application - Bug report #7458: QGIS crashes when starting with a project while loading print composershttps://issues.qgis.org/issues/7458?journal_id=409442013-05-14T23:35:36ZLarry Shaffer
<ul></ul><p>Hi Andreas,</p>
<p>In the labeling gui redesign branch I'm about to finish (today or tomorrow), I have reworked QgsSvgSelectorWidget to be a standalone SVG selector dialog. This aided in getting a data defined SVG setup for label backgrounds.</p>
<p>While this doesn't implement the better 'base SVG and groups model' idea noted above, it does offer a solid solution for this issue for 2.0. However, it does mean that the SVG previews will not be shown as they are now. There will be a line edit for SVG file path (already there), then a button to pop up the SVG selector. This essentially bypasses the issue, since the SVG previews are only ever loaded on user's interactive choice.</p>
<p>The SVG selector dialog does have signals available, so it is still possible to have a live update of the picture on the Composer canvas upon just selecting an SVG preview in the detached dialog. It does introduce an initial extra click to open the dialog and another to close it.</p> QGIS Application - Bug report #7458: QGIS crashes when starting with a project while loading print composershttps://issues.qgis.org/issues/7458?journal_id=409452013-05-14T23:54:38ZAndreas Neumann
<ul></ul><p>Hi Larry,</p>
<p>This sounds fine. I think it is not problem that there is an extra step for selecting the SVG symbol. Selecting an SVG for a symbol definition or composer is not a step that is done very often.</p>
<p>Would this also mean that the project loading would be a bit faster? I see that a lot of time is spent going through the SVG symbol library after the project loaded.</p>
<p>Thank you a lot for your work! Looking forward to see this fixed.</p>
<p>Andreas</p> QGIS Application - Bug report #7458: QGIS crashes when starting with a project while loading print composershttps://issues.qgis.org/issues/7458?journal_id=412512013-05-27T04:06:43ZAndreas Neumann
<ul></ul><p>I tried with the current master (which should have your revision you mention above, Larry?) and QGIS still crashes on program load.</p> QGIS Application - Bug report #7458: QGIS crashes when starting with a project while loading print composershttps://issues.qgis.org/issues/7458?journal_id=412622013-05-27T11:33:26ZLarry Shaffer
<ul></ul><p>Hi Andreas,</p>
<p>The fix is not pushed to master yet. I should be able to do that sometime this week. Sorry for the delay.</p> QGIS Application - Bug report #7458: QGIS crashes when starting with a project while loading print composershttps://issues.qgis.org/issues/7458?journal_id=415612013-06-01T14:00:02ZLarry Shaffer
<ul><li><strong>Status</strong> changed from <i>Open</i> to <i>Feedback</i></li></ul><p>Hi Andreas and Matthias,</p>
<p>Should work now, as an OK fix, with commit <a class="changeset" href="https://issues.qgis.org/projects/qgis/repository/revisions/e2bd04f39a9a05865dfc8d650269b454464031c5" title="Fix for #7458, project crashes when loaded from command line - Image selection previews now load...">e2bd04f</a>. Please test.</p> QGIS Application - Bug report #7458: QGIS crashes when starting with a project while loading print composershttps://issues.qgis.org/issues/7458?journal_id=416622013-06-02T22:28:50ZAndreas Neumann
<ul></ul><p>Hi Larry,</p>
<p>This looks very good.</p>
<p>I tested around 10 projects and do not get crashes anymore. The projects also load faster as the SVG preview generation is now postponed until the symbols are really needed.</p>
<p>And the annoying blinking in the SVG preview panel of the print composer is now gone.</p>
<p>Very nice - thank you for your work!</p>
<p>From my point of view we can close this bug.</p>
<p>Andreas</p> QGIS Application - Bug report #7458: QGIS crashes when starting with a project while loading print composershttps://issues.qgis.org/issues/7458?journal_id=416632013-06-02T22:31:54ZGiovanni Manghigiovanni.manghi@gmail.com
<ul><li><strong>Status</strong> changed from <i>Feedback</i> to <i>Closed</i></li><li><strong>Resolution</strong> set to <i>fixed</i></li></ul>