gdk_window_enable_synchronized_configure() segfaults on wxGTK Topic is solved

Do you have a typical platform dependent issue you're battling with ? Ask it here. Make sure you mention your platform, compiler, and wxWidgets version.
Post Reply
TheGreatRambler
Knows some wx things
Knows some wx things
Posts: 28
Joined: Mon Feb 10, 2020 3:09 am

gdk_window_enable_synchronized_configure() segfaults on wxGTK

Post by TheGreatRambler » Sun Apr 05, 2020 3:18 am

In an entirely working wxWidgets program on windows, my program segfaults on construction of the top wxFrame. I have installed wxGTK from the Ubuntu repository with these commands:

Code: Select all

sudo apt-get install libwxbase3.1-0-unofficial && sudo apt-get install libwxbase3.1-dev && sudo apt-get install libwxgtk3.1-0-unofficial && sudo apt-get install libwxgtk3.1-dev && sudo apt-get install wx3.1-headers && sudo apt-get install wx-common
The repo is:

Code: Select all

deb http://repos.codelite.org/wx3.1.3/ubuntu/ bionic universe
I use wx-config to link to the required libs, of course. I do not have the GTK development headers installed, only the above commands have been run. How could the app segfault on very nearly or the first GTK function, but still link entirely successfully? Thank you.

ONEEYEMAN
Part Of The Furniture
Part Of The Furniture
Posts: 4058
Joined: Sat Apr 16, 2005 7:22 am
Location: USA, Ukraine

Re: gdk_window_enable_synchronized_configure() segfaults on wxGTK

Post by ONEEYEMAN » Sun Apr 05, 2020 4:43 am

Hi,
Can you run the program under gdb and get a backtrace at the time of the crash?

Do this:
1. Install gdb if not yet installed.
2 Run: gdb <my_program>
3. At the "gdb>" prompt type "run"
4. When the program crash - type "bt"

Post the backtrce alone with the code for the function where the backtrace stops.

Thank you.

P.S.: Are you running the "debug" or "release" version on Windows?

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

Re: gdk_window_enable_synchronized_configure() segfaults on wxGTK

Post by DavidHart » Sun Apr 05, 2020 7:03 am

Hi,
sudo apt-get install libwxbase3.1-0-unofficial && sudo apt-get install libwxbase3.1-dev && sudo apt-get install libwxgtk3.1-0-unofficial && sudo apt-get install libwxgtk3.1-dev && sudo apt-get install wx3.1-headers && sudo apt-get install wx-common
BTW, apt is able to multitask:
sudo apt-get install libwxbase3.1-0-unofficial libwxbase3.1-dev libwxgtk3.1-0-unofficial libwxgtk3.1-dev wx3.1-headers wx-common
I do not have the GTK development headers installed
They aren't needed unless your program makes direct calls to GTK+ functions.
How could the app segfault on very nearly or the first GTK function, but still link entirely successfully?
You are calling a function, or using some var, that's not yet properly initialised. As ONEEYEMAN said, gdb should help, either with a bt or if you tell it to catch asserts. But first install the wx debug symbols:

Code: Select all

sudo apt-get install libwxbase3.1-0-unofficial-dbg  libwxgtk3.1-0-unofficial-dbg  libwxgtk-webview3.1-0-unofficial-dbg libwxgtk-media3.1-0-unofficial-dbg
Regards,

David

TheGreatRambler
Knows some wx things
Knows some wx things
Posts: 28
Joined: Mon Feb 10, 2020 3:09 am

Re: gdk_window_enable_synchronized_configure() segfaults on wxGTK

Post by TheGreatRambler » Sun Apr 05, 2020 7:08 pm

Thank you! I ran gdb, but it returned exceptions in static libs, so I couldn't get a file of line number. I'll install those packages tonight

User avatar
doublemax
Moderator
Moderator
Posts: 14786
Joined: Fri Apr 21, 2006 8:03 pm
Location: $FCE2

Re: gdk_window_enable_synchronized_configure() segfaults on wxGTK

Post by doublemax » Sun Apr 05, 2020 8:14 pm

BTW: It's also possible that you're doing something wrong in your code that just happens to work under Windows. Is there anything "unusual" in your app/frame initialization?
Use the source, Luke!

ONEEYEMAN
Part Of The Furniture
Part Of The Furniture
Posts: 4058
Joined: Sat Apr 16, 2005 7:22 am
Location: USA, Ukraine

Re: gdk_window_enable_synchronized_configure() segfaults on wxGTK

Post by ONEEYEMAN » Sun Apr 05, 2020 8:46 pm

Hi,
Sorry, I completely missed that - why are you using the static build of wxWidgets?
And are you absolutely sure that those static libraries were build with the GTK+ libraries you have on your system?

I'd still try to track this exception, but keep in mind - on *nix-based OSes you are better off with the dynamic build of the library.

Thank you.

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

Re: gdk_window_enable_synchronized_configure() segfaults on wxGTK

Post by DavidHart » Sun Apr 05, 2020 9:30 pm

why are you using the static build of wxWidgets?
I don't know to what the 'static' word referred, but those unofficial wx libs aren't static ones.

TheGreatRambler
Knows some wx things
Knows some wx things
Posts: 28
Joined: Mon Feb 10, 2020 3:09 am

Re: gdk_window_enable_synchronized_configure() segfaults on wxGTK

Post by TheGreatRambler » Mon Apr 06, 2020 2:12 am

Wait, yeah, GTK can only run in shared libs. It was .so files, so binary files that didn't provide line numbers is what I meant.

TheGreatRambler
Knows some wx things
Knows some wx things
Posts: 28
Joined: Mon Feb 10, 2020 3:09 am

Re: gdk_window_enable_synchronized_configure() segfaults on wxGTK

Post by TheGreatRambler » Mon Apr 06, 2020 2:16 am

My app construction is rather simple:

Code: Select all

#include <atomic>
#include <cstdio>
#include <memory>
#include <thread>
#include <wx/wx.h>

