Bug 328495 - Rawtherapee crashes occasionally when using oxygen-gtk
Summary: Rawtherapee crashes occasionally when using oxygen-gtk
Status: RESOLVED FIXED
Alias: None
Product: Oxygen
Classification: Plasma
Component: gtk2-engine (show other bugs)
Version: 4.11.2
Platform: Kubuntu Linux
: NOR crash (vote)
Target Milestone: ---
Assignee: Hugo Pereira Da Costa
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-12-06 18:07 UTC by Torsten Römer
Modified: 2014-07-03 23:59 UTC (History)
7 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
Backtrace rawtherapee crash (44.67 KB, text/plain)
2013-12-06 21:20 UTC, Torsten Römer
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Torsten Römer 2013-12-06 18:07:42 UTC
Locally compiled rawtherapee 4.0.11.60 occasionally crashes when using locally built oxygen-gtk from git master from 2013-12-06.
The crash occurs very rarely, after hours of intensive usage of the application.
With the package from the distribution (kubuntu 13.10), it crashed much more often, when closing the image editor tab about every 6th-or-so image.

See backtrace under "Additional Information".

This issue may be related to occasional crashes of Eclipse:
Stack: [0x00007f198348f000,0x00007f1983590000], sp=0x00007f198358a870, free space=1006k Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code) C [libgtk-x11-2.0.so.0+0x24492a] gtk_widget_queue_draw+0x1a C [liboxygen-gtk.so+0x226199] Oxygen::ToolBarStateData::delayedUpdate(void*)+0x89 C [liboxygen-gtk.so+0x223b2c] Oxygen::TimeLine::trigger() const+0x2e C [liboxygen-gtk.so+0x2238fa] Oxygen::TimeLine::start()+0xae C [liboxygen-gtk.so+0x225c17] Oxygen::ToolBarStateData::updateState(_GtkWidget*, bool, bool)+0x20d C [liboxygen-gtk.so+0x22587d] Oxygen::ToolBarStateData::registerChild(_GtkWidget*, bool)+0x2f3 C [liboxygen-gtk.so+0x1e5339] Oxygen::ToolBarStateEngine::registerChild(_GtkWidget*, _GtkWidget*, bool)+0x71 C [liboxygen-gtk.so+0x2ec50c] Oxygen::draw_box(_GtkStyle*, _GdkDrawable*, GtkStateType, GtkShadowType, _GdkRectangle*, _GtkWidget*, char const*, int, int, int, int)+0x1f60

Some history in a "hijacked" bug: https://bugs.kde.org/show_bug.cgi?id=325196

Reproducible: Sometimes

Steps to Reproduce:
1. Open an image in the editor, change some settings like exposure, white balance, ...
2. Close the editor tab
3. Repeat 1) and 2) until crash occurs
Actual Results:  
Application should not crash

Expected Results:  
Application crashes sometimes

Program received signal SIGSEGV, Segmentation fault.
0x00007ffff694092a in IA__gtk_widget_queue_draw (widget=0x4331970)
    at /build/buildd/gtk+2.0-2.24.20/gtk/gtkwidget.c:3772
3772    /build/buildd/gtk+2.0-2.24.20/gtk/gtkwidget.c: Datei oder Verzeichnis nicht gefunden.
(gdb) bt full
#0  0x00007ffff694092a in IA__gtk_widget_queue_draw (widget=0x4331970)
    at /build/buildd/gtk+2.0-2.24.20/gtk/gtkwidget.c:3772
        __inst = 0x4331970
        __t = 28524512
        __r = <optimised out>
        _g_boolean_var_ = <optimised out>
        rect = {x = 0, y = 0, width = 0, height = 0}
#1  0x00007fffeaa2b5ba in Oxygen::Gtk::gtk_widget_queue_draw (widget=0x4331970, rect=0x0)
    at /data/Linux/oxygen-gtk/oxygen-gtk/src/animations/../oxygengtkutils.h:233
