Bug report #7006

New core QgsOfflineEditingPlugin crashing app on exit

Added by Larry Shaffer almost 12 years ago. Updated almost 12 years ago.

Status:Closed
Priority:Severe/Regression
Assignee:-
Category:C++ Plugins
Affected QGIS version:master Regression?:No
Operating System:Mac Easy fix?:No
Pull Request or Patch supplied:No Resolution:
Crashes QGIS or corrupts data:Yes Copied to github as #:16106

Description

On Mac, I get a EXC_BAD_ACCESS crash from the new moved-to-core QgsOfflineEditingPlugin when exiting QGIS.

See attached crash report of relevant info.

offline-editing-plugin_crash.txt Magnifier (1.82 KB) Larry Shaffer, 2013-01-17 08:32 AM

Associated revisions

Revision 8d063fb6
Added by Jürgen Fischer almost 12 years ago

fix #7006 (if you actually use it)

History

#1 Updated by Mathias Walker almost 12 years ago

Can you try removing

  delete mProgressDialog;

in QgsOfflineEditingPlugin::~QgsOfflineEditingPlugin() on line 49 of src/plugins/offline_editing/offline_editing_plugin.cpp?

#2 Updated by Larry Shaffer almost 12 years ago

  • Status changed from Open to In Progress

Yes, removing:

delete mProgressDialog;

does work, i.e., no more crash. Thanks.

#3 Updated by Jürgen Fischer almost 12 years ago

  • Status changed from In Progress to Closed

#4 Updated by Larry Shaffer almost 12 years ago

  • Status changed from Closed to Reopened

Hi Juergen,

That doesn't quite do it (though I thought it should). I still get the same destructor error. If I change the following (at line 74):

mProgressDialog = new QgsOfflineEditingProgressDialog( mQGisIface->mainWindow(), QgisGui::ModalDialogFlags );

to

mProgressDialog = new QgsOfflineEditingProgressDialog( 0, QgisGui::ModalDialogFlags );

all works well. I believe this is where the issue stems from. I tested the plugin with QgsOfflineEditingProgressDialog having no parent and it worked fine. Question is: when the plugin was moved into core, does mQGisIface->mainWindow() get deleted before or after the plugin?

It would be best for the dialog to have an app-based widget as a parent, so that the app's stylesheet can be inherited. What should be the dialog's parent in that case?

#5 Updated by Jürgen Fischer almost 12 years ago

  • Status changed from Reopened to Closed

Also available in: Atom PDF