[Ardour-Dev] ardour3 segfault due to gtk.rc

Robin Gareus robin at gareus.org
Thu Jun 30 05:58:32 PDT 2011


On 06/16/2011 03:04 PM, Robin Gareus wrote:
> On 06/13/2011 12:06 AM, Paul Davis wrote:
>> On Sun, Jun 12, 2011 at 6:04 PM, Robin Gareus <robin at gareus.org> wrote:
>>> On 06/12/2011 11:55 PM, Paul Davis wrote:
>>>> what version of GTK?
>>
>>> Source: gtk+2.0
>>> Version: 2.24.4-3
>>
>> no issue there that i know of. debugger it is.

Alas, gdb did not really help.

> Well despite the backtrace pointing to gtk/glib this has nothing to do
> with gtk. It also does not affect upstream ardour3-svn.
> 
> The problem is dues to [my videotimeline patch] linking ardour3 to
> libboost_regex.so - and I suspect a boost version conflict but i did not
> yet have the time to poke around.

Several bisects and recompiles later: The problem description in above
paragraph turned out to be wrong! I was just [un]lucky: It occasionally
failed with vanilla ardour3-svn and occasionally worked with
video-timeline patched ardour3.


To fix the problem I simply need to change:
-=-=-=-=-=-=-=-=-=-=-=-=-
--- a/gtk2_ardour/ardev_common.sh.in
+++ b/gtk2_ardour/ardev_common.sh.in
@@ -12,7 +12,8
 if test -d $HOME/gtk/inst ; then
-    export GTK_PATH=~/.ardour3:$libs/clearlooks-newer
+    export GTK_PATH=~/.config/ardour3:$libs/clearlooks-newer
 else
-    export GTK_PATH=~/.ardour3:$libs/clearlooks-older
+    export GTK_PATH=~/.config/ardour3:$libs/clearlooks-newer
 fi
+unset GTK_MODULES
-=-=-=-=-=-=-=-=-=-=-=-=- (actually the IF/ELSE can go away)


If I don't, there two possibilities:
  A) it does not find the styles (log below)
OR
  B) it segfaults (backtrace below)
[ C) one in ~20 tries it just works]


That sounds like some uninitialized variable, or some issue with
non-existent PATHs - possibly related to canberra-gtk-module (0.28-1):

# echo $GTK_MODULES
canberra-gtk-module


 - If I don't `unset GTK_MODULES` I always get a segfault.
 - if GTK_PATH includes non-existent dirs I either get a segfault,
   OR it does not find the styles OR it just works occasionally.

The problem was not present in debian/sid + ardour-svn before February
2011. - There's been numerous changes to ardour3 and new debian
version(s) of glib/gtk/etc since. So far ardour3 is/was the only
application showing this problem. All in all a very weird issue.

ciao,
robin

-=-=- Log and backtrace -=-=-

##A)
./ardbg
[..]
Cannot xinstall SIGPIPE error handler
ardour: [INFO]: Loading default ui configuration file
./../gtk2_ardour/ardour3_ui_default.conf
Loading user ui configuration file
/home/rgareus/.config/ardour3/ardour3_ui.conf
ardour: [INFO]: Loading ui configuration file
./../build/default/gtk2_ardour/ardour3_ui_dark.rc
./../build/default/gtk2_ardour/ardour3_ui_dark.rc:345: Unable to find
include file: "ardour3_dark_fonts.rc"
./../build/default/gtk2_ardour/ardour3_ui_dark.rc:346: Unable to find
include file: "ardour3_dark_styles.rc"
./../build/default/gtk2_ardour/ardour3_ui_dark.rc:347: Unable to find
include file: "ardour3_widgets.rc"
ardour: [INFO]: Ardour will be limited to 1024 open files
ardour: [INFO]: Loading system configuration file
/usr/local/etc/ardour3/ardour_system.rc
Loading user configuration file /home/rgareus/.config/ardour3/ardour.rc
[..]
[..ardour works but with system style and colors..]

##B)
./ardbg
[..]
Cannot xinstall SIGPIPE error handler
ardour: [INFO]: Loading default ui configuration file
./../gtk2_ardour/ardour3_ui_default.conf
Loading user ui configuration file
/home/rgareus/.config/ardour3/ardour3_ui.conf
ardour: [INFO]: Loading ui configuration file
./../build/default/gtk2_ardour/ardour3_ui_dark.rc

Program received signal SIGSEGV, Segmentation fault.
0xb56c1582 in g_build_path_va (separator=0xb5721f09 "/",
    first_element=0x672e2f73 <Address 0x672e2f73 out of bounds>,
    args=0xbfffde7c, str_array=0x0)
    at