No locals.
#2  0x00007fffeaa35199 in Oxygen::ToolBarStateData::delayedUpdate (pointer=0x282f018)
    at /data/Linux/oxygen-gtk/oxygen-gtk/src/animations/oxygentoolbarstatedata.cpp:330
        rect = {x = 341, y = 39, width = 126, height = 43}
        data = @0x282f018: {<Oxygen::FollowMouseData> = {
            _vptr.FollowMouseData = 0x7fffeada3410 <vtable for Oxygen::ToolBarStateData+16>, _followMouse = false, _timeLine = {
              _vptr.TimeLine = 0x7fffeada3390 <vtable for Oxygen::TimeLine+16>, 
              _duration = 50, _enabled = true, _direction = Oxygen::TimeLine::Forward, 
              _running = false, _value = 0, _time = 0, _timer = 0x281ca30, 
              _func = 0x7fffeaa351d2 <Oxygen::ToolBarStateData::followMouseUpdate(void*)>, _data = 0x282f018, static _steps = 10}, _startRect = {x = 0, y = 0, width = -1, 
              height = -1}, _endRect = {x = 0, y = 0, width = -1, height = -1}, 
            _animatedRect = {x = 0, y = 0, width = -1, height = -1}, _dirtyRect = {
              x = 0, y = 0, width = -1, height = -1}}, _target = 0x1bea070, _leaveId = {
---Type <return> to continue, or q <return> to quit---
            _vptr.Signal = 0x7fffeada2030 <vtable for Oxygen::Signal+16>, _id = 13965, 
            _object = 0x1bea070}, _dirtyRect = {x = 0, y = 0, width = -1, height = -1}, 
          _previous = {_timeLine = {
              _vptr.TimeLine = 0x7fffeada3390 <vtable for Oxygen::TimeLine+16>, 
              _duration = 150, _enabled = true, _direction = Oxygen::TimeLine::Backward, 
              _running = false, _value = 0, _time = 150, _timer = 0x2832500, 
              _func = 0x7fffeaa35110 <Oxygen::ToolBarStateData::delayedUpdate(void*)>, 
              _data = 0x282f018, static _steps = 10}, _widget = 0x4331970, _rect = {
              x = 435, y = 41, width = 30, height = 36}}, _current = {_timeLine = {
              _vptr.TimeLine = 0x7fffeada3390 <vtable for Oxygen::TimeLine+16>, 
              _duration = 150, _enabled = true, _direction = Oxygen::TimeLine::Forward, 
              _running = true, _value = 0, _time = 0, _timer = 0x281c560, 
              _func = 0x7fffeaa35110 <Oxygen::ToolBarStateData::delayedUpdate(void*)>, 
              _data = 0x282f018, static _steps = 10}, _widget = 0x22702b0, _rect = {
              x = 343, y = 61, width = 18, height = 19}}, _hoverData = {_M_t = {
              _M_impl = {<std::allocator<std::_Rb_tree_node<std::pair<_GtkWidget* const, Oxygen::ToolBarStateData::HoverData> > >> = {<__gnu_cxx::new_allocator<std::_Rb_tree_node<std::pair<_GtkWidget* const, Oxygen::ToolBarStateData::HoverData> > >> = {<No data fields>}, <No data fields>}, 
                _M_key_compare = {<std::binary_function<_GtkWidget*, _GtkWidget*, bool>> = {<No data fields>}, <No data fields>}, _M_header = {_M_color = std::_S_red, 
                  _M_parent = 0x5194780, _M_left = 0x3459710, _M_right = 0x4dd87d0}, 
                _M_node_count = 92}}}, static _timeOut = 50, _timer = {
            _vptr.Timer = 0x7fffeada1b50 <vtable for Oxygen::Timer+16>, _timerId = 0, 
---Type <return> to continue, or q <return> to quit---
            _func = 0x0, _data = 0x0}}
