unsupported colour depth error in linux
Closed this issue · 12 comments
I'm trying out field under linux 32 bit at the moment, using ubuntu 12.04. I've built it all OK (apart from a couple of plugins which didn't have deps installed), but it's crashing when I run it.
It gets as far as creating a workspace directory, then crashes with this error:
org.eclipse.swt.SWTException: Unsupported color depth
Any help appreciated.
The full output from the program is pasted below:
andy@monkey:~/desk/projects/field-workspace$ field
/usr/local/src/Field/Contents/linux/..
rm: cannot remove `../core/classes/org/eclipse/swt': No such file or directory
hello
## trampoline <class field.bytecode.protect.StandardTrampoline:sun.misc.Launcher$AppClassLoader@cac268>
loaded classmap with <{__maphash__=533530393861012230}>
adding to loader <file:///usr/local/src/Field/Contents/linux/../extensions/>
checking </usr/local/src/Field/Contents/linux/../extensions> for natives
found <0>
warning, path </usr/local/src/Field/Contents/linux/../extensions/../extras/syphon/bin>added to classpath through Field-RedirectionPath inside extension /usr/local/src/Field/Contents/linux/../extensions/syphon.mf doesn't exist
warning, path </usr/local/src/Field/Contents/linux/../extensions/../lib/jruby-complete-1.6.7.jar>added to classpath through Field-RedirectionPath inside extension /usr/local/src/Field/Contents/linux/../extensions/languages.mf doesn't exist
warning, path </usr/local/src/Field/Contents/linux/../extensions/../extras/gstreamer/bin>added to classpath through Field-RedirectionPath inside extension /usr/local/src/Field/Contents/linux/../extensions/gstreamer.mf doesn't exist
warning, path </home/marc/fieldwork/personal/classes>added to classpath through Field-RedirectionPath inside extension /usr/local/src/Field/Contents/linux/../extensions/personal.mf doesn't exist
adding to loader <file:///home/andy/Library/Application Support/Field/extensions/>
checking </home/andy/Library/Application Support/Field/extensions> for natives
found <0>
platform is :linux / Linux false
-- registering open document handler --
-- registering open document handler complete --
--- into workspace directory, in search of bug #142:
versioning dir is set to </local/home/andy/Desktop/projects/field-workspace/FieldWorkspace> which exists? <true>
user home is </home/andy>
and we're out of workspacedirectory(), still looking for #142: dir is </local/home/andy/Desktop/projects/field-workspace/FieldWorkspace> and new <true>
platform is :linux / Linux false
sheets are :[]
:::::::::::::::::::::::::::::::::::: [/usr/bin/hg, add, /local/home/andy/Desktop/projects/field-workspace/FieldWorkspace/Default.field] true
:::::::::::::::::::::::::::::::::::: [/usr/bin/hg, add, /local/home/andy/Desktop/projects/field-workspace/FieldWorkspace/Default.field/sheet.xml] true
inside deferednextupdate +field.Blank2@3411a part2_original []
java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:616)
at field.bytecode.protect.DeferedNextUpdate$1.update(DeferedNextUpdate.java:47)
at field.launch.Launcher$4.run(Launcher.java:328)
at org.eclipse.swt.widgets.Display.timerProc(Unknown Source)
at org.eclipse.swt.internal.gtk.OS._g_main_context_iteration(Native Method)
at org.eclipse.swt.internal.gtk.OS.g_main_context_iteration(Unknown Source)
at org.eclipse.swt.widgets.Display.readAndDispatch(Unknown Source)
at field.launch.Launcher.main(Launcher.java:93)
Caused by: org.eclipse.swt.SWTException: Unsupported color depth
at org.eclipse.swt.SWT.error(Unknown Source)
at org.eclipse.swt.SWT.error(Unknown Source)
at org.eclipse.swt.SWT.error(Unknown Source)
at org.eclipse.swt.opengl.GLCanvas.<init>(Unknown Source)
at field.core.windowing.GLComponentWindow.<init>(GLComponentWindow.java:1058)
at field.core.StandardFluidSheet.<init>(StandardFluidSheet.java:440)
at field.core.StandardFluidSheet.scratchBegin(StandardFluidSheet.java:269)
at field.core.StandardFluidSheet.versionedScratch(StandardFluidSheet.java:356)
at field.core.execution.PhantomFluidSheet.<init>(PhantomFluidSheet.java:69)
at field.core.ui.FieldMenus2.open(FieldMenus2.java:170)
at field.Blank2.part2_original(Blank2.java:85)
... 11 more
I looked up the error on google, and it seems to be a case of this error with eclipse apps:
https://bugs.eclipse.org/bugs/show_bug.cgi?id=264853
It looks like the graphics driver I'm running does support 32 bit colour:
[ 23.514] (II) intel(0): Creating default Display subsect
ion in Screen section
"Default Screen Section" for depth/fbbpp 24/32
[ 23.514] (==) intel(0): Depth 24, (--) framebuffer bpp 3
2
(from Xorg.0.log)
I've managed to get field running under linux by making a change to Field/Contents/core/java/field/core/windowing/GLComponentWindow.java
:
I've pasted below the git diff for this file:
diff --git a/Contents/core/java/field/core/windowing/GLComponentWindow.java b/Contents/core/java/field/core/windowing/GLComponentWindow.java
index 64b0674..9a4a8bd 100755
--- a/Contents/core/java/field/core/windowing/GLComponentWindow.java
+++ b/Contents/core/java/field/core/windowing/GLComponentWindow.java
@@ -1030,7 +1030,7 @@ public class GLComponentWindow implements Listener, iUpdateable, iProvidesQueue,
data.depthSize = 24;
// data.stencilSize = 8;
- if (doMultisampling || Platform.isLinux()) {
+ if (doMultisampling && !Platform.isLinux()) {
data.samples = 2;
// data.sampleBuffers = 2;
}
I'll have another look at field later, probably after christmas.
I've been testing field a bit more under linux (ubuntu 12.04). It's throwing a few exceptions on startup (which may be normal?).
andy@monkey:~$ grep -i -A4 'Exception:' field.log
java.lang.ClassNotFoundException: field.syphon.SyphonPlugin
at java.net.URLClassLoader$1.run(URLClassLoader.java:217)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:205)
at java.lang.ClassLoader.loadClass(ClassLoader.java:321)
--
java.net.BindException: Address already in use
at java.net.PlainSocketImpl.socketBind(Native Method)
at java.net.AbstractPlainSocketImpl.bind(AbstractPlainSocketImpl.java:353)
at java.net.ServerSocket.bind(ServerSocket.java:336)
at java.net.ServerSocket.bind(ServerSocket.java:294)
--
java.lang.ClassNotFoundException: field.extras.max.MaxPlugin
at java.net.URLClassLoader$1.run(URLClassLoader.java:217)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:205)
at java.lang.ClassLoader.loadClass(ClassLoader.java:321)
--
java.lang.ClassNotFoundException: field.extras.gstreamer.GStreamerPlugin
at java.net.URLClassLoader$1.run(URLClassLoader.java:217)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:205)
at java.lang.ClassLoader.loadClass(ClassLoader.java:321)
--
java.io.FileNotFoundException: http://openendedgroup.com//favicon.ico
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1401)
at field.core.plugins.help.HelpBrowser.rewriteOnlineWikipage(HelpBrowser.java:436)
at field.core.plugins.help.HelpBrowser$1.serve(HelpBrowser.java:208)
at field.core.plugins.help.NanoHTTPD$HTTPSession.run(NanoHTTPD.java:246)
Otherwise, it all looks pretty good.
Changed "if (doMultisampling || Platform.isLinux())" to "if
(doMultisampling)". Out of interest, what graphics hardware & drivers are
you using?
On Mon, Dec 24, 2012 at 7:01 AM, Andrew Baxter notifications@github.comwrote:
I've managed to get field running under linux by making a change to
Field/Contents/core/java/field/core/windowing/GLComponentWindow.java:I've pasted below the git diff for this file:
diff --git a/Contents/core/java/field/core/windowing/GLComponentWindow.java b/Contents/core/java/field/core/windowing/GLComponentWindow.java
index 64b0674..9a4a8bd 100755
--- a/Contents/core/java/field/core/windowing/GLComponentWindow.java
+++ b/Contents/core/java/field/core/windowing/GLComponentWindow.java
@@ -1030,7 +1030,7 @@ public class GLComponentWindow implements Listener, iUpdateable, iProvidesQueue,
data.depthSize = 24;
// data.stencilSize = 8;
if (doMultisampling || Platform.isLinux()) {
if (doMultisampling && !Platform.isLinux()) { data.samples = 2; // data.sampleBuffers = 2; }
I'll have another look at field later, probably after christmas.
—
Reply to this email directly or view it on GitHubhttps://github.com//issues/19#issuecomment-11660390.
Again not sure at the moment about the graphics card because my old laptop is being fixed. It's a lenovo thinkpad X61s if that helps. I'll try using your version of the code on my desktop machine and see if it works OK.
This is a review of the thinkpad X61s: http://www.cnet.com/laptops/lenovo-thinkpad-x61s/4505-3121_7-32465540.html
I have the exact same error on Ubuntu 12.04 x64, I changed GLComponentWindow.java but it didn't help
Xorg.0.log:
[ 27.665] (II) RADEON(0): Creating default Display subsection in Screen section "Default Screen Section" for depth/fbbpp 24/32 [ 27.665] (==) RADEON(0): Depth 24, (--) framebuffer bpp 32
Error log:
constantine@eudaimonia:~$ Field/Contents/linux/field_linux64.sh -field.scratch nameOfFileToOpen.field /home/constantine/Field/Contents/linux/.. rm: cannot remove `../core/classes/org/eclipse/swt': No such file or directory Listening for transport dt_socket at address: 5555 hello ## trampoline loaded classmap with <{__maphash__=4563750622168695909}> adding to loader checking for natives found <0> warning, path added to classpath through Field-RedirectionPath inside extension /home/constantine/Field/Contents/linux/../extensions/scrubber.mf doesn't exist warning, path added to classpath through Field-RedirectionPath inside extension /home/constantine/Field/Contents/linux/../extensions/personal.mf doesn't exist warning, path added to classpath through Field-RedirectionPath inside extension /home/constantine/Field/Contents/linux/../extensions/opencl.mf doesn't exist warning, path added to classpath through Field-RedirectionPath inside extension /home/constantine/Field/Contents/linux/../extensions/typing.mf doesn't exist warning, path added to classpath through Field-RedirectionPath inside extension /home/constantine/Field/Contents/linux/../extensions/jfbxlib.mf doesn't exist warning, path added to classpath through Field-RedirectionPath inside extension /home/constantine/Field/Contents/linux/../extensions/languages.mf doesn't exist warning, path added to classpath through Field-RedirectionPath inside extension /home/constantine/Field/Contents/linux/../extensions/languages.mf doesn't exist warning, path added to classpath through Field-RedirectionPath inside extension /home/constantine/Field/Contents/linux/../extensions/gstreamer.mf doesn't exist warning, path added to classpath through Field-RedirectionPath inside extension /home/constantine/Field/Contents/linux/../extensions/maxmsp.mf doesn't exist warning, path added to classpath through Field-RedirectionPath inside extension /home/constantine/Field/Contents/linux/../extensions/reload.mf doesn't exist warning, path added to classpath through Field-RedirectionPath inside extension /home/constantine/Field/Contents/linux/../extensions/syphon.mf doesn't exist warning, path added to classpath through Field-RedirectionPath inside extension /home/constantine/Field/Contents/linux/../extensions/wrap.mf doesn't exist warning, path added to classpath through Field-RedirectionPath inside extension /home/constantine/Field/Contents/linux/../extensions/online.mf doesn't exist warning, path added to classpath through Field-RedirectionPath inside extension /home/constantine/Field/Contents/linux/../extensions/osc.mf doesn't exist adding to loader checking for natives found <0> platform is :linux / Linux false -- registering open document handler -- -- registering open document handler complete -- --- into workspace directory, in search of bug #142: versioning dir is set to which exists? user home is and we're out of workspacedirectory(), still looking for #142: dir is and new platform is :linux / Linux false sheets are :[] inside deferednextupdate +field.Blank2@5bd6fbb3 part2_original [] java.lang.reflect.InvocationTargetException at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:616) at field.bytecode.protect.DeferedNextUpdate$1.update(DeferedNextUpdate.java:47) at field.launch.Launcher$4.run(Launcher.java:328) at org.eclipse.swt.widgets.Display.timerProc(Unknown Source) at org.eclipse.swt.internal.gtk.OS._g_main_context_iteration(Native Method) at org.eclipse.swt.internal.gtk.OS.g_main_context_iteration(Unknown Source) at org.eclipse.swt.widgets.Display.readAndDispatch(Unknown Source) at field.launch.Launcher.main(Launcher.java:93) Caused by: org.eclipse.swt.SWTException: Unsupported color depth at org.eclipse.swt.SWT.error(Unknown Source) at org.eclipse.swt.SWT.error(Unknown Source) at org.eclipse.swt.SWT.error(Unknown Source) at org.eclipse.swt.opengl.GLCanvas.(Unknown Source) at field.core.windowing.GLComponentWindow.(GLComponentWindow.java:1058) at field.core.StandardFluidSheet.(StandardFluidSheet.java:440) at field.core.StandardFluidSheet.scratchBegin(StandardFluidSheet.java:269) at field.core.StandardFluidSheet.versionedScratch(StandardFluidSheet.java:356) at field.core.execution.PhantomFluidSheet.(PhantomFluidSheet.java:69) at field.core.ui.FieldMenus2.open(FieldMenus2.java:170) at field.Blank2.part2_original(Blank2.java:85) ... 11 more
Oh, ok, I'm an idiot, I had to recompile it after changing GLComponentWindow.java. All works fine now!
This should be fixed now in the repository, can you confirm? I'd also be fairly excited to hear that Field is usable on AMD + Linux, can you describe your setup?
Yes, it fixed, I compiled it today without changing anything. Thank you for that!
My current setup based on an old radeon hd card. If it will run any 3D stuff with basic xorg driver I'll upgrade it to the latest AMD card, I heard there's a lot of problems with Nvidia on Linux
Those problems are essentially political. While I have a lot of time for them, from a purely technical perspective Nvidia's proprietary drivers on Linux seem excellent. Their stability, and their feature parity with Windows, is why we've moved all of our production work to Linux. Glad to hear we're back working on AMD again though.