GNOME Bugzilla – Bug 307237
possible to get "Do you wish to reload crashed applet?" too early
Last modified: 2005-06-11 06:29:47 UTC
During the process of adding an applet to the panel there is a whole whack of CORBA stuff that needs to happen in order. If any one of these things fails then the panel destroys what it has done so far and presents a message like: -------------------------------------------------------------------------- The panel encountered a problem while loading "OAFIID:GNOME_MixerApplet". Do you want to delete the applet from your configuration? [ Don't Delete ] [ Delete ] -------------------------------------------------------------------------- Half way through all of this CORBA stuff, ORBit_small_listen_for_broken is called to register the dialog that pops up when the applet normally quits (ie: not the one above, but rather, this one:) ------------------------------------------------------- "Volume Control" has quit unexpectedly If you reload a panel object, i twill automatically be added back to the panel. [ Don't Reload ] [ Reload ] ------------------------------------------------------- If an applet you're loading gets far enough to have this dialog registered but doesn't make it all the way (ie: fails one of the checks after the dialog is registered) then you get two error dialogs (one spawned by ORBit, and one invokved manually from the failure-check code). In addition to this, because of the cleanup that is done by the failure-check code, the 'data' pointer for the response callback on the second dialog now points to something that has been free'd (and causes the panel to crash about 20-30% of the time). To test: run the mixer applet with environment G_DEBUG="fatal_warnings". The mixer applet (current CVS HEAD) emits a warning message while the panel is in the part of the code that will cause the two dialogs to be thrown.
Created attachment 47591 [details] [review] patch of time This patch simply moves this call: ORBit_small_listen_for_broken (object, G_CALLBACK (panel_applet_frame_cnx_broken), frame); to later on in the initialisation process (after all things that can fail).
Thanks