#3  0x00007fffeaa32b2c in Oxygen::TimeLine::trigger (this=0x282f130)
    at /data/Linux/oxygen-gtk/oxygen-gtk/src/animations/oxygentimeline.h:126
No locals.
#4  0x00007fffeaa328fa in Oxygen::TimeLine::start (this=0x282f130)
    at /data/Linux/oxygen-gtk/oxygen-gtk/src/animations/oxygentimeline.cpp:98
        __PRETTY_FUNCTION__ = "void Oxygen::TimeLine::start()"
#5  0x00007fffeaa34c17 in Oxygen::ToolBarStateData::updateState (this=0x282f018, 
    widget=0x22702b0, state=true, delayed=false)
    at /data/Linux/oxygen-gtk/oxygen-gtk/src/animations/oxygentoolbarstatedata.cpp:176
        startRect = {x = 0, y = 0, width = -1, height = -1}
        animate = true
        rect = {x = 343, y = 61, width = 18, height = 19}
#6  0x00007fffeaa35078 in Oxygen::ToolBarStateData::childEnterNotifyEvent (
    widget=0x22702b0, data=0x282f018)
    at /data/Linux/oxygen-gtk/oxygen-gtk/src/animations/oxygentoolbarstatedata.cpp:285
No locals.
#7  0x00007ffff6829645 in _gtk_marshal_BOOLEAN__BOXED (closure=0x502d020, 
    return_value=0x7fffffffdb70, n_param_values=<optimised out>, 
    param_values=0x7fffffffdc20, invocation_hint=<optimised out>, marshal_data=0x0)
    at /build/buildd/gtk+2.0-2.24.20/gtk/gtkmarshalers.c:86
        callback = <optimised out>
        cc = <optimised out>
        data1 = 0x22702b0
---Type <return> to continue, or q <return> to quit---
        data2 = <optimised out>
        v_return = <optimised out>
        __PRETTY_FUNCTION__ = "_gtk_marshal_BOOLEAN__BOXED"
#8  0x00007ffff74b9188 in g_closure_invoke ()
   from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
No symbol table info available.
#9  0x00007ffff74cab1d in ?? () from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
No symbol table info available.
#10 0x00007ffff74d24f9 in g_signal_emit_valist ()
   from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
No symbol table info available.
#11 0x00007ffff74d2ae2 in g_signal_emit ()
   from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
No symbol table info available.
#12 0x00007ffff69395f4 in gtk_widget_event_internal (widget=widget@entry=0x22702b0, 
    event=event@entry=0x3bcb510) at /build/buildd/gtk+2.0-2.24.20/gtk/gtkwidget.c:5010
        signal_num = <optimised out>
        return_val = 0
#13 0x00007ffff69398c9 in IA__gtk_widget_event (widget=widget@entry=0x22702b0, 
    event=event@entry=0x3bcb510) at /build/buildd/gtk+2.0-2.24.20/gtk/gtkwidget.c:4807
        __PRETTY_FUNCTION__ = "IA__gtk_widget_event"
#14 0x00007ffff682837c in IA__gtk_main_do_event (event=0x3bcb510)
    at /build/buildd/gtk+2.0-2.24.20/gtk/gtkmain.c:1712
        event_widget = 0x22702b0
---Type <return> to continue, or q <return> to quit---
        grab_widget = 0x22702b0
        window_group = 0x2787d80
        rewritten_event = <optimised out>
        tmp_list = <optimised out>
        __PRETTY_FUNCTION__ = "IA__gtk_main_do_event"
#15 0x00007ffff64a327c in gdk_event_dispatch (source=<optimised out>, 
    callback=<optimised out>, user_data=<optimised out>)
    at /build/buildd/gtk+2.0-2.24.20/gdk/x11/gdkevents-x11.c:2403
        display = <optimised out>
        event = 0x3bcb510
