Annotations in Java binding

Tim Moloney t.moloney at verizon.net
Wed Apr 19 21:15:58 PDT 2006


Matthew Johnson wrote:
> I've updated the Java bindings to both create annotations (and some
> other stuff) correctly, and to already contain GLib.CSymbol.
>
> http://www.matthew.ath.cx/projects/libdbus-java-1.6.tar.gz

CreateInterface in 1.6 works well except that I have to change 
"org.freedesktop.DBus.GLib" to "org.freedesktop.dbus.GLib" or 
"org.freedesktop.dbus.glib" (and rename the directories appropriately) 
or else I get a "collides with type" compile-time error.  That's the 
good news.

The bad news is that the JVM crashes when running my application with 
libdbus-java-1.6.  Dropping back to 1.5 works just fine, even with the 
interface classes generated from the 1.6 CreateInterface.  I've attached 
the log file in case that helps.

Tim Moloney

-------------- next part --------------
#
# An unexpected error has been detected by HotSpot Virtual Machine:
#
#  SIGSEGV (0xb) at pc=0x002c76ab, pid=15800, tid=124591008
#
# Java VM: Java HotSpot(TM) Client VM (1.5.0_05-b05 mixed mode, sharing)
# Problematic frame:
# V  [libjvm.so+0x1b66ab]
#

---------------  T H R E A D  ---------------

Current thread (0x09f2cc20):  JavaThread "DBusConnection" [_thread_in_vm, id=15812]

siginfo:si_signo=11, si_errno=0, si_code=1, si_addr=0x00000000

Registers:
EAX=0x00000000, EBX=0x0045a7a8, ECX=0x00000000, EDX=0x00000000
ESP=0x076d0950, EBP=0x076d0950, ESI=0x076d0978, EDI=0x076d09f4
EIP=0x002c76ab, CR2=0x00000000, EFLAGS=0x00210246

Top of Stack: (sp=0x076d0950)
0x076d0950:   076d09e0 0028a539 00000000 00000006
0x076d0960:   00000000 00000002 09f2cc20 09f2ccdc
0x076d0970:   076d0998 09f2cc20 09f2ccdc 09f05d94
0x076d0980:   009f0e79 009f0e75 00000000 09f2cc20
0x076d0990:   00000000 00000002 0000000c 8cc5b7b0
0x076d09a0:   076d09e0 00000000 09f2cc20 00000006
0x076d09b0:   00000000 09f2cc20 09f2cc20 009d4610
0x076d09c0:   00000009 009a0d4f 00000073 09f30910 

Instructions: (pc=0x002c76ab)
0x002c769b:   00 8b 00 c3 90 55 89 e5 8b 55 08 89 d1 83 e1 fc
0x002c76ab:   8b 01 83 78 1c 02 75 0d 83 e2 03 8b 44 90 24 5d 

