Opened 7 months ago

Last modified 7 months ago

#16202 new defect

intermittent hang when constructing wxFrame with non-default size

Reported by: ryanjmulder Owned by:
Priority: normal Milestone:
Component: wxGTK Version: 3.0.0
Keywords: ubuntu Cc:
Blocked By: Blocking:
Patch: no

Description

Frequently when I launch my small app it hangs before showing the main frame.

Ubuntu 13.10 with gtk2 and wxwidgets3.

I discussed it a bit with David Hart on the forums:
http://forums.wxwidgets.org/viewtopic.php?f=23&t=37151&sid=3549f75972ae29f39682f0b9f911012a&p=159359#p159294

I attached a small sample app that reproduces the issue, and pasted it here, too:

#include <wx/app.h>
#include <wx/frame.h>

class Hang : public wxApp
{
   bool OnInit();
};

IMPLEMENT_APP( Hang )

bool Hang::OnInit()
{   
   wxFrame* frame = new wxFrame( nullptr, wxID_ANY, "A Frame", wxDefaultPosition, wxSize( 800, 600 ) );
   frame->Show();
   return true;
}

When things work normally, the app shows an empty frame.
When things don't work, the frame never shows, but the process is running.
I cannot start the app 10 times in a row without it hanging.

When creating the minimal sample, I discovered that the hang is related to constructing the wxFrame with a size.
If I replace "wxSize( 800, 600 )" with "wxDefaultSize", it never hangs.

Also, it might be relevant that I'm working in a virtual machine, where everything is a bit slower than average.
It seems to happen less when running directly on hardware.

I recognize that it may be difficult to reproduce the bug, but I thought it best that you have the information.

I attached gdb to the hung app and dumped this backtrace:

#0  __lll_lock_wait () at ../nptl/sysdeps/unix/sysv/linux/x86_64/lowlevellock.S:135
#1  0x00007f160682c192 in _L_lock_1142 () from /lib/x86_64-linux-gnu/libpthread.so.0
#2  0x00007f160682c110 in __GI___pthread_mutex_lock (mutex=0x7f15f8007250) at pthread_mutex_lock.c:104
#3  0x00007f1607bfb3a1 in g_mutex_lock () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#4  0x00007f1605b3658f in ?? () from /usr/lib/x86_64-linux-gnu/libgio-2.0.so.0
#5  0x00007f1605b36ef3 in g_bus_get_sync () from /usr/lib/x86_64-linux-gnu/libgio-2.0.so.0
#6  0x00007f15fe6974f8 in ?? () from /usr/lib/x86_64-linux-gnu/gio/modules/libgvfsdbus.so
#7  0x00007f1607ea4c3b in g_type_create_instance () from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#8  0x00007f1607e890e5 in ?? () from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#9  0x00007f1607e8aedd in g_object_newv () from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#10 0x00007f1607e8b68c in g_object_new () from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#11 0x00007f1605ad16e1 in ?? () from /usr/lib/x86_64-linux-gnu/libgio-2.0.so.0
#12 0x00007f1605ad1860 in ?? () from /usr/lib/x86_64-linux-gnu/libgio-2.0.so.0
#13 0x00007f1605abe54e in g_file_new_for_path () from /usr/lib/x86_64-linux-gnu/libgio-2.0.so.0
#14 0x00007f15fe8dcb8d in ?? () from /usr/lib/x86_64-linux-gnu/libibus-1.0.so.5
#15 0x00007f1607ea4c3b in g_type_create_instance () from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#16 0x00007f1607e88cc8 in ?? () from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#17 0x00007f15fe8df325 in ?? () from /usr/lib/x86_64-linux-gnu/libibus-1.0.so.5
#18 0x00007f1607e89074 in ?? () from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#19 0x00007f1607e8b294 in g_object_new_valist () from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#20 0x00007f1607e8b674 in g_object_new () from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#21 0x00007f15fe8dd1e6 in ibus_bus_new_async () from /usr/lib/x86_64-linux-gnu/libibus-1.0.so.5
#22 0x00007f15feb1728a in ?? () from /usr/lib/x86_64-linux-gnu/gtk-2.0/2.10.0/immodules/im-ibus.so
#23 0x00007f1607ea234e in g_type_class_ref () from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#24 0x00007f1607e8af29 in g_object_newv () from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#25 0x00007f1607e8b68c in g_object_new () from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#26 0x00007f15feb17ce2 in ibus_im_context_new () from /usr/lib/x86_64-linux-gnu/gtk-2.0/2.10.0/immodules/im-ibus.so
#27 0x00007f1608e0f4ee in _gtk_im_module_create (context_id=<optimized out>) at /build/buildd/gtk+2.0-2.24.20/gtk/gtkimmodule.c:614
#28 0x00007f1608e0fdd9 in gtk_im_multicontext_get_slave (multicontext=multicontext@entry=0x7f15f8002330) at /build/buildd/gtk+2.0-2.24.20/gtk/gtkimmulticontext.c:254
#29 0x00007f1608e0fe10 in gtk_im_multicontext_set_use_preedit (context=0x7f15f8002330, use_preedit=0) at /build/buildd/gtk+2.0-2.24.20/gtk/gtkimmulticontext.c:410
#30 0x00007f160a324e3e in wxWindow::PostCreation (this=0x2263ee0) at ../src/gtk/window.cpp:2542
#31 0x00007f160a31c4e0 in wxTopLevelWindowGTK::Create (this=this@entry=0x2263ee0, parent=parent@entry=0x0, id=id@entry=-1, title=..., pos=..., sizeOrig=..., style=541072960, name=...)
    at ../src/gtk/toplevel.cpp:662
#32 0x00007f160a36bfb5 in wxFrame::Create (this=this@entry=0x2263ee0, parent=parent@entry=0x0, id=id@entry=-1, title=..., pos=..., sizeOrig=..., style=style@entry=541072960, name=...)
    at ../src/gtk/frame.cpp:56
#33 0x0000000000403161 in wxFrame (name=..., style=541072960, size=..., pos=..., title=..., id=-1, parent=0x0, this=0x2263ee0) at /usr/include/wx-3.0/wx/gtk/frame.h:31
#34 Hang::OnInit (this=<optimized out>) at main.cpp:15
#35 0x00007f1609d0b12c in wxEntry (argc=@0x7f160a098190: 1, argv=<optimized out>) at ../src/common/init.cpp:479
#36 0x00007f1609d0b1d2 in wxEntry (argc=argc@entry=@0x7fff1520ab9c: 1, argv=<optimized out>) at ../src/common/init.cpp:507
#37 0x0000000000402e28 in main (argc=1, argv=<optimized out>) at main.cpp:10