#16 0x00007ffff71f03b6 in g_main_context_dispatch ()
   from /lib/x86_64-linux-gnu/libglib-2.0.so.0
No symbol table info available.
#17 0x00007ffff71f0708 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
No symbol table info available.
#18 0x00007ffff71f0b0a in g_main_loop_run () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
No symbol table info available.
#19 0x00007ffff6827277 in IA__gtk_main ()
    at /build/buildd/gtk+2.0-2.24.20/gtk/gtkmain.c:1271
        tmp_list = 0x0
        functions = 0x0
        init = <optimised out>
        loop = 0x2832300
#20 0x00007ffff60ad3bd in Gtk::Main::run(Gtk::Window&) ()
---Type <return> to continue, or q <return> to quit---
   from /usr/lib/x86_64-linux-gnu/libgtkmm-2.4.so.1
No symbol table info available.
#21 0x00000000004cac4c in main ()
No symbol table info available.
(gdb)
Comment 1 Christian Bayer 2013-12-06 18:14:06 UTC
I think this stack trace is identical to my stripped out Eclipse stack trace. So hopefully we'll get to the bottom of if.
Comment 2 Torsten Römer 2013-12-06 21:20:45 UTC
Created attachment 83957 [details]
Backtrace rawtherapee crash

Another backtrace from a crash in rawtherapee possibly related to oxygen-gtk.
Comment 3 Hugo Pereira Da Costa 2014-01-03 18:38:34 UTC
Git commit c52b7367d99444ace2743c87364591cb0dd164a7 by Hugo Pereira Da Costa.
Committed on 03/01/2014 at 17:47.
Pushed by hpereiradacosta into branch '1.4'.

properly reset _previous and _current widget, if matching, in case of child destruction, for ToolbarStateData, MenuStateData, MenuBarStateData
Related: bug 329112, bug 324438, bug 325196

M  +91   -0    src/animations/oxygenmenubarstatedata.cpp
M  +15   -0    src/animations/oxygenmenubarstatedata.h
M  +90   -0    src/animations/oxygenmenustatedata.cpp
M  +15   -0    src/animations/oxygenmenustatedata.h
M  +13   -0    src/animations/oxygentoolbarstatedata.cpp

http://commits.kde.org/oxygen-gtk/c52b7367d99444ace2743c87364591cb0dd164a7
Comment 4 Hugo Pereira Da Costa 2014-01-03 18:43:17 UTC
@Torsten
 Can you try when compiling version 1.4 from source ? I "think" I have fixed the issue, although I did not check extensively (the code change in ToolbarStateData makes sense though in terms on how the old code could indeed crash and the new one should not)

Keep me posted
Comment 5 Hugo Pereira Da Costa 2014-01-03 18:58:02 UTC
Git commit a9fd101716d92623e410099d9b13f31cb3236fe8 by Hugo Pereira Da Costa.
Committed on 03/01/2014 at 17:47.
Pushed by hpereiradacosta into branch 'gtk3'.

properly reset _previous and _current widget, if matching, in case of child destruction, for ToolbarStateData, MenuStateData, MenuBarStateData
Related: bug 329112, bug 324438, bug 325196

M  +91   -0    src/animations/oxygenmenubarstatedata.cpp
M  +15   -0    src/animations/oxygenmenubarstatedata.h
M  +90   -0    src/animations/oxygenmenustatedata.cpp
M  +15   -0    src/animations/oxygenmenustatedata.h
M  +13   -0    src/animations/oxygentoolbarstatedata.cpp

http://commits.kde.org/oxygen-gtk/a9fd101716d92623e410099d9b13f31cb3236fe8
Comment 6 Hugo Pereira Da Costa 2014-01-03 18:58:06 UTC
Git commit bd052fe914c6cf9da70dd4ab931a4b563cb6e742 by Hugo Pereira Da Costa.
Committed on 03/01/2014 at 17:47.
Pushed by hpereiradacosta into branch 'gtk3-1.2'.