Stack: [0x07651000,0x076d2000),  sp=0x076d0950,  free space=510k
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
V  [libjvm.so+0x1b66ab]
V  [libjvm.so+0x179539]
C  [libdbus-java.so+0x3d08]  append_args+0x265
C  [libdbus-java.so+0x6052]  Java_org_freedesktop_dbus_DBusConnection_dbus_1call_1method+0x16a
j  org.freedesktop.dbus.DBusConnection.dbus_call_method(ILjava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Z[Ljava/lang/Object;)I+0
j  org.freedesktop.dbus.DBusConnection.sendMessage(Lorg/freedesktop/dbus/DBusMessage;)V+158
j  org.freedesktop.dbus.DBusConnection.access$800(Lorg/freedesktop/dbus/DBusConnection;Lorg/freedesktop/dbus/DBusMessage;)V+2
j  org.freedesktop.dbus.DBusConnection$_thread.run()V+192
v  ~StubRoutines::call_stub
V  [libjvm.so+0x16cb6c]
V  [libjvm.so+0x25f688]
V  [libjvm.so+0x16c3c5]
V  [libjvm.so+0x16c45e]
V  [libjvm.so+0x1d1ac5]
V  [libjvm.so+0x2bdf03]
V  [libjvm.so+0x260198]
C  [libpthread.so.0+0x53b6]

Java frames: (J=compiled Java code, j=interpreted, Vv=VM code)
j  org.freedesktop.dbus.DBusConnection.dbus_call_method(ILjava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Z[Ljava/lang/Object;)I+0
j  org.freedesktop.dbus.DBusConnection.sendMessage(Lorg/freedesktop/dbus/DBusMessage;)V+158
j  org.freedesktop.dbus.DBusConnection.access$800(Lorg/freedesktop/dbus/DBusConnection;Lorg/freedesktop/dbus/DBusMessage;)V+2
j  org.freedesktop.dbus.DBusConnection$_thread.run()V+192
v  ~StubRoutines::call_stub

---------------  P R O C E S S  ---------------

Java Threads: ( => current thread )
=>0x09f2cc20 JavaThread "DBusConnection" [_thread_in_vm, id=15812]
  0x09e40950 JavaThread "Low Memory Detector" daemon [_thread_blocked, id=15810]
  0x09e3f3b8 JavaThread "CompilerThread0" daemon [_thread_blocked, id=15809]
  0x09e3a970 JavaThread "Signal Dispatcher" daemon [_thread_blocked, id=15808]
  0x09e376a0 JavaThread "Finalizer" daemon [_thread_blocked, id=15807]
  0x09e36920 JavaThread "Reference Handler" daemon [_thread_blocked, id=15806]
  0x09dfb458 JavaThread "main" [_thread_blocked, id=15800]

Other Threads:
  0x09e33e18 VMThread [id=15805]
  0x09e41e28 WatcherThread [id=15811]

VM state:not at safepoint (normal execution)

VM Mutex/Monitor currently owned by a thread: None

Heap
 def new generation   total 576K, used 32K [0x88c50000, 0x88cf0000, 0x89130000)
  eden space 512K,   1% used [0x88c50000, 0x88c519f8, 0x88cd0000)
  from space 64K,  41% used [0x88cd0000, 0x88cd69b0, 0x88ce0000)
  to   space 64K,   0% used [0x88ce0000, 0x88ce0000, 0x88cf0000)
 tenured generation   total 1408K, used 130K [0x89130000, 0x89290000, 0x8cc50000)
   the space 1408K,   9% used [0x89130000, 0x89150a10, 0x89150c00, 0x89290000)
 compacting perm gen  total 8192K, used 171K [0x8cc50000, 0x8d450000, 0x90c50000)
   the space 8192K,   2% used [0x8cc50000, 0x8cc7afd0, 0x8cc7b000, 0x8d450000)
    ro space 8192K,  68% used [0x90c50000, 0x911cb5e8, 0x911cb600, 0x91450000)
    rw space 12288K,  47% used [0x91450000, 0x91a09dc0, 0x91a09e00, 0x92050000)

Dynamic libraries:
00111000-00440000 r-xp 00000000 fd:00 8915930    /usr/java/jdk1.5.0_05/jre/lib/i386/client/libjvm.so
00440000-0045d000 rwxp 0032f000 fd:00 8915930    /usr/java/jdk1.5.0_05/jre/lib/i386/client/libjvm.so
0045d000-00873000 rwxp 0045d000 00:00 0 
00873000-00884000 r-xp 00000000 fd:00 87950737   /lib/libnsl-2.4.so
00884000-00885000 r-xp 00010000 fd:00 87950737   /lib/libnsl-2.4.so
00885000-00886000 rwxp 00011000 fd:00 87950737   /lib/libnsl-2.4.so
00886000-00888000 rwxp 00886000 00:00 0 
00888000-00891000 r-xp 00000000 fd:00 87949353   /lib/libnss_files-2.4.so
00891000-00892000 r-xp 00008000 fd:00 87949353   /lib/libnss_files-2.4.so
00892000-00893000 rwxp 00009000 fd:00 87949353   /lib/libnss_files-2.4.so
00893000-00895000 r-xp 00000000 fd:00 87950733   /lib/libcom_err.so.2.1
00895000-00896000 rwxp 00001000 fd:00 87950733   /lib/libcom_err.so.2.1
00896000-008a5000 r-xp 00000000 fd:00 87949381   /lib/libresolv-2.4.so
008a5000-008a6000 r-xp 0000e000 fd:00 87949381   /lib/libresolv-2.4.so
008a6000-008a7000 rwxp 0000f000 fd:00 87949381   /lib/libresolv-2.4.so
008a7000-008a9000 rwxp 008a7000 00:00 0 
008a9000-008ca000 r-xp 00000000 fd:00 8915947    /usr/java/jdk1.5.0_05/jre/lib/i386/libjava.so
008ca000-008cc000 rwxp 00020000 fd:00 8915947    /usr/java/jdk1.5.0_05/jre/lib/i386/libjava.so
008cc000-008cd000 rwxp 008cc000 00:00 0 
008cd000-008ce000 rwxp 008cd000 00:00 0 
008ce000-008d0000 rwxp 008ce000 00:00 0 
008d0000-008ec000 rwxp 008d0000 00:00 0 
008ec000-008f0000 rwxp 008ec000 00:00 0 
008f0000-0090c000 rwxp 008f0000 00:00 0 
0090c000-00918000 rwxp 0090c000 00:00 0 
00918000-00935000 rwxp 00918000 00:00 0 
00935000-0093a000 rwxp 00935000 00:00 0 
0093a000-00956000 rwxp 0093a000 00:00 0 
00956000-00962000 rwxp 00956000 00:00 0 
00962000-009d4000 r-xp 00000000 fd:00 91750473   /lib/libdbus-1.so.2.0.0
009d4000-009d5000 rwxp 00071000 fd:00 91750473   /lib/libdbus-1.so.2.0.0
009d5000-009d8000 r-xp 00000000 fd:00 87950747   /lib/libcap.so.1.10
009d8000-009d9000 rwxp 00002000 fd:00 87950747   /lib/libcap.so.1.10
009de000-009e9000 r-xp 00000000 fd:00 8915966    /usr/java/jdk1.5.0_05/jre/lib/i386/libverify.so
009e9000-009ea000 rwxp 0000b000 fd:00 8915966    /usr/java/jdk1.5.0_05/jre/lib/i386/libverify.so
009ea000-009f2000 r-xp 00000000 fd:00 9177505    /usr/lib/jni/libdbus-java.so
009f2000-009f3000 rwxp 00007000 fd:00 9177505    /usr/lib/jni/libdbus-java.so
00a14000-00a27000 r-xp 00000000 fd:00 8915967    /usr/java/jdk1.5.0_05/jre/lib/i386/libzip.so
00a27000-00a29000 rwxp 00012000 fd:00 8915967    /usr/java/jdk1.5.0_05/jre/lib/i386/libzip.so
00a73000-00a74000 r-xp 00a73000 00:00 0          [vdso]
00a74000-00a8d000 r-xp 00000000 fd:00 91750460   /lib/ld-2.4.so
00a8d000-00a8e000 r-xp 00018000 fd:00 91750460   /lib/ld-2.4.so
00a8e000-00a8f000 rwxp 00019000 fd:00 91750460   /lib/ld-2.4.so
00a91000-00bbd000 r-xp 00000000 fd:00 91750461   /lib/libc-2.4.so
00bbd000-00bc0000 r-xp 0012b000 fd:00 91750461   /lib/libc-2.4.so
00bc0000-00bc1000 rwxp 0012e000 fd:00 91750461   /lib/libc-2.4.so
00bc1000-00bc4000 rwxp 00bc1000 00:00 0 
00bc6000-00be9000 r-xp 00000000 fd:00 91750462   /lib/libm-2.4.so
00be9000-00bea000 r-xp 00022000 fd:00 91750462   /lib/libm-2.4.so
00bea000-00beb000 rwxp 00023000 fd:00 91750462   /lib/libm-2.4.so
00bed000-00bef000 r-xp 00000000 fd:00 91750463   /lib/libdl-2.4.so
00bef000-00bf0000 r-xp 00001000 fd:00 91750463   /lib/libdl-2.4.so
00bf0000-00bf1000 rwxp 00002000 fd:00 91750463   /lib/libdl-2.4.so
00bf1000-00e98000 r-xp 00000000 fd:00 87949554   /lib/libnss_ldap-2.3.90.so
00e98000-00eaf000 rwxp 002a7000 fd:00 87949554   /lib/libnss_ldap-2.3.90.so
00eaf000-00ebe000 rwxp 00eaf000 00:00 0 
00ec0000-00ec3000 rwxp 00ec0000 00:00 0 
00ec3000-00f40000 rwxp 00ec3000 00:00 0 
00f70000-00f76000 r-xp 00000000 fd:00 8946334    /usr/java/jdk1.5.0_05/jre/lib/i386/native_threads/libhpi.so
00f76000-00f77000 rwxp 00006000 fd:00 8946334    /usr/java/jdk1.5.0_05/jre/lib/i386/native_threads/libhpi.so
00f77000-0100f000 rwxp 00f77000 00:00 0 
0100f000-02f77000 rwxp 0100f000 00:00 0 
02f77000-02f78000 --xp 02f77000 00:00 0 
02f78000-02ff8000 rwxp 02f78000 00:00 0 
02ff8000-02ffb000 --xp 02ff8000 00:00 0 
02ffb000-03079000 rwxp 02ffb000 00:00 0 
03079000-0307c000 --xp 03079000 00:00 0 
0307c000-030fa000 rwxp 0307c000 00:00 0 
030fa000-030fd000 --xp 030fa000 00:00 0 
030fd000-0317b000 rwxp 030fd000 00:00 0 
0317b000-0317c000 --xp 0317b000 00:00 0 
0317c000-031fc000 rwxp 0317c000 00:00 0 
03841000-03844000 --xp 03841000 00:00 0 
03844000-038c2000 rwxp 03844000 00:00 0 
04be1000-04be4000 --xp 04be1000 00:00 0 
04be4000-04c62000 rwxp 04be4000 00:00 0 
07651000-07654000 --xp 07651000 00:00 0 
07654000-076d2000 rwxp 07654000 00:00 0 
07ded000-07dfd000 r-xp 00000000 fd:00 91750469   /lib/libpthread-2.4.so
07dfd000-07dfe000 r-xp 0000f000 fd:00 91750469   /lib/libpthread-2.4.so
07dfe000-07dff000 rwxp 00010000 fd:00 91750469   /lib/libpthread-2.4.so
07dff000-07e01000 rwxp 07dff000 00:00 0 
08048000-08056000 r-xp 00000000 fd:00 8751453    /usr/java/jdk1.5.0_05/bin/java
08056000-08058000 rwxp 0000e000 fd:00 8751453    /usr/java/jdk1.5.0_05/bin/java
09de4000-09f54000 rwxp 09de4000 00:00 0          [heap]
88c50000-88cf0000 rwxp 88c50000 00:00 0 
88cf0000-89130000 rwxp 88cf0000 00:00 0 
89130000-89290000 rwxp 89130000 00:00 0 
89290000-8cc50000 rwxp 89290000 00:00 0 
8cc50000-8d450000 rwxp 8cc50000 00:00 0 
8d450000-90c50000 rwxp 8d450000 00:00 0 
90c50000-911cc000 r-xs 00001000 fd:00 8915912    /usr/java/jdk1.5.0_05/jre/lib/i386/client/classes.jsa
911cc000-91450000 rwxp 911cc000 00:00 0 
91450000-91a0a000 rwxp 0057d000 fd:00 8915912    /usr/java/jdk1.5.0_05/jre/lib/i386/client/classes.jsa
91a0a000-92050000 rwxp 91a0a000 00:00 0 
92050000-9211f000 rwxp 00b37000 fd:00 8915912    /usr/java/jdk1.5.0_05/jre/lib/i386/client/classes.jsa
9211f000-92450000 rwxp 9211f000 00:00 0 
92450000-92454000 r-xs 00c06000 fd:00 8915912    /usr/java/jdk1.5.0_05/jre/lib/i386/client/classes.jsa
92454000-92850000 rwxp 92454000 00:00 0 
b4ce6000-b4cf9000 r-xs 00000000 fd:00 8116614    /usr/share/java/dbus-1.5.jar
b4cf9000-b4d17000 r-xs 00000000 fd:00 87658635   /opt/eclipse-3.2M6/plugins/org.junit_3.8.1/junit.jar
b4d17000-b4d42000 r-xs 00000000 fd:00 8915914    /usr/java/jdk1.5.0_05/jre/lib/ext/sunpkcs11.jar
b4d42000-b4e06000 r-xs 00000000 fd:00 8915968    /usr/java/jdk1.5.0_05/jre/lib/ext/localedata.jar
b4e06000-b4e2c000 r-xs 00000000 fd:00 8915913    /usr/java/jdk1.5.0_05/jre/lib/ext/sunjce_provider.jar
b4e2c000-b4e2e000 r-xs 00000000 fd:00 8915911    /usr/java/jdk1.5.0_05/jre/lib/ext/dnsns.jar
b4e2e000-b502e000 r-xp 00000000 fd:00 8097204    /usr/lib/locale/locale-archive
b502e000-b5869000 r--s 00000000 fd:00 8847979    /usr/java/jdk1.5.0_05/jre/lib/charsets.jar
b5869000-b587d000 r--s 00000000 fd:00 8847978    /usr/java/jdk1.5.0_05/jre/lib/jce.jar
b587d000-b5904000 r--s 00000000 fd:00 8847986    /usr/java/jdk1.5.0_05/jre/lib/jsse.jar
b5904000-b596d000 rw-p b5904000 00:00 0 
b596d000-b7f57000 r--s 00000000 fd:00 8847988    /usr/java/jdk1.5.0_05/jre/lib/rt.jar
b7f57000-b7f59000 rw-p b7f57000 00:00 0 
b7f6a000-b7f72000 rw-s 00000000 fd:00 106561691  /tmp/hsperfdata_tmoloney/15800
b7f72000-b7f73000 rwxp b7f72000 00:00 0 
b7f73000-b7f74000 r--p b7f73000 00:00 0 
b7f74000-b7f75000 rw-p b7f74000 00:00 0 
bf874000-bf877000 ---p bf874000 00:00 0 
bf877000-bfa74000 rw-p bf877000 00:00 0          [stack]

VM Arguments:
jvm_args: -Djava.library.path=/usr/lib:/usr/lib/jni
java_command: rhythmbox.RhythmboxInterface

Environment Variables:
JAVA_HOME=/usr/java/jdk1.5.0_05
CLASSPATH=/home/tmoloney/sandbox/equinox/archive/org.eclipse.osgi_3.2.0.jar
PATH=/usr/java/jdk1.5.0_05/bin:/home/tmoloney/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/X11R6/bin:/home/tmoloney/bin
LD_LIBRARY_PATH=/usr/java/jdk1.5.0_05/jre/lib/i386/client:/usr/java/jdk1.5.0_05/jre/lib/i386:/usr/java/jdk1.5.0_05/jre/../lib/i386:/usr/lib/mozilla-1.7.12
SHELL=/bin/bash
DISPLAY=:0.0

Signal Handlers:
SIGSEGV: [libjvm.so+0x2ebc30], sa_mask[0]=0x7ffbfeff, sa_flags=0x10000004
SIGBUS: [libjvm.so+0x2ebc30], sa_mask[0]=0x7ffbfeff, sa_flags=0x10000004
SIGFPE: [libjvm.so+0x25e6c0], sa_mask[0]=0x7ffbfeff, sa_flags=0x10000004
SIGPIPE: SIG_IGN, sa_mask[0]=0x00001000, sa_flags=0x10000000
SIGILL: [libjvm.so+0x25e6c0], sa_mask[0]=0x7ffbfeff, sa_flags=0x10000004
SIGUSR1: SIG_DFL, sa_mask[0]=0x00000000, sa_flags=0x00000000
SIGUSR2: [libjvm.so+0x260a10], sa_mask[0]=0x00000004, sa_flags=0x10000004
SIGHUP: [libjvm.so+0x260440], sa_mask[0]=0x7ffbfeff, sa_flags=0x10000004
SIGINT: [libjvm.so+0x260440], sa_mask[0]=0x7ffbfeff, sa_flags=0x10000004
SIGQUIT: [libjvm.so+0x260440], sa_mask[0]=0x7ffbfeff, sa_flags=0x10000004
SIGTERM: [libjvm.so+0x260440], sa_mask[0]=0x7ffbfeff, sa_flags=0x10000004


---------------  S Y S T E M  ---------------

OS:Fedora Core release 5 (Bordeaux)

uname:Linux 2.6.16-1.2080_FC5smp #1 SMP Tue Mar 28 03:55:15 EST 2006 i686
libc:glibc 2.4 NPTL 2.4 
rlimit: STACK 10240k, CORE 0k, NPROC 16255, NOFILE 1024, AS infinity
load average:0.04 0.10 0.10

CPU:total 2 family 15, cmov, cx8, fxsr, mmx, sse, sse2, ht

Memory: 4k page, physical 1024324k(23600k free), swap 2031608k(2031500k free)

vm_info: Java HotSpot(TM) Client VM (1.5.0_05-b05) for linux-x86, built on Aug 26 2005 16:24:31 by java_re with gcc 3.2.1-7a (J2SE release)



More information about the dbus mailing list