View Issue Details

IDProjectCategoryView StatusLast Update
0002046DarkRadiantScriptingpublic29.05.2010 16:36
Reportermattn Assigned Togreebo  
PrioritynormalSeveritycrashReproducibilityalways
Status closedResolutionfixed 
Product Version1.0.2 
Target Version1.1.0Fixed in Version1.1.0 
Summary0002046: segfault when hitting "Run Script" button without scripts
Descriptionsee the attached backtrace
Additional Information(darkradiant:12881): GtkSourceView-CRITICAL **: gtk_source_buffer_new_with_language: assertion `GTK_IS_SOURCE_LANGUAGE (language)' failed

(darkradiant:12881): GtkSourceView-CRITICAL **: gtk_source_buffer_set_highlight_syntax: assertion `GTK_IS_SOURCE_BUFFER (buffer)' failed

(darkradiant:12881): GtkSourceView-CRITICAL **: gtk_source_view_new_with_buffer: assertion `buffer != NULL && GTK_IS_SOURCE_BUFFER (buffer)' failed

(darkradiant:12881): Gtk-CRITICAL **: gtk_widget_set_size_request: assertion `GTK_IS_WIDGET (widget)' failed

(darkradiant:12881): Gtk-CRITICAL **: gtk_text_view_set_wrap_mode: assertion `GTK_IS_TEXT_VIEW (text_view)' failed

(darkradiant:12881): Gtk-CRITICAL **: gtk_text_view_set_editable: assertion `GTK_IS_TEXT_VIEW (text_view)' failed

(darkradiant:12881): GtkSourceView-CRITICAL **: gtk_source_view_set_show_line_numbers: assertion `view != NULL' failed

(darkradiant:12881): GtkSourceView-CRITICAL **: gtk_source_view_set_auto_indent: assertion `GTK_IS_SOURCE_VIEW (view)' failed

(darkradiant:12881): Gtk-CRITICAL **: gtk_widget_modify_font: assertion `GTK_IS_WIDGET (widget)' failed

(darkradiant:12881): GtkSourceView-CRITICAL **: gtk_source_view_set_tab_width: assertion `GTK_SOURCE_VIEW (view)' failed

(darkradiant:12881): GLib-GObject-WARNING **: invalid (NULL) pointer instance

(darkradiant:12881): GLib-GObject-CRITICAL **: g_signal_connect_data: assertion `G_TYPE_CHECK_INSTANCE (instance)' failed

(darkradiant:12881): Gtk-CRITICAL **: gtk_container_add: assertion `GTK_IS_WIDGET (widget)' failed

(darkradiant:12881): Gtk-CRITICAL **: gtk_text_buffer_get_bounds: assertion `GTK_IS_TEXT_BUFFER (buffer)' failed

(darkradiant:12881): Gtk-CRITICAL **: gtk_text_buffer_get_text: assertion `GTK_IS_TEXT_BUFFER (buffer)' failed
terminate called after throwing an instance of 'std::logic_error'
  what(): basic_string::_S_construct NULL not valid

Program received signal SIGABRT, Aborted.
0x00007ffff1a334b5 in *__GI_raise (sig=<value optimized out>) at ../nptl/sysdeps/unix/sysv/linux/raise.c:64
64 ../nptl/sysdeps/unix/sysv/linux/raise.c: No such file or directory.
    in ../nptl/sysdeps/unix/sysv/linux/raise.c