properly reset _previous and _current widget, if matching, in case of child destruction, for ToolbarStateData, MenuStateData, MenuBarStateData
Related: bug 329112, bug 324438, bug 325196

M  +91   -0    src/animations/oxygenmenubarstatedata.cpp
M  +15   -0    src/animations/oxygenmenubarstatedata.h
M  +90   -0    src/animations/oxygenmenustatedata.cpp
M  +15   -0    src/animations/oxygenmenustatedata.h
M  +13   -0    src/animations/oxygentoolbarstatedata.cpp

http://commits.kde.org/oxygen-gtk/bd052fe914c6cf9da70dd4ab931a4b563cb6e742
Comment 7 Torsten Römer 2014-01-05 20:37:46 UTC
Very nice. I have built version 1.4 and did some editing in rawtherapee, no crash so far. But I will have to do a lot more editing before I can make a qualified statement - I will try to do so soon and let you know.

Cheers!
Comment 8 DrSlony 2014-01-05 23:26:33 UTC
Hi

What version of oxygen-gtk will this fix be in?
Comment 9 Hugo Pereira Da Costa 2014-01-06 06:11:03 UTC
@DrLsony
That will be version 1.4.2 scheduled in a week or two.
But I'd recommend to test the code from git before that, in case somethingvelse shows up.

Hugo
Comment 10 Hugo Pereira Da Costa 2014-01-06 06:11:48 UTC
@DrLsony
That will be version 1.4.2 scheduled in a week or two.
But I'd recommend to test the code from git before that, in case somethingvelse shows up.

Hugo
Comment 11 Hugo Pereira Da Costa 2014-01-10 08:44:15 UTC
@Torsten
any news ? 
I really expect the crash not to be (directly) related to multiple display. 
(although yes, this might trigger it more often. Was an issue with accessing invalid memory, hence the seemingly random occurence).

Closing the bug as fixed from now (got positive feedback on other, similar bug reports). Feel free to reopen if crashes reoccur.

Thanks for helping getting to the bottom of it.
Comment 12 Torsten Römer 2014-01-10 11:49:51 UTC
@Hugo
I did not get around to use rawtherapee as intensively as I did when those crashes occurred, but there has been no crash since the fix for me as well, also not in Eclipse.

Should a (related) crash occur again I will let you know.

I BTW mainly use a single display setup.

Thanks for fixing this issue! :-)
Comment 13 Hugo Pereira Da Costa 2014-01-10 11:50:58 UTC
(as for the display setup: sorry, that was for another bug report ;))
Comment 14 Torsten Römer 2014-05-12 11:46:43 UTC
@Hugo, I am just wondering if this crash can be related

C  [libgtk-x11-2.0.so.0+0x2202ea]  gtk_tree_view_get_background_area+0x8a

I can reproduce it quite reliably when debugging in Eclipse with the oxygen-gtk GTK2-Design. With Raleigh I am unable to reproduce the crash. But my eyes really prefer oxygen-gtk :-)

Unfortunately I don't know how to provide a useful backtrace, but I'll try to find out.

Torsten
Comment 15 Torsten Römer 2014-05-12 13:33:15 UTC
I got a backtrace from a core dump. Please let me know what debug packages to install to get more infos if you want!

#6  0x00007f2292d3d2ea in IA__gtk_tree_view_get_background_area (
    tree_view=0x7f22d0908990, path=0x7f22d197ce00, column=0x7f22d08c5570, 
    rect=0x7f22d6fdabf0) at /build/buildd/gtk+2.0-2.24.23/gtk/gtktreeview.c:13045
        __inst = 0x7f22d08c5570
        __t = 139787504457888
        __r = <optimised out>
        _g_boolean_var_ = <optimised out>
        tree = 0x0
        node = 0x0
        __FUNCTION__ = "IA__gtk_tree_view_get_background_area"
