Run error after OS reinstall, wx3.0

Do you have a question about makefiles, a compiler or IDE you are using and need to know how to set it up for wxWidgets or why it doesn't compile but other IDE's do ? Post your questions here.
Post Reply
SteelRat
Experienced Solver
Experienced Solver
Posts: 50
Joined: Tue Sep 08, 2009 4:42 pm
Location: Russia, Obninsk

Run error after OS reinstall, wx3.0

Post by SteelRat » Wed Sep 10, 2014 11:30 am

I just installed LinuxMint 17, and my app does not starting now. It crashes before entering to wxApp::OnInit. On previous linux wxWidgets was built from sources by myself, now i installed libwxgtk-3.0.0-dev package. Examples from package "wx-examples" are run normally. :? I can't understand what is wrong.
Here is debug log:

Code: Select all

[debug]> run
[debug]Starting program: /home/user/stuff/gipeeditor/bin/gipe_editor_d 
[debug][Thread debugging using libthread_db enabled]
[debug]Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
[debug](process:19760): GLib-GObject-WARNING **: invalid (NULL) pointer instance
[debug](process:19760): GLib-GObject-CRITICAL **: g_signal_connect_data: assertion 'G_TYPE_CHECK_INSTANCE (instance)' failed
[debug](process:19760): Gdk-CRITICAL **: IA__gdk_screen_get_default_colormap: assertion 'GDK_IS_SCREEN (screen)' failed
[debug](process:19760): Gdk-CRITICAL **: IA__gdk_colormap_get_visual: assertion 'GDK_IS_COLORMAP (colormap)' failed
[debug](process:19760): Gdk-CRITICAL **: IA__gdk_screen_get_default_colormap: assertion 'GDK_IS_SCREEN (screen)' failed
[debug](process:19760): Gdk-CRITICAL **: IA__gdk_screen_get_root_window: assertion 'GDK_IS_SCREEN (screen)' failed
[debug](process:19760): Gdk-CRITICAL **: IA__gdk_screen_get_root_window: assertion 'GDK_IS_SCREEN (screen)' failed
[debug](process:19760): Gdk-CRITICAL **: IA__gdk_window_new: assertion 'GDK_IS_WINDOW (parent)' failed
[debug]Program received signal SIGSEGV, Segmentation fault.
[debug]0x00007ffff63a54e9 in gdk_window_enable_synchronized_configure () from /usr/lib/x86_64-linux-gnu/libgdk-x11-2.0.so.0
[debug]>>>>>>cb_gdb:

Program received signal SIGSEGV, Segmentation fault.
In gdk_window_enable_synchronized_configure () (/usr/lib/x86_64-linux-gnu/libgdk-x11-2.0.so.0)

[debug]> bt 30
[debug]#0  0x00007ffff63a54e9 in gdk_window_enable_synchronized_configure () from /usr/lib/x86_64-linux-gnu/libgdk-x11-2.0.so.0
[debug]#1  0x00007ffff683898e in ?? () from /usr/lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0
[debug]#2  0x00007ffff36a55e7 in ?? () from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
[debug]#3  0x00007ffff36be088 in g_signal_emit_valist () from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
[debug]#4  0x00007ffff36bece2 in g_signal_emit () from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
[debug]#5  0x00007ffff682c6e0 in gtk_widget_realize () from /usr/lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0
[debug]#6  0x00007ffff7304a4a in ?? () from /usr/lib/x86_64-linux-gnu/libwx_gtk2u_core-3.0.so.0
[debug]#7  0x00007ffff7308ed9 in wxBitmap::CreateFromImageAsPixmap(wxImage const&, int) () from /usr/lib/x86_64-linux-gnu/libwx_gtk2u_core-3.0.so.0
[debug]#8  0x00007ffff7309aea in wxBitmap::wxBitmap(wxImage const&, int) () from /usr/lib/x86_64-linux-gnu/libwx_gtk2u_core-3.0.so.0
[debug]#9  0x0000000000424b55 in _GLOBAL__sub_I__ZN9DrawPanel9sRefCountE ()
[debug]#10 0x00000000006ab35d in __libc_csu_init ()
[debug]#11 0x00007ffff3907e55 in __libc_start_main () from /lib/x86_64-linux-gnu/libc.so.6
[debug]#12 0x0000000000424cd9 in _start ()
Win7/LinuxMint 17, VS2013/C::B, wxWidgets 3.0 x64