#include "ui/mainWindow.hpp"

class MainApp : public wxApp {
private:
	MainWindow window;

public:
	virtual bool OnInit() {
		window.Show(true);
		window.onStart();
		return true;
	}
};

IMPLEMENT_APP(MainApp);

Code: Select all

MainWindow::MainWindow()
	: wxFrame(NULL, wxID_ANY, "NX TAS UI", wxDefaultPosition, wxDefaultSize) {
	...
}
It segfaults within the wxFrame construction. I have a hunch that the NULL I used to designate it as a top-level window is causing the error, but I'm testing now.

TheGreatRambler
Knows some wx things
Knows some wx things
Posts: 28
Joined: Mon Feb 10, 2020 3:09 am

Re: gdk_window_enable_synchronized_configure() segfaults on wxGTK

Post by TheGreatRambler » Mon Apr 06, 2020 2:19 am

About wxWidgets being either built with debugging or not, I'm not exactly certain (I did build wxWidgets from source on Windows). It has exceptions built in, so I must have.

TheGreatRambler
Knows some wx things
Knows some wx things
Posts: 28
Joined: Mon Feb 10, 2020 3:09 am

Re: gdk_window_enable_synchronized_configure() segfaults on wxGTK

Post by TheGreatRambler » Mon Apr 06, 2020 2:27 am

GDB stacktrace:

Code: Select all

=thread-group-added,id="i1"
GNU gdb (Ubuntu 8.2-0ubuntu1~18.04) 8.2
Copyright (C) 2018 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
    <http://www.gnu.org/software/gdb/documentation/>.

For help, type "help".
Type "apropos word" to search for commands related to "word".
Warning: Debuggee TargetArchitecture not detected, assuming x86_64.
=cmd-param-changed,param="pagination",value="off"
Stopped due to shared library event (no libraries added or removed)
Loaded '/lib64/ld-linux-x86-64.so.2'. Symbols loaded.
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".

Breakpoint 1, main (argc=1, argv=0x7fffffffdd68) at source/main.cpp:45
45	IMPLEMENT_APP(MainApp);
Loaded '/usr/lib/x86_64-linux-gnu/libwx_baseu_unofficial-3.1.so.3'. Symbols loaded.
Loaded '/usr/lib/x86_64-linux-gnu/libwx_gtk2u_unofficial_core-3.1.so.3'. Symbols loaded.
Loaded '/lib/x86_64-linux-gnu/libpthread.so.0'. Symbols loaded.
Loaded '/usr/lib/x86_64-linux-gnu/libstdc++.so.6'. Symbols loaded.
Loaded '/lib/x86_64-linux-gnu/libm.so.6'. Symbols loaded.
Loaded '/lib/x86_64-linux-gnu/libgcc_s.so.1'. Symbols loaded.
Loaded '/lib/x86_64-linux-gnu/libc.so.6'. Symbols loaded.
Loaded '/lib/x86_64-linux-gnu/libdl.so.2'. Symbols loaded.
Loaded '/lib/x86_64-linux-gnu/liblzma.so.5'. Symbols loaded.
Loaded '/usr/lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0'. Symbols loaded.
Loaded '/usr/lib/x86_64-linux-gnu/libgdk-x11-2.0.so.0'. Symbols loaded.
Loaded '/usr/lib/x86_64-linux-gnu/libpangocairo-1.0.so.0'. Symbols loaded.
Loaded '/usr/lib/x86_64-linux-gnu/libcairo.so.2'. Symbols loaded.
Loaded '/usr/lib/x86_64-linux-gnu/libgdk_pixbuf-2.0.so.0'. Symbols loaded.
Loaded '/usr/lib/x86_64-linux-gnu/libgio-2.0.so.0'. Symbols loaded.
Loaded '/usr/lib/x86_64-linux-gnu/libpangoft2-1.0.so.0'. Symbols loaded.
Loaded '/usr/lib/x86_64-linux-gnu/libpango-1.0.so.0'. Symbols loaded.
Loaded '/usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0'. Symbols loaded.
Loaded '/usr/lib/x86_64-linux-gnu/libfontconfig.so.1'. Symbols loaded.
Loaded '/usr/lib/x86_64-linux-gnu/libglib-2.0.so.0'. Symbols loaded.
Loaded '/usr/lib/x86_64-linux-gnu/libX11.so.6'. Symbols loaded.
Loaded '/usr/lib/x86_64-linux-gnu/libXxf86vm.so.1'. Symbols loaded.
Loaded '/usr/lib/x86_64-linux-gnu/libSM.so.6'. Symbols loaded.
Loaded '/usr/lib/x86_64-linux-gnu/libnotify.so.4'. Symbols loaded.
Loaded '/usr/lib/x86_64-linux-gnu/libXtst.so.6'. Symbols loaded.
Loaded '/usr/lib/x86_64-linux-gnu/libgmodule-2.0.so.0'. Symbols loaded.
Loaded '/usr/lib/x86_64-linux-gnu/libXfixes.so.3'. Symbols loaded.
Loaded '/usr/lib/x86_64-linux-gnu/libatk-1.0.so.0'. Symbols loaded.
Loaded '/usr/lib/x86_64-linux-gnu/libXrender.so.1'. Symbols loaded.
Loaded '/usr/lib/x86_64-linux-gnu/libXinerama.so.1'. Symbols loaded.
Loaded '/usr/lib/x86_64-linux-gnu/libXi.so.6'. Symbols loaded.
Loaded '/usr/lib/x86_64-linux-gnu/libXrandr.so.2'. Symbols loaded.
Loaded '/usr/lib/x86_64-linux-gnu/libXcursor.so.1'. Symbols loaded.
Loaded '/usr/lib/x86_64-linux-gnu/libXcomposite.so.1'. Symbols loaded.
Loaded '/usr/lib/x86_64-linux-gnu/libXdamage.so.1'. Symbols loaded.
Loaded '/usr/lib/x86_64-linux-gnu/libXext.so.6'. Symbols loaded.
Loaded '/usr/lib/x86_64-linux-gnu/libfreetype.so.6'. Symbols loaded.
Loaded '/usr/lib/x86_64-linux-gnu/libpixman-1.so.0'. Symbols loaded.
Loaded '/usr/lib/x86_64-linux-gnu/libpng16.so.16'. Symbols loaded.
Loaded '/usr/lib/x86_64-linux-gnu/libxcb-shm.so.0'. Symbols loaded.
Loaded '/usr/lib/x86_64-linux-gnu/libxcb.so.1'. Symbols loaded.
Loaded '/usr/lib/x86_64-linux-gnu/libxcb-render.so.0'. Symbols loaded.
Loaded '/lib/x86_64-linux-gnu/libz.so.1'. Symbols loaded.
Loaded '/lib/x86_64-linux-gnu/librt.so.1'. Symbols loaded.
Loaded '/lib/x86_64-linux-gnu/libselinux.so.1'. Symbols loaded.
Loaded '/lib/x86_64-linux-gnu/libresolv.so.2'. Symbols loaded.
Loaded '/lib/x86_64-linux-gnu/libmount.so.1'. Symbols loaded.
Loaded '/usr/lib/x86_64-linux-gnu/libharfbuzz.so.0'. Symbols loaded.
Loaded '/usr/lib/x86_64-linux-gnu/libthai.so.0'. Symbols loaded.
Loaded '/usr/lib/x86_64-linux-gnu/libffi.so.6'. Symbols loaded.
Loaded '/lib/x86_64-linux-gnu/libexpat.so.1'. Symbols loaded.
Loaded '/lib/x86_64-linux-gnu/libpcre.so.3'. Symbols loaded.
Loaded '/usr/lib/x86_64-linux-gnu/libICE.so.6'. Symbols loaded.
Loaded '/lib/x86_64-linux-gnu/libuuid.so.1'. Symbols loaded.
Loaded '/usr/lib/x86_64-linux-gnu/libXau.so.6'. Symbols loaded.
Loaded '/usr/lib/x86_64-linux-gnu/libXdmcp.so.6'. Symbols loaded.
Loaded '/lib/x86_64-linux-gnu/libblkid.so.1'. Symbols loaded.
Loaded '/usr/lib/x86_64-linux-gnu/libgraphite2.so.3'. Symbols loaded.
Loaded '/usr/lib/x86_64-linux-gnu/libdatrie.so.1'. Symbols loaded.
Loaded '/lib/x86_64-linux-gnu/libbsd.so.0'. Symbols loaded.
Loaded '/usr/lib/x86_64-linux-gnu/gconv/UTF-32.so'. Symbols loaded.

