After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 690676 - Crashes when clicking 'Refresh' after external file edit
Crashes when clicking 'Refresh' after external file edit
Status: RESOLVED DUPLICATE of bug 691090
Product: anjuta
Classification: Applications
Component: plugins: editor: gtksourceview
3.6.x
Other Linux
: Normal major
: ---
Assigned To: Johannes Schmid
Anjuta maintainers
Depends on:
Blocks:
 
 
Reported: 2012-12-23 17:34 UTC by John
Modified: 2013-01-03 23:37 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description John 2012-12-23 17:34:33 UTC
This is now the fourth of fifth time that Anjuta crashes after updating a file externally (in my case, using Glade2 for an older project).

The change is correctly detected, and the warning bar appears over the editor.
Clicking on 'Refresh' crashes Anjuta completely, not even saving last changes in editing, and IDE setup. This frequently means re-doing quite a bit of work. 
Normally, no info is shown at all.

Until now, I was not able to catch any useful info, but I've been running inside gdb for a couple of hours now, and finally got this:

(anjuta:7679): libanjuta-symbol-db-WARNING **: SQL execute_non_select failed: columns name, file_defined_id, file_position are not unique

(anjuta:7679): libanjuta-symbol-db-WARNING **: SQL execute_non_select failed: columns name, file_defined_id, file_position are not unique
[Thread 0x7fffb77fe700 (LWP 27314) exited]
[Thread 0x7fffd227a700 (LWP 27323) exited]
[Thread 0x7fffe58fa700 (LWP 27322) exited]
[Thread 0x7fffb6ffd700 (LWP 27313) exited]
[New Thread 0x7fffb6ffd700 (LWP 28803)]
[New Thread 0x7fffe58fa700 (LWP 28812)]
[New Thread 0x7fffd227a700 (LWP 28815)]
[Thread 0x7fffd227a700 (LWP 28815) exited]
[Thread 0x7fffe58fa700 (LWP 28812) exited]
[Thread 0x7fffb6ffd700 (LWP 28803) exited]

Program received signal SIGSEGV, Segmentation fault.
_gtk_source_buffer_source_mark_next (buffer=0x64026a0, mark=mark@entry=
    0x2353e00, category=category@entry=0x0) at gtksourcebuffer.c:1865
1865	gtksourcebuffer.c: No such file or directory.

Interesting is that the SQL warnings are back. I'll check later if I made
some mistake applying the patch, but I would not expect any error...

This is the backtrace:

  • #0 _gtk_source_buffer_source_mark_next
    at gtksourcebuffer.c line 1865
  • #1 gtk_source_mark_next
    at gtksourcemark.c line 228
  • #2 sourceview_reload_save_markers
    at sourceview.c line 482
  • #3 on_reload_dialog_response
    at sourceview.c line 520
  • #4 g_cclosure_marshal_VOID__INTv
    at gmarshal.c line 410
  • #5 _g_closure_invoke_va
    at gclosure.c line 840
  • #6 g_signal_emit_valist
    at gsignal.c line 3211
  • #7 g_signal_emit
    at gsignal.c line 3356
  • #8 _g_closure_invoke_va
    at gclosure.c line 840
  • #9 g_signal_emit_valist
    at gsignal.c line 3211
  • #10 g_signal_emit
    at gsignal.c line 3356
  • #11 gtk_real_button_released
    at gtkbutton.c line 1967
  • #12 _g_closure_invoke_va
    at gclosure.c line 840
  • #13 g_signal_emit_valist
    at gsignal.c line 3211
  • #14 g_signal_emit
    at gsignal.c line 3356
  • #15 gtk_button_button_release
    at gtkbutton.c line 1802
  • #16 gtk_button_button_release
    at gtkbutton.c line 1794
  • #17 _gtk_marshal_BOOLEAN__BOXEDv
    at gtkmarshalers.c line 130
  • #18 _g_closure_invoke_va
    at gclosure.c line 840
  • #19 g_signal_emit_valist
    at gsignal.c line 3211
  • #20 g_signal_emit
    at gsignal.c line 3356
  • #21 gtk_widget_event_internal
    at gtkwidget.c line 6301
  • #22 gtk_widget_event
    at gtkwidget.c line 5958
  • #23 propagate_event_up
    at gtkmain.c line 2397
  • #24 propagate_event
    at gtkmain.c line 2497
  • #25 gtk_main_do_event
    at gtkmain.c line 1720
  • #26 gdk_event_source_dispatch
    at gdkeventsource.c line 358
  • #27 g_main_dispatch
    at gmain.c line 2715
  • #28 g_main_context_dispatch
    at gmain.c line 3219
  • #29 g_main_context_iterate
    at gmain.c line 3290
  • #30 g_main_context_iteration
    at gmain.c line 3351
  • #31 g_application_run
    at gapplication.c line 1624
  • #32 main
    at main.c line 211

Comment 1 John 2012-12-26 04:21:03 UTC
I have the impression that these crashes only happen when in a debugging
session in Anjuta. I took care this didn't happen, and had no more
crashes, while I had three while debugging.
Comment 2 Johannes Schmid 2012-12-26 09:33:17 UTC
I looked at the code but it seems to be a prior memory corruption so I am unsure this is really related to the sourceview plugin.
Comment 3 John 2012-12-29 16:00:54 UTC
I had no crashes at all while using Scintilla for a week, and sent back to GtkSourceview because of the impossibility of setting the tab-width. I've used it for less than 24 hours, and got another crash:

(anjuta:15716): GtkSourceView-CRITICAL **: modified_changed_handler: assertion `action != NULL' failed
[New Thread 0x7fffd1a78700 (LWP 4630)]

Program received signal SIGSEGV, Segmentation fault.
_gtk_source_buffer_source_mark_next (buffer=0x20a18f0, mark=mark@entry=
    0x3a05400, category=category@entry=0x0) at gtksourcebuffer.c:1865
1865		while (mark != g_array_index (buffer->priv->source_marks, GtkSourceMark *, idx))

The backtrace is exactly the same as the previous one. To be sure, this is
a freshly compiled and installed GtkSourceView.
Comment 4 Johannes Schmid 2013-01-03 23:37:21 UTC
The code paths goes away with the patch in bug 691090 so I assume that should also fix the problem as it avoids any idle handlers that might cause timing issues.

*** This bug has been marked as a duplicate of bug 691090 ***