GNOME Bugzilla – Bug 358583
close any project => crash
Last modified: 2009-08-15 18:40:50 UTC
Steps to reproduce: 1. Use the application wizard to create a new generic project, accepting all defaults 2. Choose File / Close Project to close the project. Anjuta will crash. This worked fine until recently; changes in the last few days must have broken this. Stack trace:
+ Trace 73771
Thread 1 (Thread -1224173888 (LWP 4006))
Other information:
That's apparently my fault. I couldn't reproduce it, I have kind of fixed something that might be causing it to crash, Please confirm it is indeed fixed now.
I'm still seeing this crash, so I'm reopening this. I debugged a bit to see what's going on here. In project_manager_plugin_close_project(), the call to anjuta_shell_get() is failing to find an object named "document_manager". Note that when anjuta_shell_get() fails to find a value, it does *not* set the value to NULL (anjuta_shell_get() calls anjuta_shell_get_valist(); when this function sees an error, it breaks out of its loop without setting a NULL value). So after anjuta_shell_get() returns we have a garbage value in docman. The test "if (docman)" succeeds, but then the following call IANJUTA_DOCUMENT_MANAGER (docman) crashes. If I change "GObject *docman;" to "GObject *docman = NULL;" in project_manager_plugin_close_project() then the crash goes away. One thing puzzles me here. I don't see how the call to anjuta_shell_get() could *ever* find an object "document_manager", because I can't seem to find any place in the code where such an object is registered. When I search globally for the string ["document_manager"] then I find only this one instance. Where are we adding the document manager object to the shell values list?
Okay, it's now really fixed :)
Closing all fixed bugs. Sorry for the mass update :( ...