Exception: [xcb] Most likely this is a multi-threaded client and XInitThreads has not been called

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
Sridhar@Work
Filthy Rich wx Solver
Filthy Rich wx Solver
Posts: 221
Joined: Fri Jan 08, 2021 8:19 am

Exception: [xcb] Most likely this is a multi-threaded client and XInitThreads has not been called

Post by Sridhar@Work »

We are using gtk3 on Linux RHEL8 and our library is internally loaded into eclipse plugin and we get the following exception when used with eclipse.

Code: Select all

(Eclipse:369376): Gtk-WARNING **: 13:07:03.333: gtk_disable_setlocale() must be called before gtk_init()
[xcb] Unknown sequence number while processing queue
[xcb] Most likely this is a multi-threaded client and XInitThreads has not been called
[xcb] Aborting, sorry about that.
java: xcb_io.c:261: poll_for_event: Assertion `!xcb_xlib_threads_sequence_lost' failed.
Did anyone face similar issue when integrated with ecplise? If so, do we have to initialize anything to make it work?

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

Re: Exception: [xcb] Most likely this is a multi-threaded client and XInitThreads has not been called

Post by ONEEYEMAN »

Hi,
What is the backtrace at the time of the crash?
Can you build the debug version of the wx AND plugin and show the backtrace?

Thank you.
Sridhar@Work
Filthy Rich wx Solver
Filthy Rich wx Solver
Posts: 221
Joined: Fri Jan 08, 2021 8:19 am

Re: Exception: [xcb] Most likely this is a multi-threaded client and XInitThreads has not been called

Post by Sridhar@Work »

Thank you.

Please find the stacktrace at the point of exception:
{{{
Exception in thread "Thread-185" org.eclipse.swt.SWTException: Invalid thread access
at org.eclipse.swt.SWT.error(SWT.java:4918)
at org.eclipse.swt.SWT.error(SWT.java:4833)
at org.eclipse.swt.SWT.error(SWT.java:4804)
at org.eclipse.swt.widgets.Widget.error(Widget.java:565)
at org.eclipse.swt.widgets.Widget.checkWidget(Widget.java:481)
at org.eclipse.swt.widgets.Widget.getData(Widget.java:619)
at org.eclipse.e4.ui.internal.workbench.swt.ShellActivationListener.handleEvent(ShellActivationListener.java:63)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:89)
at org.eclipse.swt.widgets.Display.filterEvent(Display.java:1908)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1528)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1555)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1534)
at org.eclipse.swt.widgets.Shell.gtk_focus_out_event(Shell.java:1617)
at org.eclipse.swt.widgets.Widget.windowProc(Widget.java:2433)
at org.eclipse.swt.widgets.Control.windowProc(Control.java:6833)
at org.eclipse.swt.widgets.Display.windowProc(Display.java:6116)
at org.eclipse.swt.internal.gtk3.GTK3.gtk_main_do_event(Native Method)
at org.eclipse.swt.widgets.Display.eventProc(Display.java:1552)
}}}
ONEEYEMAN
Part Of The Furniture
Part Of The Furniture
Posts: 7459
Joined: Sat Apr 16, 2005 7:22 am
Location: USA, Ukraine

Re: Exception: [xcb] Most likely this is a multi-threaded client and XInitThreads has not been called

Post by ONEEYEMAN »

Hi,
I don't see anything related to wx in the backtrace.
I presume that everything works when you are not using your code?

Also it would be nice to see your init code and how you load it inside Eclipse.

Thank you.
Post Reply