#7  0x00007f229263db58 in Oxygen::Gtk::CellInfo::backgroundRect(_GtkTreeView*) const ()
   from /usr/lib/x86_64-linux-gnu/gtk-2.0/2.10.0/engines/liboxygen-gtk.so
No symbol table info available.
#8  0x00007f229262f19d in Oxygen::TreeViewStateData::dirtyRect() ()
---Type <return> to continue, or q <return> to quit---
   from /usr/lib/x86_64-linux-gnu/gtk-2.0/2.10.0/engines/liboxygen-gtk.so
No symbol table info available.
#9  0x00007f229262f320 in Oxygen::TreeViewStateData::delayedUpdate(void*) ()
   from /usr/lib/x86_64-linux-gnu/gtk-2.0/2.10.0/engines/liboxygen-gtk.so
No symbol table info available.
#10 0x00007f229262eea6 in Oxygen::TreeViewStateData::updateState(Oxygen::Gtk::CellInfo const&, bool) () from /usr/lib/x86_64-linux-gnu/gtk-2.0/2.10.0/engines/liboxygen-gtk.so
No symbol table info available.
#11 0x00007f229260bcd1 in Oxygen::TreeViewStateEngine::get(_GtkWidget*, Oxygen::Gtk::CellInfo const&, Oxygen::StyleOptions const&) ()
   from /usr/lib/x86_64-linux-gnu/gtk-2.0/2.10.0/engines/liboxygen-gtk.so
No symbol table info available.
#12 0x00007f22926b43a9 in ?? ()
   from /usr/lib/x86_64-linux-gnu/gtk-2.0/2.10.0/engines/liboxygen-gtk.so
No symbol table info available.
#13 0x00007f2292d30a34 in gtk_tree_view_draw_arrow (
    tree_view=tree_view@entry=0x7f22d0908990, tree=tree@entry=0x7f22d0eb3470, 
    node=node@entry=0x7f22d1184460, x=x@entry=0, y=y@entry=65)
    at /build/buildd/gtk+2.0-2.24.23/gtk/gtktreeview.c:9598
        area = {x = 0, y = 63, width = 12, height = 19}
        state = <optimised out>
        widget = 0x7f22d0908990
        x_offset = 0
        x2 = 15
        vertical_separator = 0
        expander_size = <optimised out>
---Type <return> to continue, or q <return> to quit---
        expander_style = <optimised out>
#14 0x00007f2292d36e0b in do_prelight (tree_view=tree_view@entry=0x7f22d0908990, 
    tree=0x7f22d0eb3470, node=0x7f22d1184460, x=0, y=65)
    at /build/buildd/gtk+2.0-2.24.23/gtk/gtktreeview.c:3284
No locals.
#15 0x00007f2292d3e3a4 in prelight_or_select (tree_view=tree_view@entry=0x7f22d0908990, 
    tree=<optimised out>, node=<optimised out>, x=<optimised out>, y=<optimised out>)
    at /build/buildd/gtk+2.0-2.24.23/gtk/gtktreeview.c:3334
        mode = <optimised out>
#16 0x00007f2292d40af5 in gtk_tree_view_enter_notify (widget=0x7f22d0908990, 
    event=0x7f22d1531820) at /build/buildd/gtk+2.0-2.24.23/gtk/gtktreeview.c:5634
        tree_view = 0x7f22d0908990
        tree = 0x7f22d0eb3470
        node = 0x7f22d1184460
        new_y = <optimised out>
Comment 16 Hugo Pereira Da Costa 2014-05-12 13:37:25 UTC
Hi Torsen
The backtrace is very useful, I can probably ellaborate on that and submit a patch for you to test. 
The crash is likely a different one from the one that got "fixed" here. But let us try to fix it here nonetheless.
Comment 17 Torsten Römer 2014-07-03 23:59:28 UTC
Hi Hugo,
Did you have a chance to have a look at the crash? Anything I can help out with?
Cheers,
Torsten