I also ran the app through valgrind's helgrind tool, which produced this output:

==7165== Helgrind, a thread error detector
==7165== Copyright (C) 2007-2012, and GNU GPL'd, by OpenWorks LLP et al.
==7165== Using Valgrind-3.8.1 and LibVEX; rerun with -h for copyright info
==7165== Command: bin/hang
==7165== 
==7165== ---Thread-Announcement------------------------------------------
==7165== 
==7165== Thread #1 is the program's root thread
==7165== 
==7165== ----------------------------------------------------------------
==7165== 
==7165== Thread #1: pthread_cond_destroy: destruction of unknown cond var
==7165==    at 0x4C2D7F8: ??? (in /usr/lib/valgrind/vgpreload_helgrind-amd64-linux.so)
==7165==    by 0xBA16E09: ??? (in /usr/lib/x86_64-linux-gnu/libxcb.so.1.1.0)
==7165==    by 0xBA16ED1: xcb_wait_for_reply (in /usr/lib/x86_64-linux-gnu/libxcb.so.1.1.0)
==7165==    by 0x7B5A4E6: _XReply (in /usr/lib/x86_64-linux-gnu/libX11.so.6.3.0)
==7165==    by 0x7B50983: XQueryExtension (in /usr/lib/x86_64-linux-gnu/libX11.so.6.3.0)
==7165==    by 0x7B44C31: XInitExtension (in /usr/lib/x86_64-linux-gnu/libX11.so.6.3.0)
==7165==    by 0x7BAD123: XkbUseExtension (in /usr/lib/x86_64-linux-gnu/libX11.so.6.3.0)
==7165==    by 0x7B4B302: XOpenDisplay (in /usr/lib/x86_64-linux-gnu/libX11.so.6.3.0)
==7165==    by 0x69E4E75: gdk_display_open (gdkdisplay-x11.c:166)
==7165==    by 0x69B5F5C: gdk_display_open_default_libgtk_only (gdk.c:324)
==7165==    by 0x6487103: gtk_init_check (gtkmain.c:1009)
==7165==    by 0x5091BE3: wxApp::Initialize(int&, wchar_t**) (in /usr/lib/x86_64-linux-gnu/libwx_gtk2u_core-3.0.so.0.0.0)
==7165==    by 0x56E8531: wxEntryStart(int&, wchar_t**) (in /usr/lib/x86_64-linux-gnu/libwx_baseu-3.0.so.0.0.0)
==7165==    by 0x56E909B: wxInitialize(int, wchar_t**) (in /usr/lib/x86_64-linux-gnu/libwx_baseu-3.0.so.0.0.0)
==7165==    by 0x56E90EC: wxEntry(int&, wchar_t**) (in /usr/lib/x86_64-linux-gnu/libwx_baseu-3.0.so.0.0.0)
==7165==    by 0x402E27: main (main.cpp:10)
==7165== 
==7165== ----------------------------------------------------------------
==7165== 
==7165== Thread #1: lock order "0xDE9DBE0 before 0xDE21EE0" violated
==7165== 
==7165== Observed (incorrect) order is: acquisition of lock at 0xDE21EE0
==7165==    at 0x4C2FC35: pthread_mutex_lock (in /usr/lib/valgrind/vgpreload_helgrind-amd64-linux.so)
==7165==    by 0x75F9F11: g_type_class_ref (in /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.3800.1)
==7165==    by 0x75E2F28: g_object_newv (in /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.3800.1)
==7165==    by 0x75E368B: g_object_new (in /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.3800.1)
==7165==    by 0x10D7BCE1: ibus_im_context_new (in /usr/lib/x86_64-linux-gnu/gtk-2.0/2.10.0/immodules/im-ibus.so)
==7165==    by 0x64724ED: _gtk_im_module_create (gtkimmodule.c:614)
==7165==    by 0x6472DD8: gtk_im_multicontext_get_slave (gtkimmulticontext.c:254)
==7165==    by 0x6472E0F: gtk_im_multicontext_set_use_preedit (gtkimmulticontext.c:410)
==7165==    by 0x50BEE3D: wxWindow::PostCreation() (in /usr/lib/x86_64-linux-gnu/libwx_gtk2u_core-3.0.so.0.0.0)
==7165==    by 0x50B64DF: wxTopLevelWindowGTK::Create(wxWindow*, int, wxString const&, wxPoint const&, wxSize const&, long, wxString const&) (in /usr/lib/x86_64-linux-gnu/libwx_gtk2u_core-3.0.so.0.0.0)
==7165==    by 0x403160: Hang::OnInit() (frame.h:31)
==7165==    by 0x56E912B: wxEntry(int&, wchar_t**) (in /usr/lib/x86_64-linux-gnu/libwx_baseu-3.0.so.0.0.0)
==7165==    by 0x402E27: main (main.cpp:10)
==7165== 
==7165==  followed by a later acquisition of lock at 0xDE9DBE0
==7165==    at 0x4C2FC35: pthread_mutex_lock (in /usr/lib/valgrind/vgpreload_helgrind-amd64-linux.so)
==7165==    by 0x9913752: ??? (in /usr/lib/x86_64-linux-gnu/libgio-2.0.so.0.3800.1)
==7165==    by 0x990054D: g_file_new_for_path (in /usr/lib/x86_64-linux-gnu/libgio-2.0.so.0.3800.1)
==7165==    by 0x10F9DB8C: ??? (in /usr/lib/x86_64-linux-gnu/libibus-1.0.so.5.0.503)
==7165==    by 0x75FCC3A: g_type_create_instance (in /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.3800.1)
==7165==    by 0x75E0CC7: ??? (in /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.3800.1)
==7165==    by 0x10FA0324: ??? (in /usr/lib/x86_64-linux-gnu/libibus-1.0.so.5.0.503)
==7165==    by 0x75E1073: ??? (in /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.3800.1)
==7165==    by 0x75E3293: g_object_new_valist (in /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.3800.1)
==7165==    by 0x75E3673: g_object_new (in /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.3800.1)
==7165==    by 0x10F9E1E5: ibus_bus_new_async (in /usr/lib/x86_64-linux-gnu/libibus-1.0.so.5.0.503)
==7165==    by 0x10D7B289: ??? (in /usr/lib/x86_64-linux-gnu/gtk-2.0/2.10.0/immodules/im-ibus.so)
==7165==    by 0x75FA34D: g_type_class_ref (in /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.3800.1)
==7165==    by 0x75E2F28: g_object_newv (in /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.3800.1)
==7165==    by 0x75E368B: g_object_new (in /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.3800.1)
==7165==    by 0x10D7BCE1: ibus_im_context_new (in /usr/lib/x86_64-linux-gnu/gtk-2.0/2.10.0/immodules/im-ibus.so)
==7165==    by 0x64724ED: _gtk_im_module_create (gtkimmodule.c:614)
==7165==    by 0x6472DD8: gtk_im_multicontext_get_slave (gtkimmulticontext.c:254)
==7165==    by 0x6472E0F: gtk_im_multicontext_set_use_preedit (gtkimmulticontext.c:410)
==7165==    by 0x50BEE3D: wxWindow::PostCreation() (in /usr/lib/x86_64-linux-gnu/libwx_gtk2u_core-3.0.so.0.0.0)
==7165==    by 0x50B64DF: wxTopLevelWindowGTK::Create(wxWindow*, int, wxString const&, wxPoint const&, wxSize const&, long, wxString const&) (in /usr/lib/x86_64-linux-gnu/libwx_gtk2u_core-3.0.so.0.0.0)
==7165==    by 0x403160: Hang::OnInit() (frame.h:31)
==7165==    by 0x56E912B: wxEntry(int&, wchar_t**) (in /usr/lib/x86_64-linux-gnu/libwx_baseu-3.0.so.0.0.0)
==7165==    by 0x402E27: main (main.cpp:10)
==7165== 
==7165== Required order was established by acquisition of lock at 0xDE9DBE0
==7165==    at 0x4C2FC35: pthread_mutex_lock (in /usr/lib/valgrind/vgpreload_helgrind-amd64-linux.so)
==7165==    by 0x9913752: ??? (in /usr/lib/x86_64-linux-gnu/libgio-2.0.so.0.3800.1)
==7165==    by 0x996068D: g_settings_backend_get_default (in /usr/lib/x86_64-linux-gnu/libgio-2.0.so.0.3800.1)
==7165==    by 0x99630AA: ??? (in /usr/lib/x86_64-linux-gnu/libgio-2.0.so.0.3800.1)
==7165==    by 0x75E1119: ??? (in /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.3800.1)
==7165==    by 0x75E3293: g_object_new_valist (in /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.3800.1)
==7165==    by 0x75E3673: g_object_new (in /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.3800.1)
==7165==    by 0xEAA73E0: gtk_module_init (in /usr/lib/x86_64-linux-gnu/gtk-2.0/modules/liboverlay-scrollbar.so)
==7165==    by 0x649F0F0: default_display_notify_cb (gtkmodules.c:445)
==7165==    by 0x75DC187: g_closure_invoke (in /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.3800.1)
==7165==    by 0x75EDB1C: ??? (in /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.3800.1)
==7165==    by 0x75F5828: g_signal_emit_valist (in /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.3800.1)
==7165==    by 0x75F5AE1: g_signal_emit (in /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.3800.1)
==7165==    by 0x75E0504: ??? (in /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.3800.1)
==7165==    by 0x75E2ABA: g_object_notify (in /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.3800.1)
==7165==    by 0x69B5F74: gdk_display_open_default_libgtk_only (gdk.c:335)
==7165==    by 0x6487103: gtk_init_check (gtkmain.c:1009)
==7165==    by 0x5091BE3: wxApp::Initialize(int&, wchar_t**) (in /usr/lib/x86_64-linux-gnu/libwx_gtk2u_core-3.0.so.0.0.0)
==7165==    by 0x56E8531: wxEntryStart(int&, wchar_t**) (in /usr/lib/x86_64-linux-gnu/libwx_baseu-3.0.so.0.0.0)
==7165==    by 0x56E909B: wxInitialize(int, wchar_t**) (in /usr/lib/x86_64-linux-gnu/libwx_baseu-3.0.so.0.0.0)
==7165==    by 0x56E90EC: wxEntry(int&, wchar_t**) (in /usr/lib/x86_64-linux-gnu/libwx_baseu-3.0.so.0.0.0)
==7165==    by 0x402E27: main (main.cpp:10)
==7165== 
==7165==  followed by a later acquisition of lock at 0xDE21EE0
==7165==    at 0x4C2FC35: pthread_mutex_lock (in /usr/lib/valgrind/vgpreload_helgrind-amd64-linux.so)
==7165==    by 0x75F9F11: g_type_class_ref (in /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.3800.1)
==7165==    by 0x75E2F28: g_object_newv (in /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.3800.1)
==7165==    by 0x75E368B: g_object_new (in /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.3800.1)
==7165==    by 0x991298E: g_io_module_new (in /usr/lib/x86_64-linux-gnu/libgio-2.0.so.0.3800.1)
==7165==    by 0x9912DD6: g_io_modules_scan_all_in_directory_with_scope (in /usr/lib/x86_64-linux-gnu/libgio-2.0.so.0.3800.1)
==7165==    by 0x991319B: ??? (in /usr/lib/x86_64-linux-gnu/libgio-2.0.so.0.3800.1)
==7165==    by 0x991377F: ??? (in /usr/lib/x86_64-linux-gnu/libgio-2.0.so.0.3800.1)
==7165==    by 0x996068D: g_settings_backend_get_default (in /usr/lib/x86_64-linux-gnu/libgio-2.0.so.0.3800.1)
==7165==    by 0x99630AA: ??? (in /usr/lib/x86_64-linux-gnu/libgio-2.0.so.0.3800.1)
==7165==    by 0x75E1119: ??? (in /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.3800.1)
==7165==    by 0x75E3293: g_object_new_valist (in /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.3800.1)
==7165==    by 0x75E3673: g_object_new (in /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.3800.1)
==7165==    by 0xEAA73E0: gtk_module_init (in /usr/lib/x86_64-linux-gnu/gtk-2.0/modules/liboverlay-scrollbar.so)
==7165==    by 0x649F0F0: default_display_notify_cb (gtkmodules.c:445)
==7165==    by 0x75DC187: g_closure_invoke (in /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.3800.1)
==7165==    by 0x75EDB1C: ??? (in /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.3800.1)
==7165==    by 0x75F5828: g_signal_emit_valist (in /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.3800.1)
==7165==    by 0x75F5AE1: g_signal_emit (in /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.3800.1)
==7165==    by 0x75E0504: ??? (in /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.3800.1)
==7165==    by 0x75E2ABA: g_object_notify (in /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.3800.1)
==7165==    by 0x69B5F74: gdk_display_open_default_libgtk_only (gdk.c:335)
==7165==    by 0x6487103: gtk_init_check (gtkmain.c:1009)
==7165==    by 0x5091BE3: wxApp::Initialize(int&, wchar_t**) (in /usr/lib/x86_64-linux-gnu/libwx_gtk2u_core-3.0.so.0.0.0)
==7165==    by 0x56E8531: wxEntryStart(int&, wchar_t**) (in /usr/lib/x86_64-linux-gnu/libwx_baseu-3.0.so.0.0.0)
==7165==    by 0x56E909B: wxInitialize(int, wchar_t**) (in /usr/lib/x86_64-linux-gnu/libwx_baseu-3.0.so.0.0.0)
==7165==    by 0x56E90EC: wxEntry(int&, wchar_t**) (in /usr/lib/x86_64-linux-gnu/libwx_baseu-3.0.so.0.0.0)
==7165==    by 0x402E27: main (main.cpp:10)
==7165== 
==7165== ----------------------------------------------------------------
==7165== 
==7165== Thread #1: lock order "0xDEA0720 before 0xDE21EE0" violated
==7165== 
==7165== Observed (incorrect) order is: acquisition of lock at 0xDE21EE0
==7165==    at 0x4C2FC35: pthread_mutex_lock (in /usr/lib/valgrind/vgpreload_helgrind-amd64-linux.so)
==7165==    by 0x75F9F11: g_type_class_ref (in /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.3800.1)
==7165==    by 0x75E2F28: g_object_newv (in /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.3800.1)
==7165==    by 0x75E368B: g_object_new (in /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.3800.1)
==7165==    by 0x10D7BCE1: ibus_im_context_new (in /usr/lib/x86_64-linux-gnu/gtk-2.0/2.10.0/immodules/im-ibus.so)
==7165==    by 0x64724ED: _gtk_im_module_create (gtkimmodule.c:614)
==7165==    by 0x6472DD8: gtk_im_multicontext_get_slave (gtkimmulticontext.c:254)
==7165==    by 0x6472E0F: gtk_im_multicontext_set_use_preedit (gtkimmulticontext.c:410)
==7165==    by 0x50BEE3D: wxWindow::PostCreation() (in /usr/lib/x86_64-linux-gnu/libwx_gtk2u_core-3.0.so.0.0.0)
==7165==    by 0x50B64DF: wxTopLevelWindowGTK::Create(wxWindow*, int, wxString const&, wxPoint const&, wxSize const&, long, wxString const&) (in /usr/lib/x86_64-linux-gnu/libwx_gtk2u_core-3.0.so.0.0.0)
==7165==    by 0x403160: Hang::OnInit() (frame.h:31)
==7165==    by 0x56E912B: wxEntry(int&, wchar_t**) (in /usr/lib/x86_64-linux-gnu/libwx_baseu-3.0.so.0.0.0)
==7165==    by 0x402E27: main (main.cpp:10)
==7165== 
==7165==  followed by a later acquisition of lock at 0xDEA0720
==7165==    at 0x4C2FC35: pthread_mutex_lock (in /usr/lib/valgrind/vgpreload_helgrind-amd64-linux.so)
==7165==    by 0x78A53A0: g_mutex_lock (in /lib/x86_64-linux-gnu/libglib-2.0.so.0.3800.1)
==7165==    by 0x9913104: ??? (in /usr/lib/x86_64-linux-gnu/libgio-2.0.so.0.3800.1)
==7165==    by 0x991377F: ??? (in /usr/lib/x86_64-linux-gnu/libgio-2.0.so.0.3800.1)
==7165==    by 0x990054D: g_file_new_for_path (in /usr/lib/x86_64-linux-gnu/libgio-2.0.so.0.3800.1)
==7165==    by 0x10F9DB8C: ??? (in /usr/lib/x86_64-linux-gnu/libibus-1.0.so.5.0.503)
==7165==    by 0x75FCC3A: g_type_create_instance (in /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.3800.1)
==7165==    by 0x75E0CC7: ??? (in /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.3800.1)
==7165==    by 0x10FA0324: ??? (in /usr/lib/x86_64-linux-gnu/libibus-1.0.so.5.0.503)
==7165==    by 0x75E1073: ??? (in /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.3800.1)
==7165==    by 0x75E3293: g_object_new_valist (in /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.3800.1)
==7165==    by 0x75E3673: g_object_new (in /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.3800.1)
==7165==    by 0x10F9E1E5: ibus_bus_new_async (in /usr/lib/x86_64-linux-gnu/libibus-1.0.so.5.0.503)
==7165==    by 0x10D7B289: ??? (in /usr/lib/x86_64-linux-gnu/gtk-2.0/2.10.0/immodules/im-ibus.so)
==7165==    by 0x75FA34D: g_type_class_ref (in /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.3800.1)
==7165==    by 0x75E2F28: g_object_newv (in /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.3800.1)
==7165==    by 0x75E368B: g_object_new (in /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.3800.1)
==7165==    by 0x10D7BCE1: ibus_im_context_new (in /usr/lib/x86_64-linux-gnu/gtk-2.0/2.10.0/immodules/im-ibus.so)
==7165==    by 0x64724ED: _gtk_im_module_create (gtkimmodule.c:614)
==7165==    by 0x6472DD8: gtk_im_multicontext_get_slave (gtkimmulticontext.c:254)
==7165==    by 0x6472E0F: gtk_im_multicontext_set_use_preedit (gtkimmulticontext.c:410)
==7165==    by 0x50BEE3D: wxWindow::PostCreation() (in /usr/lib/x86_64-linux-gnu/libwx_gtk2u_core-3.0.so.0.0.0)
==7165==    by 0x50B64DF: wxTopLevelWindowGTK::Create(wxWindow*, int, wxString const&, wxPoint const&, wxSize const&, long, wxString const&) (in /usr/lib/x86_64-linux-gnu/libwx_gtk2u_core-3.0.so.0.0.0)
==7165==    by 0x403160: Hang::OnInit() (frame.h:31)
==7165==    by 0x56E912B: wxEntry(int&, wchar_t**) (in /usr/lib/x86_64-linux-gnu/libwx_baseu-3.0.so.0.0.0)
==7165==    by 0x402E27: main (main.cpp:10)
==7165== 
==7165== Required order was established by acquisition of lock at 0xDEA0720
==7165==    at 0x4C2FC35: pthread_mutex_lock (in /usr/lib/valgrind/vgpreload_helgrind-amd64-linux.so)
==7165==    by 0x78A53A0: g_mutex_lock (in /lib/x86_64-linux-gnu/libglib-2.0.so.0.3800.1)
==7165==    by 0x9913104: ??? (in /usr/lib/x86_64-linux-gnu/libgio-2.0.so.0.3800.1)
==7165==    by 0x991377F: ??? (in /usr/lib/x86_64-linux-gnu/libgio-2.0.so.0.3800.1)
==7165==    by 0x996068D: g_settings_backend_get_default (in /usr/lib/x86_64-linux-gnu/libgio-2.0.so.0.3800.1)
==7165==    by 0x99630AA: ??? (in /usr/lib/x86_64-linux-gnu/libgio-2.0.so.0.3800.1)
==7165==    by 0x75E1119: ??? (in /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.3800.1)
==7165==    by 0x75E3293: g_object_new_valist (in /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.3800.1)
==7165==    by 0x75E3673: g_object_new (in /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.3800.1)
==7165==    by 0xEAA73E0: gtk_module_init (in /usr/lib/x86_64-linux-gnu/gtk-2.0/modules/liboverlay-scrollbar.so)
==7165==    by 0x649F0F0: default_display_notify_cb (gtkmodules.c:445)
==7165==    by 0x75DC187: g_closure_invoke (in /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.3800.1)
==7165==    by 0x75EDB1C: ??? (in /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.3800.1)
==7165==    by 0x75F5828: g_signal_emit_valist (in /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.3800.1)
==7165==    by 0x75F5AE1: g_signal_emit (in /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.3800.1)
==7165==    by 0x75E0504: ??? (in /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.3800.1)
==7165==    by 0x75E2ABA: g_object_notify (in /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.3800.1)
==7165==    by 0x69B5F74: gdk_display_open_default_libgtk_only (gdk.c:335)
==7165==    by 0x6487103: gtk_init_check (gtkmain.c:1009)
==7165==    by 0x5091BE3: wxApp::Initialize(int&, wchar_t**) (in /usr/lib/x86_64-linux-gnu/libwx_gtk2u_core-3.0.so.0.0.0)
==7165==    by 0x56E8531: wxEntryStart(int&, wchar_t**) (in /usr/lib/x86_64-linux-gnu/libwx_baseu-3.0.so.0.0.0)
==7165==    by 0x56E909B: wxInitialize(int, wchar_t**) (in /usr/lib/x86_64-linux-gnu/libwx_baseu-3.0.so.0.0.0)
==7165==    by 0x56E90EC: wxEntry(int&, wchar_t**) (in /usr/lib/x86_64-linux-gnu/libwx_baseu-3.0.so.0.0.0)
==7165==    by 0x402E27: main (main.cpp:10)
==7165== 
==7165==  followed by a later acquisition of lock at 0xDE21EE0
==7165==    at 0x4C2FC35: pthread_mutex_lock (in /usr/lib/valgrind/vgpreload_helgrind-amd64-linux.so)
==7165==    by 0x75F9F11: g_type_class_ref (in /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.3800.1)
==7165==    by 0x75E2F28: g_object_newv (in /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.3800.1)
==7165==    by 0x75E368B: g_object_new (in /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.3800.1)
==7165==    by 0x991298E: g_io_module_new (in /usr/lib/x86_64-linux-gnu/libgio-2.0.so.0.3800.1)
==7165==    by 0x9912DD6: g_io_modules_scan_all_in_directory_with_scope (in /usr/lib/x86_64-linux-gnu/libgio-2.0.so.0.3800.1)
==7165==    by 0x991319B: ??? (in /usr/lib/x86_64-linux-gnu/libgio-2.0.so.0.3800.1)
==7165==    by 0x991377F: ??? (in /usr/lib/x86_64-linux-gnu/libgio-2.0.so.0.3800.1)
==7165==    by 0x996068D: g_settings_backend_get_default (in /usr/lib/x86_64-linux-gnu/libgio-2.0.so.0.3800.1)
==7165==    by 0x99630AA: ??? (in /usr/lib/x86_64-linux-gnu/libgio-2.0.so.0.3800.1)
==7165==    by 0x75E1119: ??? (in /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.3800.1)
==7165==    by 0x75E3293: g_object_new_valist (in /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.3800.1)
==7165==    by 0x75E3673: g_object_new (in /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.3800.1)
==7165==    by 0xEAA73E0: gtk_module_init (in /usr/lib/x86_64-linux-gnu/gtk-2.0/modules/liboverlay-scrollbar.so)
==7165==    by 0x649F0F0: default_display_notify_cb (gtkmodules.c:445)
==7165==    by 0x75DC187: g_closure_invoke (in /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.3800.1)
==7165==    by 0x75EDB1C: ??? (in /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.3800.1)
==7165==    by 0x75F5828: g_signal_emit_valist (in /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.3800.1)
==7165==    by 0x75F5AE1: g_signal_emit (in /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.3800.1)
==7165==    by 0x75E0504: ??? (in /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.3800.1)
==7165==    by 0x75E2ABA: g_object_notify (in /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.3800.1)
==7165==    by 0x69B5F74: gdk_display_open_default_libgtk_only (gdk.c:335)
==7165==    by 0x6487103: gtk_init_check (gtkmain.c:1009)
==7165==    by 0x5091BE3: wxApp::Initialize(int&, wchar_t**) (in /usr/lib/x86_64-linux-gnu/libwx_gtk2u_core-3.0.so.0.0.0)
==7165==    by 0x56E8531: wxEntryStart(int&, wchar_t**) (in /usr/lib/x86_64-linux-gnu/libwx_baseu-3.0.so.0.0.0)
==7165==    by 0x56E909B: wxInitialize(int, wchar_t**) (in /usr/lib/x86_64-linux-gnu/libwx_baseu-3.0.so.0.0.0)
==7165==    by 0x56E90EC: wxEntry(int&, wchar_t**) (in /usr/lib/x86_64-linux-gnu/libwx_baseu-3.0.so.0.0.0)
==7165==    by 0x402E27: main (main.cpp:10)
==7165== 
==7165== ----------------------------------------------------------------
==7165== 
==7165== Thread #1: lock order "0xDEF2E10 before 0xDE21EE0" violated
==7165== 
==7165== Observed (incorrect) order is: acquisition of lock at 0xDE21EE0
==7165==    at 0x4C2FC35: pthread_mutex_lock (in /usr/lib/valgrind/vgpreload_helgrind-amd64-linux.so)
==7165==    by 0x75F9F11: g_type_class_ref (in /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.3800.1)
==7165==    by 0x75E2F28: g_object_newv (in /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.3800.1)
==7165==    by 0x75E368B: g_object_new (in /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.3800.1)
==7165==    by 0x10D7BCE1: ibus_im_context_new (in /usr/lib/x86_64-linux-gnu/gtk-2.0/2.10.0/immodules/im-ibus.so)
==7165==    by 0x64724ED: _gtk_im_module_create (gtkimmodule.c:614)
==7165==    by 0x6472DD8: gtk_im_multicontext_get_slave (gtkimmulticontext.c:254)
==7165==    by 0x6472E0F: gtk_im_multicontext_set_use_preedit (gtkimmulticontext.c:410)
==7165==    by 0x50BEE3D: wxWindow::PostCreation() (in /usr/lib/x86_64-linux-gnu/libwx_gtk2u_core-3.0.so.0.0.0)
==7165==    by 0x50B64DF: wxTopLevelWindowGTK::Create(wxWindow*, int, wxString const&, wxPoint const&, wxSize const&, long, wxString const&) (in /usr/lib/x86_64-linux-gnu/libwx_gtk2u_core-3.0.so.0.0.0)
==7165==    by 0x403160: Hang::OnInit() (frame.h:31)
==7165==    by 0x56E912B: wxEntry(int&, wchar_t**) (in /usr/lib/x86_64-linux-gnu/libwx_baseu-3.0.so.0.0.0)
==7165==    by 0x402E27: main (main.cpp:10)
==7165== 
==7165==  followed by a later acquisition of lock at 0xDEF2E10
==7165==    at 0x4C2FC35: pthread_mutex_lock (in /usr/lib/valgrind/vgpreload_helgrind-amd64-linux.so)
==7165==    by 0x78A53A0: g_mutex_lock (in /lib/x86_64-linux-gnu/libglib-2.0.so.0.3800.1)
==7165==    by 0x99739AF: ??? (in /usr/lib/x86_64-linux-gnu/libgio-2.0.so.0.3800.1)
==7165==    by 0x9978EDA: g_bus_get_sync (in /usr/lib/x86_64-linux-gnu/libgio-2.0.so.0.3800.1)
==7165==    by 0x111E04F7: ??? (in /usr/lib/x86_64-linux-gnu/gio/modules/libgvfsdbus.so)
==7165==    by 0x75FCC3A: g_type_create_instance (in /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.3800.1)
==7165==    by 0x75E10E4: ??? (in /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.3800.1)
==7165==    by 0x75E2EDC: g_object_newv (in /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.3800.1)
==7165==    by 0x75E368B: g_object_new (in /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.3800.1)
==7165==    by 0x99136E0: ??? (in /usr/lib/x86_64-linux-gnu/libgio-2.0.so.0.3800.1)
==7165==    by 0x991385F: ??? (in /usr/lib/x86_64-linux-gnu/libgio-2.0.so.0.3800.1)
==7165==    by 0x990054D: g_file_new_for_path (in /usr/lib/x86_64-linux-gnu/libgio-2.0.so.0.3800.1)
==7165==    by 0x10F9DB8C: ??? (in /usr/lib/x86_64-linux-gnu/libibus-1.0.so.5.0.503)
==7165==    by 0x75FCC3A: g_type_create_instance (in /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.3800.1)
==7165==    by 0x75E0CC7: ??? (in /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.3800.1)
==7165==    by 0x10FA0324: ??? (in /usr/lib/x86_64-linux-gnu/libibus-1.0.so.5.0.503)
==7165==    by 0x75E1073: ??? (in /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.3800.1)
==7165==    by 0x75E3293: g_object_new_valist (in /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.3800.1)
==7165==    by 0x75E3673: g_object_new (in /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.3800.1)
==7165==    by 0x10F9E1E5: ibus_bus_new_async (in /usr/lib/x86_64-linux-gnu/libibus-1.0.so.5.0.503)
==7165==    by 0x10D7B289: ??? (in /usr/lib/x86_64-linux-gnu/gtk-2.0/2.10.0/immodules/im-ibus.so)
==7165==    by 0x75FA34D: g_type_class_ref (in /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.3800.1)
==7165==    by 0x75E2F28: g_object_newv (in /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.3800.1)
==7165==    by 0x75E368B: g_object_new (in /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.3800.1)
==7165==    by 0x10D7BCE1: ibus_im_context_new (in /usr/lib/x86_64-linux-gnu/gtk-2.0/2.10.0/immodules/im-ibus.so)
==7165==    by 0x64724ED: _gtk_im_module_create (gtkimmodule.c:614)
==7165==    by 0x6472DD8: gtk_im_multicontext_get_slave (gtkimmulticontext.c:254)
==7165==    by 0x6472E0F: gtk_im_multicontext_set_use_preedit (gtkimmulticontext.c:410)
==7165==    by 0x50BEE3D: wxWindow::PostCreation() (in /usr/lib/x86_64-linux-gnu/libwx_gtk2u_core-3.0.so.0.0.0)
==7165==    by 0x50B64DF: wxTopLevelWindowGTK::Create(wxWindow*, int, wxString const&, wxPoint const&, wxSize const&, long, wxString const&) (in /usr/lib/x86_64-linux-gnu/libwx_gtk2u_core-3.0.so.0.0.0)
==7165== 
==7165== Required order was established by acquisition of lock at 0xDEF2E10
==7165==    at 0x4C2FC35: pthread_mutex_lock (in /usr/lib/valgrind/vgpreload_helgrind-amd64-linux.so)
==7165==    by 0x78A53A0: g_mutex_lock (in /lib/x86_64-linux-gnu/libglib-2.0.so.0.3800.1)
==7165==    by 0x99739AF: ??? (in /usr/lib/x86_64-linux-gnu/libgio-2.0.so.0.3800.1)
==7165==    by 0x9978EDA: g_bus_get_sync (in /usr/lib/x86_64-linux-gnu/libgio-2.0.so.0.3800.1)
==7165==    by 0x10370834: ??? (in /usr/lib/x86_64-linux-gnu/gio/modules/libdconfsettings.so)
==7165==    by 0x1037095C: ??? (in /usr/lib/x86_64-linux-gnu/gio/modules/libdconfsettings.so)
==7165==    by 0x78653B5: g_main_context_dispatch (in /lib/x86_64-linux-gnu/libglib-2.0.so.0.3800.1)
==7165==    by 0x7865707: ??? (in /lib/x86_64-linux-gnu/libglib-2.0.so.0.3800.1)
==7165==    by 0x78657AB: g_main_context_iteration (in /lib/x86_64-linux-gnu/libglib-2.0.so.0.3800.1)
==7165==    by 0x10370A9C: ??? (in /usr/lib/x86_64-linux-gnu/gio/modules/libdconfsettings.so)
==7165==    by 0x788A0F4: ??? (in /lib/x86_64-linux-gnu/libglib-2.0.so.0.3800.1)
==7165==    by 0x4C2EA06: ??? (in /usr/lib/valgrind/vgpreload_helgrind-amd64-linux.so)
==7165==    by 0x8C59F6D: start_thread (pthread_create.c:311)
==7165==    by 0x608E9CC: clone (clone.S:113)
==7165== 
==7165==  followed by a later acquisition of lock at 0xDE21EE0
==7165==    at 0x4C2FC35: pthread_mutex_lock (in /usr/lib/valgrind/vgpreload_helgrind-amd64-linux.so)
==7165==    by 0x75FD07B: g_type_add_interface_static (in /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.3800.1)
==7165==    by 0x9971ABB: g_dbus_connection_get_type (in /usr/lib/x86_64-linux-gnu/libgio-2.0.so.0.3800.1)
==7165==    by 0x9973A1E: ??? (in /usr/lib/x86_64-linux-gnu/libgio-2.0.so.0.3800.1)
==7165==    by 0x9978EDA: g_bus_get_sync (in /usr/lib/x86_64-linux-gnu/libgio-2.0.so.0.3800.1)
==7165==    by 0x10370834: ??? (in /usr/lib/x86_64-linux-gnu/gio/modules/libdconfsettings.so)
==7165==    by 0x1037095C: ??? (in /usr/lib/x86_64-linux-gnu/gio/modules/libdconfsettings.so)
==7165==    by 0x78653B5: g_main_context_dispatch (in /lib/x86_64-linux-gnu/libglib-2.0.so.0.3800.1)
==7165==    by 0x7865707: ??? (in /lib/x86_64-linux-gnu/libglib-2.0.so.0.3800.1)
==7165==    by 0x78657AB: g_main_context_iteration (in /lib/x86_64-linux-gnu/libglib-2.0.so.0.3800.1)
==7165==    by 0x10370A9C: ??? (in /usr/lib/x86_64-linux-gnu/gio/modules/libdconfsettings.so)
==7165==    by 0x788A0F4: ??? (in /lib/x86_64-linux-gnu/libglib-2.0.so.0.3800.1)
==7165==    by 0x4C2EA06: ??? (in /usr/lib/valgrind/vgpreload_helgrind-amd64-linux.so)
==7165==    by 0x8C59F6D: start_thread (pthread_create.c:311)
==7165==    by 0x608E9CC: clone (clone.S:113)
==7165== 
==7165== ----------------------------------------------------------------
==7165== 
==7165== Thread #1: Exiting thread still holds 3 locks
==7165==    at 0x8C6080C: __lll_lock_wait (lowlevellock.S:135)
==7165==    by 0x8C5C191: _L_lock_1142 (pthread_mutex_lock.c:120)
==7165==    by 0x8C5C10E: pthread_mutex_lock (pthread_mutex_lock.c:104)
==7165==    by 0x4C2FB62: pthread_mutex_lock (in /usr/lib/valgrind/vgpreload_helgrind-amd64-linux.so)
==7165==    by 0x78A53A0: g_mutex_lock (in /lib/x86_64-linux-gnu/libglib-2.0.so.0.3800.1)
==7165==    by 0x997858E: ??? (in /usr/lib/x86_64-linux-gnu/libgio-2.0.so.0.3800.1)
==7165==    by 0x9978EF2: g_bus_get_sync (in /usr/lib/x86_64-linux-gnu/libgio-2.0.so.0.3800.1)
==7165==    by 0x111E04F7: ??? (in /usr/lib/x86_64-linux-gnu/gio/modules/libgvfsdbus.so)
==7165==    by 0x75FCC3A: g_type_create_instance (in /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.3800.1)
==7165==    by 0x75E10E4: ??? (in /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.3800.1)
==7165==    by 0x75E2EDC: g_object_newv (in /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.3800.1)
==7165==    by 0x75E368B: g_object_new (in /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.3800.1)
==7165==    by 0x99136E0: ??? (in /usr/lib/x86_64-linux-gnu/libgio-2.0.so.0.3800.1)
==7165==    by 0x991385F: ??? (in /usr/lib/x86_64-linux-gnu/libgio-2.0.so.0.3800.1)
==7165==    by 0x990054D: g_file_new_for_path (in /usr/lib/x86_64-linux-gnu/libgio-2.0.so.0.3800.1)
==7165==    by 0x10F9DB8C: ??? (in /usr/lib/x86_64-linux-gnu/libibus-1.0.so.5.0.503)
==7165==    by 0x75FCC3A: g_type_create_instance (in /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.3800.1)
==7165==    by 0x75E0CC7: ??? (in /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.3800.1)
==7165==    by 0x10FA0324: ??? (in /usr/lib/x86_64-linux-gnu/libibus-1.0.so.5.0.503)
==7165==    by 0x75E1073: ??? (in /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.3800.1)
==7165==    by 0x75E3293: g_object_new_valist (in /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.3800.1)
==7165==    by 0x75E3673: g_object_new (in /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.3800.1)
==7165==    by 0x10F9E1E5: ibus_bus_new_async (in /usr/lib/x86_64-linux-gnu/libibus-1.0.so.5.0.503)
==7165==    by 0x10D7B289: ??? (in /usr/lib/x86_64-linux-gnu/gtk-2.0/2.10.0/immodules/im-ibus.so)
==7165==    by 0x75FA34D: g_type_class_ref (in /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.3800.1)
==7165==    by 0x75E2F28: g_object_newv (in /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.3800.1)
==7165==    by 0x75E368B: g_object_new (in /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.3800.1)
==7165==    by 0x10D7BCE1: ibus_im_context_new (in /usr/lib/x86_64-linux-gnu/gtk-2.0/2.10.0/immodules/im-ibus.so)
==7165==    by 0x64724ED: _gtk_im_module_create (gtkimmodule.c:614)
==7165==    by 0x6472DD8: gtk_im_multicontext_get_slave (gtkimmulticontext.c:254)
==7165== 
==7165== ---Thread-Announcement------------------------------------------
==7165== 
==7165== Thread #2 was created
==7165==    at 0x608E98E: clone (clone.S:76)
==7165==    by 0x8C58F24: do_clone.constprop.4 (createthread.c:74)
==7165==    by 0x8C5A64D: pthread_create@@GLIBC_2.2.5 (createthread.c:244)
==7165==    by 0x4C2E870: ??? (in /usr/lib/valgrind/vgpreload_helgrind-amd64-linux.so)
==7165==    by 0x78A5881: ??? (in /lib/x86_64-linux-gnu/libglib-2.0.so.0.3800.1)
==7165==    by 0x788A3CE: ??? (in /lib/x86_64-linux-gnu/libglib-2.0.so.0.3800.1)
==7165==    by 0x788A47A: g_thread_new (in /lib/x86_64-linux-gnu/libglib-2.0.so.0.3800.1)
==7165==    by 0x10370A66: ??? (in /usr/lib/x86_64-linux-gnu/gio/modules/libdconfsettings.so)
==7165==    by 0x10370B1C: ??? (in /usr/lib/x86_64-linux-gnu/gio/modules/libdconfsettings.so)
==7165==    by 0x1036EEB3: ??? (in /usr/lib/x86_64-linux-gnu/gio/modules/libdconfsettings.so)
==7165==    by 0x75E1119: ??? (in /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.3800.1)
==7165==    by 0x75E3293: g_object_new_valist (in /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.3800.1)
==7165==    by 0x75E3673: g_object_new (in /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.3800.1)
==7165==    by 0xEAA73E0: gtk_module_init (in /usr/lib/x86_64-linux-gnu/gtk-2.0/modules/liboverlay-scrollbar.so)
==7165==    by 0x649F0F0: default_display_notify_cb (gtkmodules.c:445)
==7165==    by 0x75DC187: g_closure_invoke (in /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.3800.1)
==7165==    by 0x75EDB1C: ??? (in /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.3800.1)
==7165==    by 0x75F5828: g_signal_emit_valist (in /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.3800.1)
==7165==    by 0x75F5AE1: g_signal_emit (in /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.3800.1)
==7165==    by 0x75E0504: ??? (in /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.3800.1)
==7165==    by 0x75E2ABA: g_object_notify (in /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.3800.1)
==7165==    by 0x69B5F74: gdk_display_open_default_libgtk_only (gdk.c:335)
==7165==    by 0x6487103: gtk_init_check (gtkmain.c:1009)
==7165==    by 0x5091BE3: wxApp::Initialize(int&, wchar_t**) (in /usr/lib/x86_64-linux-gnu/libwx_gtk2u_core-3.0.so.0.0.0)
==7165==    by 0x56E8531: wxEntryStart(int&, wchar_t**) (in /usr/lib/x86_64-linux-gnu/libwx_baseu-3.0.so.0.0.0)
==7165==    by 0x56E909B: wxInitialize(int, wchar_t**) (in /usr/lib/x86_64-linux-gnu/libwx_baseu-3.0.so.0.0.0)
==7165==    by 0x56E90EC: wxEntry(int&, wchar_t**) (in /usr/lib/x86_64-linux-gnu/libwx_baseu-3.0.so.0.0.0)
==7165==    by 0x402E27: main (main.cpp:10)
==7165== 
==7165== ----------------------------------------------------------------
==7165== 
==7165== Thread #2: Exiting thread still holds 1 lock
==7165==    at 0x8C6080C: __lll_lock_wait (lowlevellock.S:135)
==7165==    by 0x8C5C176: _L_lock_1035 (pthread_mutex_lock.c:120)
==7165==    by 0x8C5C007: pthread_mutex_lock (pthread_mutex_lock.c:85)
==7165==    by 0x4C2FB62: pthread_mutex_lock (in /usr/lib/valgrind/vgpreload_helgrind-amd64-linux.so)
==7165==    by 0x75F9F11: g_type_class_ref (in /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.3800.1)
==7165==    by 0x75E34F8: g_object_new_valist (in /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.3800.1)
==7165==    by 0x75E3673: g_object_new (in /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.3800.1)
==7165==    by 0x99789D2: ??? (in /usr/lib/x86_64-linux-gnu/libgio-2.0.so.0.3800.1)
==7165==    by 0x9978EF2: g_bus_get_sync (in /usr/lib/x86_64-linux-gnu/libgio-2.0.so.0.3800.1)
==7165==    by 0x10370834: ??? (in /usr/lib/x86_64-linux-gnu/gio/modules/libdconfsettings.so)
==7165==    by 0x1037095C: ??? (in /usr/lib/x86_64-linux-gnu/gio/modules/libdconfsettings.so)
==7165==    by 0x78653B5: g_main_context_dispatch (in /lib/x86_64-linux-gnu/libglib-2.0.so.0.3800.1)
==7165==    by 0x7865707: ??? (in /lib/x86_64-linux-gnu/libglib-2.0.so.0.3800.1)
==7165==    by 0x78657AB: g_main_context_iteration (in /lib/x86_64-linux-gnu/libglib-2.0.so.0.3800.1)
==7165==    by 0x10370A9C: ??? (in /usr/lib/x86_64-linux-gnu/gio/modules/libdconfsettings.so)
==7165==    by 0x788A0F4: ??? (in /lib/x86_64-linux-gnu/libglib-2.0.so.0.3800.1)
==7165==    by 0x4C2EA06: ??? (in /usr/lib/valgrind/vgpreload_helgrind-amd64-linux.so)
==7165==    by 0x8C59F6D: start_thread (pthread_create.c:311)
==7165==    by 0x608E9CC: clone (clone.S:113)
==7165== 
==7165== 
==7165== For counts of detected and suppressed errors, rerun with: -v
==7165== Use --history-level=approx or =none to gain increased speed, at
==7165== the cost of reduced accuracy of conflicting-access information
==7165== ERROR SUMMARY: 130 errors from 6 contexts (suppressed: 554 from 217)