Current language: auto
The current source language is "auto; currently c".
(gdb) bt
#0 0x00007ffff1a334b5 in *__GI_raise (sig=<value optimized out>) at ../nptl/sysdeps/unix/sysv/linux/raise.c:64
0000001 0x00007ffff1a36f50 in *__GI_abort () at abort.c:92
0000002 0x00007ffff22d2cc5 in __gnu_cxx::__verbose_terminate_handler() () from /usr/lib/libstdc++.so.6
0000003 0x00007ffff22d10f6 in ?? () from /usr/lib/libstdc++.so.6
0000004 0x00007ffff22d1123 in std::terminate() () from /usr/lib/libstdc++.so.6
0000005 0x00007ffff22d121e in __cxa_throw () from /usr/lib/libstdc++.so.6
0000006 0x00007ffff2270ba7 in std::__throw_logic_error(char const*) () from /usr/lib/libstdc++.so.6
0000007 0x00007ffff22b0961 in ?? () from /usr/lib/libstdc++.so.6
#8 0x00007ffff22b0a82 in std::basic_string<char, std::char_traits<char>, std::allocator<char> >::basic_string(char const*, std::allocator<char> const&) () from /usr/lib/libstdc++.so.6
0000009 0x00007ffff706f122 in gtkutil::SourceView::getContents (this=0x7fffe921c1b0) at SourceView.cpp:94
0000010 0x00007fffe8f20d74 in script::ScriptWindow::onRunScript (button=<value optimized out>, self=0x7fffe921c160) at ScriptWindow.cpp:70
0000011 0x00007ffff4c705ae in g_closure_invoke () from /usr/lib/libgobject-2.0.so.0
0000012 0x00007ffff4c85983 in ?? () from /usr/lib/libgobject-2.0.so.0
0000013 0x00007ffff4c86d39 in g_signal_emit_valist () from /usr/lib/libgobject-2.0.so.0
0000014 0x00007ffff4c87283 in g_signal_emit () from /usr/lib/libgobject-2.0.so.0
0000015 0x00007ffff6455af5 in ?? () from /usr/lib/libgtk-x11-2.0.so.0
0000016 0x00007ffff4c705ae in g_closure_invoke () from /usr/lib/libgobject-2.0.so.0
0000017 0x00007ffff4c8529c in ?? () from /usr/lib/libgobject-2.0.so.0
0000018 0x00007ffff4c86d39 in g_signal_emit_valist () from /usr/lib/libgobject-2.0.so.0
0000019 0x00007ffff4c87283 in g_signal_emit () from /usr/lib/libgobject-2.0.so.0
0000020 0x00007ffff64547ad in ?? () from /usr/lib/libgtk-x11-2.0.so.0
0000021 0x00007ffff6503728 in ?? () from /usr/lib/libgtk-x11-2.0.so.0
0000022 0x00007ffff4c705ae in g_closure_invoke () from /usr/lib/libgobject-2.0.so.0
0000023 0x00007ffff4c8564d in ?? () from /usr/lib/libgobject-2.0.so.0
0000024 0x00007ffff4c86bcc in g_signal_emit_valist () from /usr/lib/libgobject-2.0.so.0
0000025 0x00007ffff4c87283 in g_signal_emit () from /usr/lib/libgobject-2.0.so.0
0000026 0x00007ffff660a72f in ?? () from /usr/lib/libgtk-x11-2.0.so.0
0000027 0x00007ffff64fbcd3 in gtk_propagate_event () from /usr/lib/libgtk-x11-2.0.so.0
0000028 0x00007ffff64fcca3 in gtk_main_do_event () from /usr/lib/libgtk-x11-2.0.so.0
0000029 0x00007ffff6171cdc in ?? () from /usr/lib/libgdk-x11-2.0.so.0
0000030 0x00007ffff47d3bbe in g_main_context_dispatch () from /lib/libglib-2.0.so.0
0000031 0x00007ffff47d7588 in ?? () from /lib/libglib-2.0.so.0
0000032 0x00007ffff47d79e5 in g_main_loop_run () from /lib/libglib-2.0.so.0
0000033 0x00007ffff64fd177 in gtk_main () from /usr/lib/libgtk-x11-2.0.so.0
0000034 0x00000000004e3c75 in main (argc=1, argv=0x7fffffffe408) at main.cpp:185
TagsNo tags attached.
Attached Files
sourceview.diff (497 bytes)   
Index: libs/gtkutil/SourceView.cpp
===================================================================
--- libs/gtkutil/SourceView.cpp	(Revision 5112)
+++ libs/gtkutil/SourceView.cpp	(Arbeitskopie)
@@ -89,6 +89,8 @@
 
 	// Extract the script from the input window
 	gchar* text = gtk_text_buffer_get_text(GTK_TEXT_BUFFER(_buffer), &start, &end, TRUE);
+	if (text == (gchar *)0)
+		return std::string("");
 
 	// Convert to std::string, free the GLIB stuff and return
 	std::string contents(text);
sourceview.diff (497 bytes)   

Activities

mattn

mattn

20.12.2009 18:26

updater   ~0002776

attached is a fix now. the return value might be null (even if the docu does not tell this)
greebo

greebo

21.12.2009 05:19

administrator   ~0002778

Thank you for the fix. You're involved in the GtkRadiant project, aren't you?
mattn

mattn

21.12.2009 08:09

updater   ~0002780

yes - and we have forked it on our own for uforadiant - see e.g. http://ufoai.sourceforge.net/news_img/prefabs.png

Issue History

Date Modified Username Field Change
20.12.2009 17:42 mattn New Issue
20.12.2009 18:26 mattn File Added: sourceview.diff
20.12.2009 18:26 mattn Note Added: 0002776
21.12.2009 05:17 greebo Status new => assigned
21.12.2009 05:17 greebo Assigned To => greebo
21.12.2009 05:17 greebo Status assigned => resolved
21.12.2009 05:17 greebo Fixed in Version => 1.1.0
21.12.2009 05:17 greebo Resolution open => fixed
21.12.2009 05:17 greebo Build => 5114
21.12.2009 05:17 greebo Target Version => 1.1.0
21.12.2009 05:19 greebo Note Added: 0002778
21.12.2009 08:09 mattn Note Added: 0002780
29.05.2010 16:36 greebo Status resolved => closed