Manolo
Can't get richer than this
Can't get richer than this
Posts: 712
Joined: Mon Apr 30, 2012 11:07 pm

Re: Run error after OS reinstall, wx3.0

Post by Manolo » Wed Sep 10, 2014 9:24 pm

When you compile your app you tell somewhere the compiler to use gtk2 or gtk3 libs, and also gtk2/3 wx compilation.
I would check that both wx and your app use the same gtk version.

SteelRat
Experienced Solver
Experienced Solver
Posts: 50
Joined: Tue Sep 08, 2009 4:42 pm
Location: Russia, Obninsk

Re: Run error after OS reinstall, wx3.0

Post by SteelRat » Thu Sep 11, 2014 5:48 am

Yes, i think you're right. I'm using these commands for compiler:
`wx-config --cflags --libs std aui propgrid`
`pkg-config --cflags --libs gtk+-2.0`

Output:

Code: Select all

-L/usr/lib/x86_64-linux-gnu -pthread   -lwx_gtk2u_aui-3.0 -lwx_gtk2u_propgrid-3.0 -lwx_gtk2u_xrc-3.0 -lwx_gtk2u_html-3.0 -lwx_gtk2u_qa-3.0 -lwx_gtk2u_adv-3.0 -lwx_gtk2u_core-3.0 -lwx_baseu_xml-3.0 -lwx_baseu_net-3.0 -lwx_baseu-3.0 

Code: Select all

-pthread -I/usr/include/gtk-2.0 -I/usr/lib/x86_64-linux-gnu/gtk-2.0/include -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/pango-1.0 -I/usr/include/gio-unix-2.0/ -I/usr/include/freetype2 -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/libpng12 -I/usr/include/harfbuzz  -lgtk-x11-2.0 -lgdk-x11-2.0 -latk-1.0 -lgio-2.0 -lpangoft2-1.0 -lpangocairo-1.0 -lgdk_pixbuf-2.0 -lcairo -lpango-1.0 -lfontconfig -lgobject-2.0 -lglib-2.0 -lfreetype  
It looks ok. Well, i have to try rebuild wxWidgets myself.
Win7/LinuxMint 17, VS2013/C::B, wxWidgets 3.0 x64

SteelRat
Experienced Solver
Experienced Solver
Posts: 50
Joined: Tue Sep 08, 2009 4:42 pm
Location: Russia, Obninsk

Re: Run error after OS reinstall, wx3.0

Post by SteelRat » Thu Sep 11, 2014 8:30 am

No, wxWidgets's rebuilding did not helped. And, as i said but forgot, examples work perfectly.
Win7/LinuxMint 17, VS2013/C::B, wxWidgets 3.0 x64

DavidHart
Site Admin
Site Admin
Posts: 3988
Joined: Thu Jan 12, 2006 6:23 pm
Location: IoW, UK

Re: Run error after OS reinstall, wx3.0

Post by DavidHart » Thu Sep 11, 2014 10:29 am

Hi,

Does the output of doing:
ldd /path/to/your/program
help at all? e.g. does your app link to the old wx build or the new? does it show any missing links?

BTW, presumably you did rebuild your program against the new wx...

Regards,

David

SteelRat
Experienced Solver
Experienced Solver
Posts: 50
Joined: Tue Sep 08, 2009 4:42 pm
Location: Russia, Obninsk

Re: Run error after OS reinstall, wx3.0