Program received signal SIGSEGV, Segmentation fault.
0x00007ffff51a6fd9 in gdk_window_enable_synchronized_configure () from /usr/lib/x86_64-linux-gnu/libgdk-x11-2.0.so.0
Execute debugger commands using "-exec <command>", for example "-exec info registers" will list registers in use (when GDB is the debugger)
bt
-var-create: unable to create variable object
run bt
-var-create: unable to create variable object
-exec bt
#0  0x00007ffff51a6fd9 in gdk_window_enable_synchronized_configure () at /usr/lib/x86_64-linux-gnu/libgdk-x11-2.0.so.0
#1  0x00007ffff56454ca in  () at /usr/lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0
#2  0x00007ffff3fa210d in g_closure_invoke () at /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#3  0x00007ffff3fb512e in  () at /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#4  0x00007ffff3fbd715 in g_signal_emit_valist () at /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#5  0x00007ffff3fbe12f in g_signal_emit () at /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#6  0x00007ffff56393d8 in gtk_widget_realize () at /usr/lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0
#7  0x00007ffff5643a5d in  () at /usr/lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0
#8  0x00007ffff3fa210d in g_closure_invoke () at /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#9  0x00007ffff3fb512e in  () at /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#10 0x00007ffff3fbd715 in g_signal_emit_valist () at /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#11 0x00007ffff3fbe12f in g_signal_emit () at /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#12 0x00007ffff5638b96 in gtk_widget_show () at /usr/lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0
#13 0x00007ffff3fc69c5 in g_type_create_instance () at /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#14 0x00007ffff3fa7748 in  () at /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#15 0x00007ffff3fa8ee5 in g_object_new_with_properties () at /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#16 0x00007ffff3fa9961 in g_object_new () at /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#17 0x00007ffff710b612 in gtk_assert_dialog_new() () at ../src/gtk/assertdlg_gtk.cpp:941
#18 0x00007ffff7140f04 in wxGUIAppTraits::ShowAssertDialog(wxString const&) (this=<optimized out>, msg=...) at ../src/gtk/utilsgtk.cpp:330
#19 0x00007ffff79a8661 in ShowAssertDialog(wxString const&, int, wxString const&, wxString const&, wxString const&, wxAppTraits*) (file=..., [email protected]=21845, func=..., cond=..., msgUser=..., traits=0x5555558616e0, [email protected]=0x555555838c50) at ../src/common/appbase.cpp:1386
#20 0x00007ffff79ab529 in wxAppConsoleBase::OnAssertFailure(wchar_t const*, int, wchar_t const*, wchar_t const*, wchar_t const*) ([email protected]=0x555555860e60, file=<optimized out>, line=21845, func=<optimized out>, cond=0x1e800000000 <error: Cannot access memory at address 0x1e800000000>, msg=<optimized out>) at ../src/common/appbase.cpp:869
#21 0x00007ffff710a650 in wxApp::OnAssertFailure(wchar_t const*, int, wchar_t const*, wchar_t const*, wchar_t const*) (this=0x555555860e60, file=<optimized out>, line=<optimized out>, func=<optimized out>, cond=<optimized out>, msg=<optimized out>) at ../src/gtk/app.cpp:493
#22 0x00007ffff79ab827 in wxDefaultAssertHandler(wxString const&, int, wxString const&, wxString const&, wxString const&) (file=..., [email protected]=488, func=..., cond=..., msg=...) at ../src/common/appbase.cpp:1178
#23 0x00007ffff79a611a in wxOnAssert(char const*, int, char const*, char const*, char const*) ([email protected]=0x7ffff75168d5 "../include/wx/vector.h", [email protected]=488, [email protected]=0x7ffff75457e6 <wxVector<wxDisplayImpl*>::at(unsigned long)::__FUNCTION__> "at", [email protected]=0x7ffff75168c8 "idx < m_size", [email protected]=0x0) at ../src/common/appbase.cpp:1255
#24 0x00007ffff7260337 in wxVector<wxDisplayImpl*>::at(unsigned long) (this=0x5555558621f8, this=0x5555558621f8, idx=0) at ../include/wx/vector.h:488
#25 0x00007ffff7260337 in wxVector<wxDisplayImpl*>::operator[](unsigned long) (idx=0, this=0x5555558621f8) at ../include/wx/vector.h:493
#26 0x00007ffff7260337 in wxDisplayFactory::GetDisplay(unsigned int) (n=0, this=0x5555558621f0) at ../include/wx/private/display.h:36
#27 0x00007ffff7260337 in wxDisplay::wxDisplay(unsigned int) (this=0x7fffffffd970, n=0) at ../src/common/dpycmn.cpp:85
#28 0x00007ffff72854e2 in wxGetClientDisplayRect() () at ../src/common/gdicmn.cpp:889
#29 0x00007ffff732fe59 in wxTopLevelWindowBase::GetDefaultSize() () at ../src/common/toplvcmn.cpp:218
#30 0x00007ffff713e745 in wxTopLevelWindowGTK::Create(wxWindow*, int, wxString const&, wxPoint const&, wxSize const&, long, wxString const&) ([email protected]=0x555555861110, [email protected]=0x0, [email protected]=-1, title=..., pos=..., sizeOrig=..., style=541072960, name=...) at ../src/gtk/toplevel.cpp:584
#31 0x00007ffff71a4075 in wxFrame::Create(wxWindow*, int, wxString const&, wxPoint const&, wxSize const&, long, wxString const&) ([email protected]=0x555555861110, [email protected]=0x0, [email protected]=-1, title=..., pos=..., sizeOrig=..., style=541072960, name=...) at ../src/gtk/frame.cpp:47
#32 0x0000555555582a8c in wxFrame::wxFrame(wxWindow*, int, wxString const&, wxPoint const&, wxSize const&, long, wxString const&) (name=..., style=541072960, size=..., pos=..., title=..., id=-1, parent=0x0, this=0x555555861110) at /usr/include/wx-3.1-unofficial/wx/gtk/frame.h:31
#33 0x0000555555582a8c in MainWindow::MainWindow() (this=0x555555861110) at source/ui/mainWindow.cpp:6
#34 0x00005555555cb3e7 in MainApp::MainApp() (this=0x555555860e60) at source/main.cpp:9
#35 0x00005555555cb3e7 in wxCreateApp() () at source/main.cpp:45
#36 0x00007ffff7a336f1 in wxEntryStart(int&, wchar_t**) ([email protected]: 1, [email protected]=0x555555860cc0) at ../src/common/init.cpp:318
#37 0x00007ffff7a3382a in wxInitialize(int&, wchar_t**) ([email protected]: 1, argv=0x555555860cc0) at ../src/common/init.cpp:544
#38 0x00007ffff7a3387b in wxInitializer::wxInitializer(int&, wchar_t**) (argv=<optimized out>, argc=<optimized out>, this=<synthetic pointer>) at ../include/wx/init.h:92
#39 0x00007ffff7a3387b in wxEntry(int&, wchar_t**) (argc=<optimized out>, argv=<optimized out>) at ../src/common/init.cpp:477
#40 0x00005555555cb475 in main(int, char**) (argc=<optimized out>, argv=<optimized out>) at source/main.cpp:45
Relevant GTK output (wow, it's long):

Code: Select all

(process:2856): Gdk-CRITICAL **: 22:23:24.148: IA__gdk_screen_get_root_window: assertion 'GDK_IS_SCREEN (screen)' failed

(process:2856): Gdk-CRITICAL **: 22:23:24.148: IA__gdk_drawable_get_screen: assertion 'GDK_IS_DRAWABLE (drawable)' failed

(process:2856): Gdk-CRITICAL **: 22:23:24.148: IA__gdk_screen_get_n_monitors: assertion 'GDK_IS_SCREEN (screen)' failed
../include/wx/vector.h(488): assert "idx < m_size" failed in at().

(process:2856): GLib-GObject-WARNING **: 22:23:24.150: invalid (NULL) pointer instance

(process:2856): GLib-GObject-CRITICAL **: 22:23:24.150: g_signal_connect_data: assertion 'G_TYPE_CHECK_INSTANCE (instance)' failed

(process:2856): Gtk-CRITICAL **: 22:23:24.151: IA__gtk_settings_get_for_screen: assertion 'GDK_IS_SCREEN (screen)' failed

(process:2856): GLib-GObject-CRITICAL **: 22:23:24.151: g_object_get: assertion 'G_IS_OBJECT (object)' failed

(process:2856): Gtk-CRITICAL **: 22:23:24.151: IA__gtk_settings_get_for_screen: assertion 'GDK_IS_SCREEN (screen)' failed

(process:2856): Gtk-CRITICAL **: 22:23:24.176: IA__gtk_settings_get_for_screen: assertion 'GDK_IS_SCREEN (screen)' failed

(process:2856): GLib-GObject-CRITICAL **: 22:23:24.176: g_object_get: assertion 'G_IS_OBJECT (object)' failed

(process:2856): Gtk-CRITICAL **: 22:23:24.176: IA__gtk_settings_get_for_screen: assertion 'GDK_IS_SCREEN (screen)' failed

(process:2856): GLib-GObject-CRITICAL **: 22:23:24.176: g_object_get: assertion 'G_IS_OBJECT (object)' failed

(process:2856): Gtk-CRITICAL **: 22:23:24.176: IA__gtk_settings_get_for_screen: assertion 'GDK_IS_SCREEN (screen)' failed

(process:2856): GLib-GObject-CRITICAL **: 22:23:24.176: g_object_get: assertion 'G_IS_OBJECT (object)' failed

(process:2856): Gtk-CRITICAL **: 22:23:24.177: IA__gtk_settings_get_for_screen: assertion 'GDK_IS_SCREEN (screen)' failed

(process:2856): GLib-GObject-CRITICAL **: 22:23:24.177: g_object_get: assertion 'G_IS_OBJECT (object)' failed

(process:2856): Gtk-CRITICAL **: 22:23:24.177: IA__gtk_settings_get_for_screen: assertion 'GDK_IS_SCREEN (screen)' failed

(process:2856): GLib-GObject-CRITICAL **: 22:23:24.177: g_object_get: assertion 'G_IS_OBJECT (object)' failed

(process:2856): Gtk-CRITICAL **: 22:23:24.177: IA__gtk_settings_get_for_screen: assertion 'GDK_IS_SCREEN (screen)' failed

(process:2856): GLib-GObject-CRITICAL **: 22:23:24.177: g_object_get: assertion 'G_IS_OBJECT (object)' failed

(process:2856): Gtk-CRITICAL **: 22:23:24.177: IA__gtk_settings_get_for_screen: assertion 'GDK_IS_SCREEN (screen)' failed

(process:2856): GLib-GObject-CRITICAL **: 22:23:24.177: g_object_get: assertion 'G_IS_OBJECT (object)' failed

(process:2856): Gtk-CRITICAL **: 22:23:24.177: IA__gtk_settings_get_for_screen: assertion 'GDK_IS_SCREEN (screen)' failed

(process:2856): GLib-GObject-CRITICAL **: 22:23:24.177: g_object_get: assertion 'G_IS_OBJECT (object)' failed

(process:2856): Gtk-CRITICAL **: 22:23:24.177: IA__gtk_settings_get_for_screen: assertion 'GDK_IS_SCREEN (screen)' failed

(process:2856): GLib-GObject-CRITICAL **: 22:23:24.177: g_object_get: assertion 'G_IS_OBJECT (object)' failed

(process:2856): Gtk-CRITICAL **: 22:23:24.177: IA__gtk_settings_get_for_screen: assertion 'GDK_IS_SCREEN (screen)' failed

(process:2856): GLib-GObject-CRITICAL **: 22:23:24.177: g_object_get: assertion 'G_IS_OBJECT (object)' failed

(process:2856): Gtk-CRITICAL **: 22:23:24.177: IA__gtk_settings_get_for_screen: assertion 'GDK_IS_SCREEN (screen)' failed

(process:2856): GLib-GObject-CRITICAL **: 22:23:24.177: g_object_get: assertion 'G_IS_OBJECT (object)' failed

(process:2856): Gtk-CRITICAL **: 22:23:24.177: IA__gtk_settings_get_for_screen: assertion 'GDK_IS_SCREEN (screen)' failed

(process:2856): GLib-GObject-CRITICAL **: 22:23:24.177: g_object_get: assertion 'G_IS_OBJECT (object)' failed

(process:2856): Gtk-CRITICAL **: 22:23:24.178: IA__gtk_settings_get_for_screen: assertion 'GDK_IS_SCREEN (screen)' failed

(process:2856): GLib-GObject-CRITICAL **: 22:23:24.178: g_object_get: assertion 'G_IS_OBJECT (object)' failed

(process:2856): Gtk-CRITICAL **: 22:23:24.178: IA__gtk_settings_get_for_screen: assertion 'GDK_IS_SCREEN (screen)' failed

(process:2856): GLib-GObject-CRITICAL **: 22:23:24.178: g_object_get: assertion 'G_IS_OBJECT (object)' failed

(process:2856): GLib-GObject-WARNING **: 22:23:24.178: value "TRUE" of type 'gboolean' is invalid or out of range for property 'visible' of type 'gboolean'

(process:2856): Gtk-CRITICAL **: 22:23:24.178: IA__gtk_settings_get_for_screen: assertion 'GDK_IS_SCREEN (screen)' failed

(process:2856): GLib-GObject-CRITICAL **: 22:23:24.178: g_object_get: assertion 'G_IS_OBJECT (object)' failed

(process:2856): Gtk-CRITICAL **: 22:23:24.178: IA__gtk_settings_get_for_screen: assertion 'GDK_IS_SCREEN (screen)' failed

(process:2856): GLib-GObject-CRITICAL **: 22:23:24.178: g_object_get: assertion 'G_IS_OBJECT (object)' failed

(process:2856): Gtk-CRITICAL **: 22:23:24.178: IA__gtk_settings_get_for_screen: assertion 'GDK_IS_SCREEN (screen)' failed

(process:2856): GLib-GObject-CRITICAL **: 22:23:24.178: g_object_get: assertion 'G_IS_OBJECT (object)' failed

(process:2856): GLib-GObject-WARNING **: 22:23:24.178: value "TRUE" of type 'gboolean' is invalid or out of range for property 'visible' of type 'gboolean'

(process:2856): Gtk-CRITICAL **: 22:23:24.178: IA__gtk_settings_get_for_screen: assertion 'GDK_IS_SCREEN (screen)' failed

(process:2856): GLib-GObject-CRITICAL **: 22:23:24.178: g_object_get: assertion 'G_IS_OBJECT (object)' failed

(process:2856): Gtk-CRITICAL **: 22:23:24.178: IA__gtk_settings_get_for_screen: assertion 'GDK_IS_SCREEN (screen)' failed

(process:2856): GLib-GObject-CRITICAL **: 22:23:24.178: g_object_get: assertion 'G_IS_OBJECT (object)' failed

(process:2856): Gtk-CRITICAL **: 22:23:24.178: IA__gtk_settings_get_for_screen: assertion 'GDK_IS_SCREEN (screen)' failed

(process:2856): GLib-GObject-CRITICAL **: 22:23:24.178: g_object_get: assertion 'G_IS_OBJECT (object)' failed

(process:2856): Gtk-CRITICAL **: 22:23:24.180: IA__gtk_settings_get_for_screen: assertion 'GDK_IS_SCREEN (screen)' failed

(process:2856): GLib-GObject-CRITICAL **: 22:23:24.180: g_object_get: assertion 'G_IS_OBJECT (object)' failed

(process:2856): Gtk-CRITICAL **: 22:23:24.181: IA__gtk_settings_get_for_screen: assertion 'GDK_IS_SCREEN (screen)' failed

(process:2856): GLib-GObject-CRITICAL **: 22:23:24.181: g_object_get: assertion 'G_IS_OBJECT (object)' failed

(process:2856): GLib-GObject-WARNING **: 22:23:24.181: value "TRUE" of type 'gboolean' is invalid or out of range for property 'visible' of type 'gboolean'

(process:2856): Gtk-CRITICAL **: 22:23:24.181: IA__gtk_settings_get_for_screen: assertion 'GDK_IS_SCREEN (screen)' failed

(process:2856): GLib-GObject-CRITICAL **: 22:23:24.181: g_object_get: assertion 'G_IS_OBJECT (object)' failed

(process:2856): Gtk-CRITICAL **: 22:23:24.181: IA__gtk_settings_get_for_screen: assertion 'GDK_IS_SCREEN (screen)' failed

(process:2856): GLib-GObject-CRITICAL **: 22:23:24.181: g_object_get: assertion 'G_IS_OBJECT (object)' failed

(process:2856): Gtk-CRITICAL **: 22:23:24.181: IA__gtk_settings_get_for_screen: assertion 'GDK_IS_SCREEN (screen)' failed

(process:2856): GLib-GObject-CRITICAL **: 22:23:24.181: g_object_get: assertion 'G_IS_OBJECT (object)' failed

(process:2856): GLib-GObject-WARNING **: 22:23:24.181: value "TRUE" of type 'gboolean' is invalid or out of range for property 'visible' of type 'gboolean'

(process:2856): Gtk-CRITICAL **: 22:23:24.181: IA__gtk_settings_get_for_screen: assertion 'GDK_IS_SCREEN (screen)' failed

(process:2856): GLib-GObject-CRITICAL **: 22:23:24.181: g_object_get: assertion 'G_IS_OBJECT (object)' failed

(process:2856): Gtk-WARNING **: 22:23:24.181: Screen for GtkWindow not set; you must always set
a screen for a GtkWindow before using the window

(process:2856): Gdk-CRITICAL **: 22:23:24.182: IA__gdk_pango_context_get_for_screen: assertion 'GDK_IS_SCREEN (screen)' failed

(process:2856): Pango-CRITICAL **: 22:23:24.182: pango_context_set_font_description: assertion 'context != NULL' failed

(process:2856): Pango-CRITICAL **: 22:23:24.182: pango_context_set_base_dir: assertion 'context != NULL' failed

(process:2856): Pango-CRITICAL **: 22:23:24.182: pango_context_set_language: assertion 'context != NULL' failed

(process:2856): Pango-CRITICAL **: 22:23:24.184: pango_layout_new: assertion 'context != NULL' failed

(process:2856): Pango-CRITICAL **: 22:23:24.184: pango_layout_set_text: assertion 'layout != NULL' failed

(process:2856): Pango-CRITICAL **: 22:23:24.184: pango_layout_set_attributes: assertion 'layout != NULL' failed

(process:2856): Pango-CRITICAL **: 22:23:24.184: pango_layout_set_alignment: assertion 'layout != NULL' failed

(process:2856): Pango-CRITICAL **: 22:23:24.184: pango_layout_set_ellipsize: assertion 'PANGO_IS_LAYOUT (layout)' failed

(process:2856): Pango-CRITICAL **: 22:23:24.184: pango_layout_set_single_paragraph_mode: assertion 'PANGO_IS_LAYOUT (layout)' failed

(process:2856): Pango-CRITICAL **: 22:23:24.184: pango_layout_set_width: assertion 'layout != NULL' failed

(process:2856): Pango-CRITICAL **: 22:23:24.184: pango_layout_get_extents: assertion 'layout != NULL' failed

(process:2856): Gdk-CRITICAL **: 22:23:24.184: IA__gdk_pango_context_get_for_screen: assertion 'GDK_IS_SCREEN (screen)' failed

(process:2856): Pango-CRITICAL **: 22:23:24.184: pango_context_set_font_description: assertion 'context != NULL' failed

(process:2856): Pango-CRITICAL **: 22:23:24.184: pango_context_set_base_dir: assertion 'context != NULL' failed

(process:2856): Pango-CRITICAL **: 22:23:24.184: pango_context_set_language: assertion 'context != NULL' failed

(process:2856): Pango-CRITICAL **: 22:23:24.184: pango_layout_new: assertion 'context != NULL' failed

(process:2856): Pango-CRITICAL **: 22:23:24.184: pango_layout_set_text: assertion 'layout != NULL' failed

(process:2856): Pango-CRITICAL **: 22:23:24.184: pango_layout_set_attributes: assertion 'layout != NULL' failed

(process:2856): Pango-CRITICAL **: 22:23:24.184: pango_layout_set_alignment: assertion 'layout != NULL' failed

(process:2856): Pango-CRITICAL **: 22:23:24.184: pango_layout_set_ellipsize: assertion 'PANGO_IS_LAYOUT (layout)' failed

(process:2856): Pango-CRITICAL **: 22:23:24.184: pango_layout_set_single_paragraph_mode: assertion 'PANGO_IS_LAYOUT (layout)' failed

(process:2856): Pango-CRITICAL **: 22:23:24.184: pango_layout_set_width: assertion 'layout != NULL' failed

(process:2856): Pango-CRITICAL **: 22:23:24.184: pango_layout_get_extents: assertion 'layout != NULL' failed

(process:2856): Gdk-CRITICAL **: 22:23:24.185: IA__gdk_pango_context_get_for_screen: assertion 'GDK_IS_SCREEN (screen)' failed

(process:2856): Pango-CRITICAL **: 22:23:24.185: pango_context_set_font_description: assertion 'context != NULL' failed

(process:2856): Pango-CRITICAL **: 22:23:24.185: pango_context_set_base_dir: assertion 'context != NULL' failed

(process:2856): Pango-CRITICAL **: 22:23:24.185: pango_context_set_language: assertion 'context != NULL' failed

(process:2856): Pango-CRITICAL **: 22:23:24.185: pango_layout_new: assertion 'context != NULL' failed

(process:2856): Pango-CRITICAL **: 22:23:24.185: pango_layout_set_text: assertion 'layout != NULL' failed

(process:2856): Pango-CRITICAL **: 22:23:24.185: pango_layout_set_attributes: assertion 'layout != NULL' failed

(process:2856): Pango-CRITICAL **: 22:23:24.186: pango_layout_set_alignment: assertion 'layout != NULL' failed

(process:2856): Pango-CRITICAL **: 22:23:24.186: pango_layout_set_ellipsize: assertion 'PANGO_IS_LAYOUT (layout)' failed

(process:2856): Pango-CRITICAL **: 22:23:24.186: pango_layout_set_single_paragraph_mode: assertion 'PANGO_IS_LAYOUT (layout)' failed

(process:2856): Pango-CRITICAL **: 22:23:24.186: pango_layout_set_width: assertion 'layout != NULL' failed

(process:2856): Pango-CRITICAL **: 22:23:24.186: pango_layout_get_extents: assertion 'layout != NULL' failed

(process:2856): Gtk-CRITICAL **: 22:23:24.186: IA__gtk_icon_theme_get_for_screen: assertion 'GDK_IS_SCREEN (screen)' failed

(process:2856): Gtk-CRITICAL **: 22:23:24.186: IA__gtk_settings_get_for_screen: assertion 'GDK_IS_SCREEN (screen)' failed

(process:2856): Gtk-CRITICAL **: 22:23:24.186: IA__gtk_icon_size_lookup_for_settings: assertion 'GTK_IS_SETTINGS (settings)' failed

(process:2856): Gtk-WARNING **: 22:23:24.186: Invalid icon size 6


(process:2856): Gtk-CRITICAL **: 22:23:24.186: IA__gtk_icon_theme_load_icon: assertion 'GTK_IS_ICON_THEME (icon_theme)' failed

(process:2856): Gtk-WARNING **: 22:23:24.186: Error loading theme icon 'dialog-error' for stock: 

(process:2856): Gtk-CRITICAL **: 22:23:24.198: IA__gtk_icon_size_lookup_for_settings: assertion 'GTK_IS_SETTINGS (settings)' failed

(process:2856): Gtk-WARNING **: 22:23:24.198: /build/gtk+2.0-AoeliP/gtk+2.0-2.24.32/gtk/gtkstyle.c:2358: invalid icon size '6'

(process:2856): Gtk-CRITICAL **: 22:23:24.199: IA__gtk_style_render_icon: assertion 'pixbuf != NULL' failed

(process:2856): GLib-GObject-CRITICAL **: 22:23:24.199: g_object_ref: assertion 'G_IS_OBJECT (object)' failed

(process:2856): Gdk-CRITICAL **: 22:23:24.199: IA__gdk_pango_context_get_for_screen: assertion 'GDK_IS_SCREEN (screen)' failed

(process:2856): Pango-CRITICAL **: 22:23:24.199: pango_context_set_font_description: assertion 'context != NULL' failed

(process:2856): Pango-CRITICAL **: 22:23:24.199: pango_context_set_base_dir: assertion 'context != NULL' failed

(process:2856): Pango-CRITICAL **: 22:23:24.199: pango_context_set_language: assertion 'context != NULL' failed

(process:2856): Pango-CRITICAL **: 22:23:24.199: pango_layout_new: assertion 'context != NULL' failed

(process:2856): Pango-CRITICAL **: 22:23:24.199: pango_layout_set_text: assertion 'layout != NULL' failed

(process:2856): Pango-CRITICAL **: 22:23:24.199: pango_layout_set_alignment: assertion 'layout != NULL' failed

(process:2856): Pango-CRITICAL **: 22:23:24.199: pango_layout_set_ellipsize: assertion 'PANGO_IS_LAYOUT (layout)' failed

(process:2856): Pango-CRITICAL **: 22:23:24.199: pango_layout_set_single_paragraph_mode: assertion 'PANGO_IS_LAYOUT (layout)' failed

(process:2856): Pango-CRITICAL **: 22:23:24.199: pango_layout_set_width: assertion 'layout != NULL' failed

(process:2856): Pango-CRITICAL **: 22:23:24.199: pango_layout_get_extents: assertion 'layout != NULL' failed

(process:2856): Gdk-CRITICAL **: 22:23:24.199: IA__gdk_pango_context_get_for_screen: assertion 'GDK_IS_SCREEN (screen)' failed

(process:2856): Pango-CRITICAL **: 22:23:24.199: pango_context_set_font_description: assertion 'context != NULL' failed

(process:2856): Pango-CRITICAL **: 22:23:24.199: pango_context_set_base_dir: assertion 'context != NULL' failed

(process:2856): Pango-CRITICAL **: 22:23:24.199: pango_context_set_language: assertion 'context != NULL' failed

(process:2856): Pango-CRITICAL **: 22:23:24.199: pango_layout_new: assertion 'context != NULL' failed

(process:2856): Pango-CRITICAL **: 22:23:24.199: pango_layout_set_text: assertion 'layout != NULL' failed

(process:2856): Pango-CRITICAL **: 22:23:24.199: pango_layout_set_alignment: assertion 'layout != NULL' failed

(process:2856): Pango-CRITICAL **: 22:23:24.211: pango_layout_set_ellipsize: assertion 'PANGO_IS_LAYOUT (layout)' failed

(process:2856): Pango-CRITICAL **: 22:23:24.211: pango_layout_set_single_paragraph_mode: assertion 'PANGO_IS_LAYOUT (layout)' failed

(process:2856): Pango-CRITICAL **: 22:23:24.211: pango_layout_set_wrap: assertion 'PANGO_IS_LAYOUT (layout)' failed

(process:2856): Pango-CRITICAL **: 22:23:24.211: pango_layout_set_width: assertion 'layout != NULL' failed

(process:2856): Pango-CRITICAL **: 22:23:24.211: pango_layout_get_extents: assertion 'layout != NULL' failed

(process:2856): Gdk-CRITICAL **: 22:23:24.211: IA__gdk_pango_context_get_for_screen: assertion 'GDK_IS_SCREEN (screen)' failed

(process:2856): Pango-CRITICAL **: 22:23:24.211: pango_context_set_font_description: assertion 'context != NULL' failed

(process:2856): Pango-CRITICAL **: 22:23:24.211: pango_context_set_base_dir: assertion 'context != NULL' failed

(process:2856): Pango-CRITICAL **: 22:23:24.211: pango_context_set_language: assertion 'context != NULL' failed

(process:2856): Pango-CRITICAL **: 22:23:24.211: pango_layout_new: assertion 'context != NULL' failed

(process:2856): Pango-CRITICAL **: 22:23:24.211: pango_layout_set_text: assertion 'layout != NULL' failed

(process:2856): Pango-CRITICAL **: 22:23:24.211: pango_layout_set_attributes: assertion 'layout != NULL' failed

(process:2856): Pango-CRITICAL **: 22:23:24.211: pango_layout_set_alignment: assertion 'layout != NULL' failed

(process:2856): Pango-CRITICAL **: 22:23:24.211: pango_layout_set_ellipsize: assertion 'PANGO_IS_LAYOUT (layout)' failed

(process:2856): Pango-CRITICAL **: 22:23:24.211: pango_layout_set_single_paragraph_mode: assertion 'PANGO_IS_LAYOUT (layout)' failed

(process:2856): Pango-CRITICAL **: 22:23:24.211: pango_layout_set_width: assertion 'layout != NULL' failed

(process:2856): Pango-CRITICAL **: 22:23:24.211: pango_layout_get_extents: assertion 'layout != NULL' failed

(process:2856): Gtk-WARNING **: 22:23:24.211: gtk_widget_size_allocate(): attempt to allocate widget with width -23 and height 32

(process:2856): Gtk-WARNING **: 22:23:24.212: gtk_widget_size_allocate(): attempt to allocate widget with width -23 and height 32

(process:2856): Gtk-WARNING **: 22:23:24.212: gtk_widget_size_allocate(): attempt to allocate widget with width -23 and height 32

(process:2856): Gtk-WARNING **: 22:23:24.212: gtk_widget_size_allocate(): attempt to allocate widget with width -23 and height 32

(process:2856): Gdk-CRITICAL **: 22:23:24.212: IA__gdk_screen_get_default_colormap: assertion 'GDK_IS_SCREEN (screen)' failed

(process:2856): Gdk-CRITICAL **: 22:23:24.212: IA__gdk_colormap_get_visual: assertion 'GDK_IS_COLORMAP (colormap)' failed

(process:2856): Gdk-CRITICAL **: 22:23:24.212: IA__gdk_screen_get_default_colormap: assertion 'GDK_IS_SCREEN (screen)' failed

(process:2856): Gdk-CRITICAL **: 22:23:24.212: IA__gdk_screen_get_root_window: assertion 'GDK_IS_SCREEN (screen)' failed

(process:2856): Gdk-CRITICAL **: 22:23:24.212: IA__gdk_screen_get_root_window: assertion 'GDK_IS_SCREEN (screen)' failed

(process:2856): Gdk-CRITICAL **: 22:23:24.212: IA__gdk_window_new: assertion 'GDK_IS_WINDOW (parent)' failed

TheGreatRambler
Knows some wx things
Knows some wx things
Posts: 28
Joined: Mon Feb 10, 2020 3:09 am

Re: gdk_window_enable_synchronized_configure() segfaults on wxGTK

Post by TheGreatRambler » Mon Apr 06, 2020 3:37 am

It might be important, I'm using Lubuntu as well, so I am using the LXDE desktop manager. Also, this could be related to other failures on gtk_init(). https://stackoverflow.com/questions/152 ... unexpected

ONEEYEMAN
Part Of The Furniture
Part Of The Furniture
Posts: 4058
Joined: Sat Apr 16, 2005 7:22 am
Location: USA, Ukraine

Re: gdk_window_enable_synchronized_configure() segfaults on wxGTK

Post by ONEEYEMAN » Mon Apr 06, 2020 4:30 am

Hi,
Is there any code inside the MainFrame constructor?

If there is - can you post it?

Also - it would be nice if you try to reproduce the crash in the minimal or display sample.

Thank you.

User avatar
doublemax
Moderator
Moderator
Posts: 14786
Joined: Fri Apr 21, 2006 8:03 pm
Location: $FCE2

Re: gdk_window_enable_synchronized_configure() segfaults on wxGTK

Post by doublemax » Mon Apr 06, 2020 5:48 am

Code: Select all

class MainApp : public wxApp {
private:
	MainWindow window;

public:
	virtual bool OnInit() {
		window.Show(true);
		window.onStart();
		return true;
	}
};
Please post real code. Windows must be created on the heap. If this *is* real code, change it accordingly.
Use the source, Luke!

TheGreatRambler
Knows some wx things
Knows some wx things
Posts: 28
Joined: Mon Feb 10, 2020 3:09 am

Re: gdk_window_enable_synchronized_configure() segfaults on wxGTK

Post by TheGreatRambler » Mon Apr 06, 2020 1:16 pm

Thank you! Creating on the stack was apparently my problem. I'm suprised that worked on Windows.

Post Reply