[gst-devel] gst-java, segfaults, and linking
Bradley Schatz
bradley at greystate.com
Sun Sep 1 05:08:05 CEST 2002
I am currently trying to get gst-java working with the current gstreamer
distribution (0.4). I understand that this extesion has not worked with
gstreamer since the 0.2 level. Getting it to compile required fixing a
few differences in the API.
I am running into a spot of a problem, with the example.Mp3v2 program
segfaulting in the gst code, when the java bindings call gst_init(NULL,
NULL). (Mp3v2 is basically the java equivalent of the helloworld c
example distributed with gstreamer.)
The gdb segfault is here:
Program received signal SIGSEGV, Segmentation fault.
0x4c88556e in gst_xml_registry_paths_start_element (context=0x80d68c8,
element_name=0x0, attribute_names=0xbfffcec4,
attribute_values=0xbfffcec4,
user_data=0x80d5f48, error=0xbfffcec0) at gstxmlregistry.c:1079
1079 if (!strcmp (element_name, "GST-PluginRegistry")) {
(gdb) print element_name
$1 = (gchar *) 0x4c892cb1 "GST-PluginRegistry"
Here is the odd thing. Note above that element_name is passed into the
function as NULL. And then it has a value when I inspect it.
A couple of questions.
- Should the XML code that gst_init is using be passing null values to
strcmp? I have tried stepping into g_markup_parse_context_parse but
havent the source installed with my current configuration.
- When I run the helloworld c program all runs fine, using the same call
of gst_init(NULL, NULL) What could be possible reasons for the
difference in behavior. ?Different dynamic libraries?
- Looking further into dynamic libraries issue, i notice when i run ldd
over my running version of helloworld that ldd says it in not a dynamic
executable. What do the -Wl options in the linking scheme for helloworld
do?
Any suggestions techniques I could use to continue narrowing this one
down would be very much appreciated.
Bradley
Degug Traces follow
Program received signal SIGSEGV, Segmentation fault.
0x4c88556e in gst_xml_registry_paths_start_element (context=0x80d68c8,
element_name=0x0, attribute_names=0xbfffcec4,
attribute_values=0xbfffcec4,
user_data=0x80d5f48, error=0xbfffcec0) at gstxmlregistry.c:1079
1079 if (!strcmp (element_name, "GST-PluginRegistry")) {
(gdb) print element_name
$1 = (gchar *) 0x4c892cb1 "GST-PluginRegistry"
(gdb) where
#0 0x4c88556e in gst_xml_registry_paths_start_element
(context=0x80d68c8,
element_name=0x0, attribute_names=0xbfffcec4,
attribute_values=0xbfffcec4,
user_data=0x80d5f48, error=0xbfffcec0) at gstxmlregistry.c:1079
#1 0x4c9a8872 in g_markup_parse_context_parse (context=0x80d68c8,
text=0x80d6a90 "<?xml
version=\"1.0\"?>\n<GST-PluginRegistry>\n<gst-plugin-paths>\n<path>/usr/local/lib/gst</path>\n</gst-plugin-paths>\n<plugin>\n<name>sdlvideosink</name>\n<filename>/usr/local/lib/gst/libgstsdlvideosink.so<"...,
text_len=10240, error=0xbfffcf48) at gmarkup.c:1238
#2 0x4c883b51 in gst_xml_registry_add_path_list_func
(registry=0x80d5f48)
at gstxmlregistry.c:382
#3 0x4c8837b2 in gst_xml_registry_set_property (object=0x80d5f48,
prop_id=1,
value=0xbfffd000, pspec=0x80d4df8) at gstxmlregistry.c:255
#4 0x4c952ac8 in g_object_set_valist (object=0x80d5f48,
first_property_name=0x4c89118f "location", var_args=0xbfffd0cc)
at gobject.c:571
#5 0x4c953026 in g_object_set (_object=0x80d5f48,
first_property_name=0x4c89118f "location") at gobject.c:960
#6 0x4c883633 in gst_xml_registry_new (name=0x4c887522
"global_registry",
location=0x4c887920 "/usr/local/etc/gstreamer/registry.xml")
at gstxmlregistry.c:223
#7 0x4c858d20 in init_pre () at gst.c:282
#8 0x4c85896d in gst_init_with_popt_table (argc=0x0, argv=0x0,
popt_options=0x0) at gst.c:170
---Type <return> to continue, or q <return> to quit---l
#9 0x4c85875f in gst_init (argc=0x0, argv=0x0) at gst.c:135
#10 0x4c1c0b2b in Java_gnu_gst_Gst_init (env=0x805177c, cls=0xbfffd380,
argv=0xbfffd388) at gnu_gst_Gst.c:13
#11 0x42049806 in ?? ()
#12 0x42041f93 in ?? ()
#13 0x4203f195 in ?? ()
#14 0x402ac4f6 in JavaCalls::call_helper ()
from /usr/java/j2sdk1.4.0_01/jre/lib/i386/client/libjvm.so
#15 0x4034744d in os::os_exception_wrapper ()
from /usr/java/j2sdk1.4.0_01/jre/lib/i386/client/libjvm.so
#16 0x402ac644 in JavaCalls::call ()
from /usr/java/j2sdk1.4.0_01/jre/lib/i386/client/libjvm.so
#17 0x402b45cd in jni_invoke ()
from /usr/java/j2sdk1.4.0_01/jre/lib/i386/client/libjvm.so
#18 0x402c3bcd in jni_CallStaticVoidMethod ()
from /usr/java/j2sdk1.4.0_01/jre/lib/i386/client/libjvm.so
#19 0x08049372 in strcpy ()
#20 0x400601c4 in __libc_start_main () from /lib/libc.so.6
[bradley at localhost gst-java]$ /usr/java/j2sdk1.4.0_01/bin/java -Xdebug
-Xrunjdwp:transport=dt_socket,server=y,suspend=y -cp ./bin/
example.Mp3v2
Listening for transport dt_socket at address: 33150
/usr/java/j2sdk1.4.0_01/jre/lib/i386/client:/usr/java/j2sdk1.4.0_01/jre/lib/i386:/usr/java/j2sdk1.4.0_01/jre/../lib/i386
An unexpected exception has been detected in native code outside the VM.
Unexpected Signal : 11 occurred at PC=0x4C88556E
Function=(null)+0x4C88556E
Library=/usr/local/lib/libgstreamer-0.4.0.so.0
NOTE: We are unable to locate the function name symbol for the error
just occurred. Please refer to release documentation for possible
reason and solutions.
Current Java thread:
at gnu.gst.Gst.init(Native Method)
at example.Mp3v2.main(Mp3v2.java:39)
Dynamic libraries:
08048000-0804d000 r-xp 00000000 03:02 99752
/usr/java/j2sdk1.4.0_01/bin/java
0804d000-0804e000 rw-p 00004000 03:02 99752
/usr/java/j2sdk1.4.0_01/bin/java
40000000-40012000 r-xp 00000000 03:02 17969 /lib/ld-2.2.5.so
40012000-40013000 rw-p 00012000 03:02 17969 /lib/ld-2.2.5.so
40013000-4001c000 r-xp 00000000 03:02 1128014
/usr/java/j2sdk1.4.0_01/jre/lib/i386/native_threads/libhpi.so
4001c000-4001d000 rw-p 00008000 03:02 1128014
/usr/java/j2sdk1.4.0_01/jre/lib/i386/native_threads/libhpi.so
4001d000-4002e000 r-xp 00000000 03:02 148790
/usr/java/j2sdk1.4.0_01/jre/lib/i386/libverify.so
4002e000-40030000 rw-p 00010000 03:02 148790
/usr/java/j2sdk1.4.0_01/jre/lib/i386/libverify.so
40030000-4003e000 r-xp 00000000 03:02 16620 /lib/libpthread-0.9.so
4003e000-40045000 rw-p 0000e000 03:02 16620 /lib/libpthread-0.9.so
40046000-40048000 r-xp 00000000 03:02 16591 /lib/libdl-2.2.5.so
40048000-40049000 rw-p 00001000 03:02 16591 /lib/libdl-2.2.5.so
40049000-40167000 r-xp 00000000 03:02 16329 /lib/libc-2.2.5.so
40167000-4016c000 rw-p 0011e000 03:02 16329 /lib/libc-2.2.5.so
40170000-40436000 r-xp 00000000 03:02 148767
/usr/java/j2sdk1.4.0_01/jre/lib/i386/client/libjvm.so
40436000-4059f000 rw-p 002c5000 03:02 148767
/usr/java/j2sdk1.4.0_01/jre/lib/i386/client/libjvm.so
405b3000-405c4000 r-xp 00000000 03:02 16337 /lib/libnsl-2.2.5.so
405c4000-405c5000 rw-p 00011000 03:02 16337 /lib/libnsl-2.2.5.so
405c7000-405fb000 r-xp 00000000 03:02 343865
/usr/lib/libstdc++-2-libc6.1-1-2.9.0.so
405fb000-40607000 rw-p 00033000 03:02 343865
/usr/lib/libstdc++-2-libc6.1-1-2.9.0.so
40609000-40629000 r-xp 00000000 03:02 16616 /lib/libm-2.2.5.so
40629000-4062a000 rw-p 0001f000 03:02 16616 /lib/libm-2.2.5.so
4062a000-4064c000 r-xp 00000000 03:02 148778
/usr/java/j2sdk1.4.0_01/jre/lib/i386/libjava.so
4064c000-4064e000 rw-p 00021000 03:02 148778
/usr/java/j2sdk1.4.0_01/jre/lib/i386/libjava.so
40650000-40664000 r-xp 00000000 03:02 148791
/usr/java/j2sdk1.4.0_01/jre/lib/i386/libzip.so
40664000-40667000 rw-p 00013000 03:02 148791
/usr/java/j2sdk1.4.0_01/jre/lib/i386/libzip.so
40667000-41ce4000 r--s 00000000 03:02 148816
/usr/java/j2sdk1.4.0_01/jre/lib/rt.jar
41d26000-41d3d000 r--s 00000000 03:02 148817
/usr/java/j2sdk1.4.0_01/jre/lib/sunrsasign.jar
41d3d000-41dab000 r--s 00000000 03:02 148794
/usr/java/j2sdk1.4.0_01/jre/lib/jsse.jar
41dab000-41dbe000 r--s 00000000 03:02 148793
/usr/java/j2sdk1.4.0_01/jre/lib/jce.jar
41dbe000-4203f000 r--s 00000000 03:02 148727
/usr/java/j2sdk1.4.0_01/jre/lib/charsets.jar
440e7000-440ed000 r--s 00000000 03:02 1160793
/usr/lib/gconv/gconv-modules.cache
440ed000-440ee000 r--p 00000000 03:02 1275165
/usr/lib/locale/en_US/LC_IDENTIFICATION
440ee000-440ef000 r--p 00000000 03:02 671185
/usr/lib/locale/en_US/LC_MEASUREMENT
440ef000-440f0000 r--p 00000000 03:02 1404544
/usr/lib/locale/en_US/LC_TELEPHONE
4c170000-4c19b000 r--p 00000000 03:02 931445
/usr/lib/locale/en_US/LC_CTYPE
4c19b000-4c19c000 r--p 00000000 03:02 1405347
/usr/lib/locale/en_US/LC_ADDRESS
4c19c000-4c19d000 r--p 00000000 03:02 1405333
/usr/lib/locale/en_US/LC_NAME
4c19d000-4c19e000 r--p 00000000 03:02 654019
/usr/lib/locale/en_US/LC_PAPER
4c19e000-4c19f000 r--p 00000000 03:02 865386
/usr/lib/locale/en_US/LC_MESSAGES/SYS_LC_MESSAGES
4c19f000-4c1a0000 r--p 00000000 03:02 669957
/usr/lib/locale/en_US/LC_MONETARY
4c1a0000-4c1a6000 r--p 00000000 03:02 1469180
/usr/lib/locale/en_US/LC_COLLATE
4c1a6000-4c1a7000 r--p 00000000 03:02 1275166
/usr/lib/locale/en_US/LC_TIME
4c1a7000-4c1a8000 r--p 00000000 03:02 931433
/usr/lib/locale/en_US/LC_NUMERIC
4c1a8000-4c1ab000 r-xp 00000000 03:02 148773
/usr/java/j2sdk1.4.0_01/jre/lib/i386/libdt_socket.so
4c1ab000-4c1ac000 rw-p 00002000 03:02 148773
/usr/java/j2sdk1.4.0_01/jre/lib/i386/libdt_socket.so
4c1ad000-4c1af000 r--s 00000000 03:02 148736
/usr/java/j2sdk1.4.0_01/jre/lib/ext/dnsns.jar
4c1af000-4c1bd000 r--s 00000000 03:02 148737
/usr/java/j2sdk1.4.0_01/jre/lib/ext/ldapsec.jar
4c1bd000-4c1c2000 r-xp 00000000 03:02 149129
/usr/java/j2sdk1.4.0_01/jre/lib/i386/libGSTJava.so
4c1c2000-4c1c3000 rw-p 00004000 03:02 149129
/usr/java/j2sdk1.4.0_01/jre/lib/i386/libGSTJava.so
4c1c5000-4c1ce000 r-xp 00000000 03:02 16453
/lib/libnss_files-2.2.5.so
4c1ce000-4c1cf000 rw-p 00008000 03:02 16453
/lib/libnss_files-2.2.5.so
4c1cf000-4c1fc000 r-xp 00000000 03:02 148782
/usr/java/j2sdk1.4.0_01/jre/lib/i386/libjdwp.so
4c1fc000-4c1fe000 rw-p 0002c000 03:02 148782
/usr/java/j2sdk1.4.0_01/jre/lib/i386/libjdwp.so
4c201000-4c2a4000 r--s 00000000 03:02 148738
/usr/java/j2sdk1.4.0_01/jre/lib/ext/localedata.jar
4c2a4000-4c2f0000 r--s 00000000 03:02 148607
/usr/java/j2sdk1.4.0_01/jre/lib/ext/sound.jar
4c2f0000-4c4d8000 r--s 00000000 03:02 148608
/usr/java/j2sdk1.4.0_01/jre/lib/ext/jmf.jar
4c503000-4c520000 r--s 00000000 03:02 148739
/usr/java/j2sdk1.4.0_01/jre/lib/ext/sunjce_provider.jar
4c520000-4c529000 r--s 00000000 03:02 148609
/usr/java/j2sdk1.4.0_01/jre/lib/ext/mediaplayer.jar
4c529000-4c537000 r--s 00000000 03:02 148610
/usr/java/j2sdk1.4.0_01/jre/lib/ext/multiplayer.jar
4c537000-4c544000 r--s 00000000 03:02 146883
/usr/java/j2sdk1.4.0_01/jre/lib/ext/aspectjrt.jar
4c561000-4c581000 r-xp 00000000 03:02 342771
/usr/lib/libglib-1.2.so.0.0.10
4c581000-4c582000 rw-p 00020000 03:02 342771
/usr/lib/libglib-1.2.so.0.0.10
4c582000-4c6a6000 r-xp 00000000 03:02 342970
/usr/lib/libgtk-1.2.so.0.9.1
4c6a6000-4c6af000 rw-p 00123000 03:02 342970
/usr/lib/libgtk-1.2.so.0.9.1
4c6b0000-4c6e2000 r-xp 00000000 03:02 342885
/usr/lib/libgdk-1.2.so.0.9.1
4c6e2000-4c6e3000 rw-p 00031000 03:02 342885
/usr/lib/libgdk-1.2.so.0.9.1
4c6e3000-4c6e5000 r-xp 00000000 03:02 342773
/usr/lib/libgmodule-1.2.so.0.0.10
4c6e5000-4c6e6000 rw-p 00001000 03:02 342773
/usr/lib/libgmodule-1.2.so.0.0.10
4c6e6000-4c6ed000 r-xp 00000000 03:02 1436257
/usr/X11R6/lib/libXi.so.6.0
4c6ed000-4c6ee000 rw-p 00006000 03:02 1436257
/usr/X11R6/lib/libXi.so.6.0
4c6ee000-4c6fa000 r-xp 00000000 03:02 1436251
/usr/X11R6/lib/libXext.so.6.4
4c6fa000-4c6fb000 rw-p 0000c000 03:02 1436251
/usr/X11R6/lib/libXext.so.6.4
4c6fb000-4c7cd000 r-xp 00000000 03:02 1436243
/usr/X11R6/lib/libX11.so.6.2
4c7cd000-4c7d0000 rw-p 000d1000 03:02 1436243
/usr/X11R6/lib/libX11.so.6.2
4c7d0000-4c83a000 r-xp 00000000 03:02 342916
/usr/lib/libxml.so.1.8.17
4c83a000-4c83d000 rw-p 00069000 03:02 342916
/usr/lib/libxml.so.1.8.17
4c83d000-4c849000 r-xp 00000000 03:02 342865 /usr/lib/libz.so.1.1.3
4c849000-4c84b000 rw-p 0000b000 03:02 342865 /usr/lib/libz.so.1.1.3
4c84b000-4c894000 r-xp 00000000 03:02 1828688
/usr/local/lib/libgstreamer-0.4.0.so.0.0.0
4c894000-4c897000 rw-p 00048000 03:02 1828688
/usr/local/lib/libgstreamer-0.4.0.so.0.0.0
4c897000-4c8a9000 r-xp 00000000 03:02 2254046
/usr/local/lib/gst/libgstelements.so
4c8a9000-4c8aa000 rw-p 00012000 03:02 2254046
/usr/local/lib/gst/libgstelements.so
4c8aa000-4c93c000 r-xp 00000000 03:02 342918
/usr/lib/libxml2.so.2.4.23
4c93c000-4c946000 rw-p 00091000 03:02 342918
/usr/lib/libxml2.so.2.4.23
4c946000-4c97a000 r-xp 00000000 03:02 342781
/usr/lib/libgobject-2.0.so.0.0.6
4c97a000-4c97c000 rw-p 00033000 03:02 342781
/usr/lib/libgobject-2.0.so.0.0.6
4c97c000-4c980000 r-xp 00000000 03:02 342783
/usr/lib/libgthread-2.0.so.0.0.6
4c980000-4c981000 rw-p 00003000 03:02 342783
/usr/lib/libgthread-2.0.so.0.0.6
4c981000-4c984000 r-xp 00000000 03:02 342779
/usr/lib/libgmodule-2.0.so.0.0.6
4c984000-4c985000 rw-p 00002000 03:02 342779
/usr/lib/libgmodule-2.0.so.0.0.6
4c985000-4c9e6000 r-xp 00000000 03:02 342777
/usr/lib/libglib-2.0.so.0.0.6
4c9e6000-4c9e7000 rw-p 00060000 03:02 342777
/usr/lib/libglib-2.0.so.0.0.6
4c9e7000-4c9ed000 r-xp 00000000 03:02 342796
/usr/lib/libpopt.so.0.0.0
4c9ed000-4c9ee000 rw-p 00005000 03:02 342796
/usr/lib/libpopt.so.0.0.0
Local Time = Wed Aug 28 12:45:32 2002
Elapsed Time = 481
#
# The exception above was detected in native code outside the VM
#
# Java VM: Java HotSpot(TM) Client VM (1.4.0_01-b03 mixed mode)
#
# An error report file has been saved as hs_err_pid6565.log.
# Please refer to the file for further information.
#
Aborted
More information about the gstreamer-devel
mailing list