Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Embedded SWING crashes the JVM #3

Open
ghost opened this issue Jan 21, 2013 · 2 comments
Open

Embedded SWING crashes the JVM #3

ghost opened this issue Jan 21, 2013 · 2 comments

Comments

@ghost
Copy link

ghost commented Jan 21, 2013

The embedded SWING component for showing the JUNG graph crashed the JVM with the following error on Ubuntu (and possibly other Linux-based OS).

[xcb] Unknown request in queue while dequeuing
[xcb] Most likely this is a multi-threaded client and XInitThreads has not been called
[xcb] Aborting, sorry about that.
java: ../../src/xcb_io.c:178: dequeue_pending_request: Assertion `!xcb_xlib_unknown_req_in_deq' failed.

@ghost
Copy link
Author

ghost commented Jan 21, 2013

The following link seems to suggest that adding the VM argument -Dswing.defaultlaf=javax.swing.plaf.metal.MetalLookAndFeel on the launcher config would resolve the issue https://bugs.eclipse.org/bugs/show_bug.cgi?id=341799#c10

This doesn't seem to have the problem fixed in our case.

@ghost
Copy link
Author

ghost commented Jan 22, 2013

In the same thread, the following post appears to have the look and feel initialized programmatically: https://bugs.eclipse.org/bugs/show_bug.cgi?id=341799#c13

public static void setupLookAndFeel() {
if (!lafInitialized) {
try {
if (Platform.WS_GTK.equals(Platform.getWS())) {
// Eclipse Bug 341799 workaround
UIManager.setLookAndFeel("javax.swing.plaf.metal.MetalLookAndFeel");
}
else {
UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
}
} catch (Exception e) {
_log.error(...)
}
lafInitialized = true;
}
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

0 participants