Attachments (1)

hang.tar.gz download (5.2 KB) - added by ryanjmulder 7 months ago.
minimal sample

Download all attachments as: .zip

Change History (5)

Changed 7 months ago by ryanjmulder

minimal sample

comment:1 Changed 7 months ago by vadz

  • Keywords ubuntu added

This definitely looks like a deadlock but I don't think we can do anything about it, all we do is calling gtk_im_context_set_use_preedit() from a single thread on the app startup and it seems that it deadlocks inside it due to a bug in (Ubuntu-modified, I bet) version of GTK+. IMHO you should report it as a bug to Ubuntu, especially if it's still present in 14.04 as it should be reproducible with a raw GTK+ example too.

I'm leaving it open in case I'm missing something and Paul has a different opinion but, again, I don't see how could this be possible fixed at wx level.

comment:2 Changed 7 months ago by iwbnwif

I would like to add that I have been facing this problem for the last 3 versions of Ubuntu, 12.10, 13.04 and 13.10. Possibly it existed with earlier versions too but I wasn't experimenting with wxWidgets before then. For me it only affected small apps such as the samples, larger apps Code::Blocks and CodeLite were not affected.

I was able to work around it by inserting wxMilliSleep(100) just before the wxFrame constructor is called, but I know this didn't work for Ryan (maybe I am using older slower hardware?).

FWIW I never experienced anything like this with any non-wxWidgets applications.

However since upgrading to 14.04 last week the problem _seems_ to be solved.

Unfortunately I only noticed Ryan's post after I had upgraded so wasn't able to see if wxDefaultSize solved the problem on my system.

comment:3 Changed 7 months ago by pcor

Although this deadlock does not appear to be our fault, we may be able to avoid it. Since it seems to occur when the GtkIMContext calls are done relatively early, doing the calls at a later time might help.

comment:4 Changed 7 months ago by PC

In 76398:

Delay GtkIMContext calls until widget is realized.
This may avoid a locking bug seen on Ubuntu which causes a deadlock.
See #16202

Note: See TracTickets for help on using tickets.