GNOME Bugzilla – Bug 694194
git: crash in git_log_data_command_run
Last modified: 2013-02-19 23:00:24 UTC
When switching branches from outside Anjuta I sometimes get the following crash. The problem seems to be that the command instance is finalized before git_log_data_command_run() has finished executing. I've attached two patches that should fix this.
Created attachment 236810 [details] [review] libanjuta: keep a ref on the AnjutaAsyncCommand when its thread is run
Created attachment 236811 [details] [review] git: use g_signal_connect_object() in GitLogCommand Use g_signal_connect_object() in GitLogCommand to connect to the signals on GitLogDataCommand. This way the signals will be disconnected when GitLogCommand is disposed. The signals need to be disconnected since the GitLogDataCommand may not be finalized when GitLogCommand releases its reference to it.
Created attachment 236843 [details] [review] git: use g_signal_connect_object() to connect to commands in GitLogPane
So to get this completely correct we probably have to change all places that connect to a GitCommand signal to use g_signal_connect_object().
Review of attachment 236811 [details] [review]: OK
Review of attachment 236810 [details] [review]: OK
Review of attachment 236843 [details] [review]: OK
(In reply to comment #4) > So to get this completely correct we probably have to change all places that > connect to a GitCommand signal to use g_signal_connect_object(). Could you check that? Otherwise thanks for you patches, they should make things a bit more solid!
*** Bug 605731 has been marked as a duplicate of this bug. ***
Attachment 236810 [details] pushed as ccef579 - libanjuta: keep a ref on the AnjutaAsyncCommand when its thread is run Attachment 236811 [details] pushed as 275d5ef - git: use g_signal_connect_object() in GitLogCommand Attachment 236843 [details] pushed as d265d89 - git: use g_signal_connect_object() to connect to commands in GitLogPane