/build/buildd-glib2.0_2.28.6-1-i386-A3fp41/glib2.0-2.28.6/./glib/gfileutils.c:1443
1443
/build/buildd-glib2.0_2.28.6-1-i386-A3fp41/glib2.0-2.28.6/./glib/gfileutils.c:
No such file or directory.
	in
/build/buildd-glib2.0_2.28.6-1-i386-A3fp41/glib2.0-2.28.6/./glib/gfileutils.c
(gdb) thread apply all bt

Thread 1 (Thread 0xb26148a0 (LWP 28829)):
#0  0xb56c1582 in g_build_path_va (separator=0xb5721f09 "/",
    first_element=0x672e2f73 <Address 0x672e2f73 out of bounds>,
    args=0xbfffde7c, str_array=0x0)
    at
/build/buildd-glib2.0_2.28.6-1-i386-A3fp41/glib2.0-2.28.6/./glib/gfileutils.c:1443
#1  0xb56c2d04 in g_build_filename (
    first_element=0x672e2f73 <Address 0x672e2f73 out of bounds>)
    at
/build/buildd-glib2.0_2.28.6-1-i386-A3fp41/glib2.0-2.28.6/./glib/gfileutils.c:1758
#2  0xb51782ba in parse_include_file (context=0x9e19990,
    input_name=<value optimized out>, input_fd=11, input_string=0x0)
    at
/build/buildd-gtk+2.0_2.24.4-3-i386-ouUeDk/gtk+2.0-2.24.4/gtk/gtkrc.c:2898
#3  gtk_rc_parse_statement (context=0x9e19990,
    input_name=<value optimized out>, input_fd=11, input_string=0x0)
    at
/build/buildd-gtk+2.0_2.24.4-3-i386-ouUeDk/gtk+2.0-2.24.4/gtk/gtkrc.c:2942
#4  gtk_rc_parse_any (context=0x9e19990, input_name=<value optimized out>,
    input_fd=11, input_string=0x0)
    at
/build/buildd-gtk+2.0_2.24.4-3-i386-ouUeDk/gtk+2.0-2.24.4/gtk/gtkrc.c:2302
#5  0xb5179ba5 in gtk_rc_context_parse_one_file (context=0x9e19990,
    filename=0x9ef20e4 "./../build/default/gtk2_ardour/ardour3_ui_dark.rc",
    priority=12, reload=1)
    at
/build/buildd-gtk+2.0_2.24.4-3-i386-ouUeDk/gtk+2.0-2.24.4/gtk/gtkrc.c:1060
#6  0xb5179d0c in gtk_rc_context_parse_file (context=0x9e19990,
    filename=0x9ef20e4 "./../build/default/gtk2_ardour/ardour3_ui_dark.rc",
    priority=12, reload=1)
    at
/build/buildd-gtk+2.0_2.24.4-3-i386-ouUeDk/gtk+2.0-2.24.4/gtk/gtkrc.c:1126
#7  0xb5179ff8 in IA__gtk_rc_parse (
    filename=0x9ef20e4 "./../build/default/gtk2_ardour/ardour3_ui_dark.rc")
    at
/build/buildd-gtk+2.0_2.24.4-3-i386-ouUeDk/gtk+2.0-2.24.4/gtk/gtkrc.c:1155
#8  0xb49c5f55 in Gtk::RC::RC(Glib::ustring const&) ()
   from /usr/lib/i386-linux-gnu/libgtkmm-2.4.so.1
#9  0xb60929e5 in Gtkmm2ext::UI::load_rcfile (this=0x9e16b50, path=...,
    themechange=false) at ../libs/gtkmm2ext/gtk_ui.cc:156

#10 0x095b4194 in load_rc_file (filename=..., themechange=false)
    at ../gtk2_ardour/theme_manager.cc:205
#11 0x095b4a39 in ThemeManager::setup_theme (this=0x9ec4da8)
    at ../gtk2_ardour/theme_manager.cc:287
#12 0x095b315d in ThemeManager::ThemeManager (this=0x9ec4da8,
    __in_chrg=<value optimized out>, __vtt_parm=<value optimized out>)
    at ../gtk2_ardour/theme_manager.cc:99

#13 0x08e735b4 in ARDOUR_UI::ARDOUR_UI (this=0x9e16b50, argcp=0xbfffeb30,
    argvp=0xbfffeb34, __in_chrg=<value optimized out>,
    __vtt_parm=<value optimized out>) at ../gtk2_ardour/ardour_ui.cc:210
#14 0x0929802a in main (argc=1, argv=0xbfffebd4) at
../gtk2_ardour/main.cc:551
(gdb) quit



More information about the Ardour-Dev mailing list