Post by SteelRat » Thu Sep 11, 2014 10:58 am

Hi, ldd said - all ok. =) App uses new wxWidgets built against gtk2.0 installed and used by OS. I think this is stupid little bug, may be it somewhat in GCC parameters enabled or disabled.

Code: Select all

linux-vdso.so.1 =>  (0x00007fff78d99000)
	libwx_gtk2u_core-3.0.so.0 => /usr/local/lib/libwx_gtk2u_core-3.0.so.0 (0x00007f99265aa000)
	libwx_baseu-3.0.so.0 => /usr/local/lib/libwx_baseu-3.0.so.0 (0x00007f9926115000)
	libwx_gtk2u_aui-3.0.so.0 => /usr/local/lib/libwx_gtk2u_aui-3.0.so.0 (0x00007f9925e81000)
	libwx_gtk2u_propgrid-3.0.so.0 => /usr/local/lib/libwx_gtk2u_propgrid-3.0.so.0 (0x00007f9925b99000)
	libgtk-x11-2.0.so.0 => /usr/lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0 (0x00007f992555d000)
	libgdk-x11-2.0.so.0 => /usr/lib/x86_64-linux-gnu/libgdk-x11-2.0.so.0 (0x00007f99252aa000)
	liblua5.2.so.0 => /usr/lib/x86_64-linux-gnu/liblua5.2.so.0 (0x00007f9925079000)
	libGL.so.1 => /usr/lib/x86_64-linux-gnu/mesa/libGL.so.1 (0x00007f9924e13000)
	libGLEW.so.1.10 => /usr/lib/x86_64-linux-gnu/libGLEW.so.1.10 (0x00007f9924b86000)
	libjpeg.so.8 => /usr/lib/x86_64-linux-gnu/libjpeg.so.8 (0x00007f9924931000)
	libopenal.so.1 => /usr/lib/x86_64-linux-gnu/libopenal.so.1 (0x00007f99246d8000)
	libsndfile.so.1 => /usr/lib/x86_64-linux-gnu/libsndfile.so.1 (0x00007f992446f000)
	libz.so.1 => /lib/x86_64-linux-gnu/libz.so.1 (0x00007f9924256000)
	librt.so.1 => /lib/x86_64-linux-gnu/librt.so.1 (0x00007f992404e000)
	libX11.so.6 => /usr/lib/x86_64-linux-gnu/libX11.so.6 (0x00007f9923d18000)
	libXrandr.so.2 => /usr/lib/x86_64-linux-gnu/libXrandr.so.2 (0x00007f9923b0e000)
	libudev.so.1 => /lib/x86_64-linux-gnu/libudev.so.1 (0x00007f99238fd000)
	libfreetype.so.6 => /usr/lib/x86_64-linux-gnu/libfreetype.so.6 (0x00007f9923659000)
	libstdc++.so.6 => /usr/lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007f9923355000)
	libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f992304f000)
	libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007f9922e38000)
	libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f9922c1a000)
	libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f9922854000)
	libpangocairo-1.0.so.0 => /usr/lib/x86_64-linux-gnu/libpangocairo-1.0.so.0 (0x00007f9922646000)
	libgdk_pixbuf-2.0.so.0 => /usr/lib/x86_64-linux-gnu/libgdk_pixbuf-2.0.so.0 (0x00007f9922425000)
	libcairo.so.2 => /usr/lib/x86_64-linux-gnu/libcairo.so.2 (0x00007f992211a000)
	libpango-1.0.so.0 => /usr/lib/x86_64-linux-gnu/libpango-1.0.so.0 (0x00007f9921ecc000)
	libgobject-2.0.so.0 => /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0 (0x00007f9921c7b000)
	libglib-2.0.so.0 => /lib/x86_64-linux-gnu/libglib-2.0.so.0 (0x00007f9921973000)
	libXxf86vm.so.1 => /usr/lib/x86_64-linux-gnu/libXxf86vm.so.1 (0x00007f992176c000)
	libSM.so.6 => /usr/lib/x86_64-linux-gnu/libSM.so.6 (0x00007f9921564000)
	libpng12.so.0 => /lib/x86_64-linux-gnu/libpng12.so.0 (0x00007f992133e000)
	libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f9921139000)
	/lib64/ld-linux-x86-64.so.2 (0x00007f9926e12000)
	libwx_gtk2u_adv-3.0.so.0 => /usr/local/lib/libwx_gtk2u_adv-3.0.so.0 (0x00007f9920d58000)
	libgmodule-2.0.so.0 => /usr/lib/x86_64-linux-gnu/libgmodule-2.0.so.0 (0x00007f9920b53000)
	libXfixes.so.3 => /usr/lib/x86_64-linux-gnu/libXfixes.so.3 (0x00007f992094d000)
	libatk-1.0.so.0 => /usr/lib/x86_64-linux-gnu/libatk-1.0.so.0 (0x00007f992072b000)
	libgio-2.0.so.0 => /usr/lib/x86_64-linux-gnu/libgio-2.0.so.0 (0x00007f99203b7000)
	libpangoft2-1.0.so.0 => /usr/lib/x86_64-linux-gnu/libpangoft2-1.0.so.0 (0x00007f99201a2000)
	libfontconfig.so.1 => /usr/lib/x86_64-linux-gnu/libfontconfig.so.1 (0x00007f991ff66000)
	libXrender.so.1 => /usr/lib/x86_64-linux-gnu/libXrender.so.1 (0x00007f991fd5b000)
	libXinerama.so.1 => /usr/lib/x86_64-linux-gnu/libXinerama.so.1 (0x00007f991fb58000)
	libXi.so.6 => /usr/lib/x86_64-linux-gnu/libXi.so.6 (0x00007f991f947000)
	libXcursor.so.1 => /usr/lib/x86_64-linux-gnu/libXcursor.so.1 (0x00007f991f73d000)
	libXcomposite.so.1 => /usr/lib/x86_64-linux-gnu/libXcomposite.so.1 (0x00007f991f53a000)
	libXdamage.so.1 => /usr/lib/x86_64-linux-gnu/libXdamage.so.1 (0x00007f991f337000)
	libXext.so.6 => /usr/lib/x86_64-linux-gnu/libXext.so.6 (0x00007f991f124000)
	libglapi.so.0 => /usr/lib/x86_64-linux-gnu/libglapi.so.0 (0x00007f991eefd000)
	libX11-xcb.so.1 => /usr/lib/x86_64-linux-gnu/libX11-xcb.so.1 (0x00007f991ecfa000)
	libxcb-glx.so.0 => /usr/lib/x86_64-linux-gnu/libxcb-glx.so.0 (0x00007f991eae3000)
	libxcb-dri2.so.0 => /usr/lib/x86_64-linux-gnu/libxcb-dri2.so.0 (0x00007f991e8de000)
	libxcb-dri3.so.0 => /usr/lib/x86_64-linux-gnu/libxcb-dri3.so.0 (0x00007f991e6da000)
	libxcb-present.so.0 => /usr/lib/x86_64-linux-gnu/libxcb-present.so.0 (0x00007f991e4d7000)
	libxcb-sync.so.1 => /usr/lib/x86_64-linux-gnu/libxcb-sync.so.1 (0x00007f991e2d1000)
	libxcb.so.1 => /usr/lib/x86_64-linux-gnu/libxcb.so.1 (0x00007f991e0b1000)
	libxshmfence.so.1 => /usr/lib/x86_64-linux-gnu/libxshmfence.so.1 (0x00007f991deaf000)
	libdrm.so.2 => /usr/lib/x86_64-linux-gnu/libdrm.so.2 (0x00007f991dca3000)
	libFLAC.so.8 => /usr/lib/x86_64-linux-gnu/libFLAC.so.8 (0x00007f991da71000)
	libvorbisenc.so.2 => /usr/lib/x86_64-linux-gnu/libvorbisenc.so.2 (0x00007f991d5a2000)
	libvorbis.so.0 => /usr/lib/x86_64-linux-gnu/libvorbis.so.0 (0x00007f991d375000)
	libogg.so.0 => /usr/lib/x86_64-linux-gnu/libogg.so.0 (0x00007f991d16b000)
	libcgmanager.so.0 => /lib/x86_64-linux-gnu/libcgmanager.so.0 (0x00007f991cf50000)
	libnih.so.1 => /lib/x86_64-linux-gnu/libnih.so.1 (0x00007f991cd37000)
	libnih-dbus.so.1 => /lib/x86_64-linux-gnu/libnih-dbus.so.1 (0x00007f991cb2d000)
	libdbus-1.so.3 => /lib/x86_64-linux-gnu/libdbus-1.so.3 (0x00007f991c8e8000)
	libpixman-1.so.0 => /usr/lib/x86_64-linux-gnu/libpixman-1.so.0 (0x00007f991c63e000)
	libxcb-shm.so.0 => /usr/lib/x86_64-linux-gnu/libxcb-shm.so.0 (0x00007f991c43b000)
	libxcb-render.so.0 => /usr/lib/x86_64-linux-gnu/libxcb-render.so.0 (0x00007f991c232000)
	libthai.so.0 => /usr/lib/x86_64-linux-gnu/libthai.so.0 (0x00007f991c028000)
	libffi.so.6 => /usr/lib/x86_64-linux-gnu/libffi.so.6 (0x00007f991be20000)
	libpcre.so.3 => /lib/x86_64-linux-gnu/libpcre.so.3 (0x00007f991bbe2000)
	libICE.so.6 => /usr/lib/x86_64-linux-gnu/libICE.so.6 (0x00007f991b9c5000)
	libuuid.so.1 => /lib/x86_64-linux-gnu/libuuid.so.1 (0x00007f991b7c0000)
	libselinux.so.1 => /lib/x86_64-linux-gnu/libselinux.so.1 (0x00007f991b59c000)
	libresolv.so.2 => /lib/x86_64-linux-gnu/libresolv.so.2 (0x00007f991b381000)
	libharfbuzz.so.0 => /usr/lib/x86_64-linux-gnu/libharfbuzz.so.0 (0x00007f991b12c000)
	libexpat.so.1 => /lib/x86_64-linux-gnu/libexpat.so.1 (0x00007f991af01000)
	libXau.so.6 => /usr/lib/x86_64-linux-gnu/libXau.so.6 (0x00007f991acfd000)
	libXdmcp.so.6 => /usr/lib/x86_64-linux-gnu/libXdmcp.so.6 (0x00007f991aaf6000)
	libdatrie.so.1 => /usr/lib/x86_64-linux-gnu/libdatrie.so.1 (0x00007f991a8ef000)
	libgraphite2.so.3 => /usr/lib/x86_64-linux-gnu/libgraphite2.so.3 (0x00007f991a6d2000)
Win7/LinuxMint 17, VS2013/C::B, wxWidgets 3.0 x64

SteelRat
Experienced Solver
Experienced Solver
Posts: 50
Joined: Tue Sep 08, 2009 4:42 pm
Location: Russia, Obninsk

Re: Run error after OS reinstall, wx3.0

Post by SteelRat » Thu Sep 11, 2014 12:26 pm

As expected, it was my own stupid mistake. I have library with common wx solutions that i'm using. (For change language on the fly, for example) And it wasn't rebuilt. My Debug app was linked against old Release version of this library, where was error with global static bitmap.
Sorry for wasted time and thanks for help. Rebuildall - rules!
Win7/LinuxMint 17, VS2013/C::B, wxWidgets 3.0 x64

Post Reply