Created attachment 71030 [details] contains everything to reproduce bug in simplest way If xkb_keymap_new_from_file is called from Java via a JNI library then it crashes. When called from a native application that links to the exact same JNI library the function works perfectly. Attached is a zip file that demonstrates in the simplest way possible the crash from Java and it working fine called via the JNI library linked by a native application. To Build: - extract zip - cd xkbbug - edit build.sh JDK variable to point to where your JDK is. - sh ./build.sh To Run from java: - sh ./run-from-java.sh To Run native app that calls same code: - sh ./run-native.sh I've also included prebuilt binaries for 64 bit Linux so you don't need to manually build. When run from Java you will see that it core dumps when trying to load the keyboard file.
Fixed in git: commit bb620df7aa98c129687382e4866e643b8482fc59 Author: Daniel Stone <daniel@fooishbar.org> Date: Thu Dec 6 15:04:15 2012 +1100 Parser: Initialise geometry elements for VarDecl We were using uninitialised memory whilst parsing geometry, leaving random contents as the return for shape/overlay/etc sections. Somehow this actually worked everywhere but under Java. https://bugs.freedesktop.org/show_bug.cgi?id=57913 Signed-off-by: Daniel Stone <daniel@fooishbar.org> Thanks for the testcase, it really helped. This should make it into an 0.2.1 sometime before Christmas.
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.