ManuraNirmal / gstreamer-java

Automatically exported from code.google.com/p/gstreamer-java
0 stars 0 forks source link

StreamInfoTest unit test always crash jvm #66

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
if you run the current svn the StreamInfoTest always crash the java vm for me.
would you check it?

Original issue reported on code.google.com by lfar...@gmail.com on 1 Dec 2010 at 10:52

GoogleCodeExporter commented 8 years ago
ok, I'll check on Linux, Mac and Windows and will report back soon.

Original comment by andres.c...@gmail.com on 1 Dec 2010 at 1:22

GoogleCodeExporter commented 8 years ago
All tests pass.

I've updated to latest on trunk and ran the tests. I used 'mvn -debug -e test' 
and have made some changes via commit r460 so we may all use the exact same 
environment. The maven execution log is attached. 

More info:

uname -a:
Linux zaxod 2.6.32-26-generic #46-Ubuntu SMP Tue Oct 26 16:46:46 UTC 2010 i686 
GNU/Linux

Gstreamer binaries:

bluez-gstreamer                          4.60-0ubuntu8
gstreamer-tools                          0.10.28-1
gstreamer0.10-alsa                       0.10.28-1
gstreamer0.10-doc                        0.10.28-1
gstreamer0.10-ffmpeg                     0.10.10-1
gstreamer0.10-fluendo-mp3                0.10.12.debian-2
gstreamer0.10-gnomevfs                   0.10.28-1
gstreamer0.10-gnonlin                    0.10.15-1
gstreamer0.10-gnonlin-doc                0.10.15-1
gstreamer0.10-nice                       0.0.10-2build1
gstreamer0.10-packagekit                 0.5.7-0ubuntu2.2
gstreamer0.10-pitfdll                    0.9.1.1+cvs20080215-1ubuntu2
gstreamer0.10-plugins-bad                0.10.18-1ubuntu1
gstreamer0.10-plugins-bad-doc            0.10.18-1ubuntu1
gstreamer0.10-plugins-bad-multiverse     0.10.18-0ubuntu1
gstreamer0.10-plugins-base               0.10.28-1
gstreamer0.10-plugins-base-apps          0.10.28-1
gstreamer0.10-plugins-good               0.10.21-1ubuntu3
gstreamer0.10-plugins-ugly               0.10.14-1
gstreamer0.10-plugins-ugly-doc           0.10.14-1
gstreamer0.10-plugins-ugly-multiverse    0.10.14-0ubuntu2
gstreamer0.10-pocketsphinx               0.5.1+dfsg1-0ubuntu1
gstreamer0.10-pulseaudio                 0.10.21-1ubuntu3
gstreamer0.10-sdl                        0.10.18-1ubuntu1
gstreamer0.10-tools                      0.10.28-1
gstreamer0.10-x                          0.10.28-1
libgstreamer-plugins-base0.10-0          0.10.28-1
libgstreamer-plugins-base0.10-dev        0.10.28-1
libgstreamer0.10-0                       0.10.28-1
libgstreamer0.10-dev                     0.10.28-1

Original comment by tsha...@gmail.com on 1 Dec 2010 at 2:36

Attachments:

GoogleCodeExporter commented 8 years ago
Hi guys, sorry for my ignorance, but I'm a little bit at a lost with regards on 
how to properly run the test classes.

From Tal's comment, it seems that the maven project allows for an automatic way 
of running all tests in a batch. Since I'm not familiar with maven, I don't 
know how to do it.

What I do in these cases is just to create a small class with a main entry 
point (see the attached file) which then I run as a Java Application from 
Eclipse in order to to execute the tests methods of a specific test class.

BTW, StreamInfoTest  runs fine on OSX, with the exception of the 
testStreamInfoGC() method which triggers a null pointer exception.

Original comment by andres.c...@gmail.com on 2 Dec 2010 at 1:58

Attachments:

GoogleCodeExporter commented 8 years ago
simple run
ant
and at the end it's run junit test. for me it's always gives the error bellow. 
i also attached the jvm crash log too.
-----------------------------------
    [junit] Testsuite: org.gstreamer.StreamInfoTest
    [junit] #
    [junit] # A fatal error has been detected by the Java Runtime Environment:
    [junit] #
    [junit] #  SIGSEGV (0xb) at pc=0x00007f88c4730a6c, pid=4774, tid=140225424619280
    [junit] #
    [junit] # JRE version: 6.0_17-b17
    [junit] # Java VM: OpenJDK 64-Bit Server VM (14.0-b16 mixed mode linux-amd64 )
    [junit] # Derivative: IcedTea6 1.7.4
    [junit] # Distribution: Custom build (Thu Jul 29 16:49:18 EDT 2010)
    [junit] # Problematic frame:
    [junit] # C  [libjnidispatch.so+0xaa6c]  Java_com_sun_jna_Pointer__1getLong+0xcc
    [junit] #
    [junit] # An error report file with more information is saved as:
    [junit] # /home/lfarkas/work/vidux/java/gstreamer-java/hs_err_pid4774.log
    [junit] #
    [junit] # If you would like to submit a bug report, please include
    [junit] # instructions how to reproduce the bug and visit:
    [junit] #   http://icedtea.classpath.org/bugzilla
    [junit] # The crash happened outside the Java Virtual Machine in native code.
    [junit] # See problematic frame for where to report the bug.
    [junit] #
    [junit] Test org.gstreamer.StreamInfoTest FAILED (crashed)
-----------------------------------

Original comment by lfar...@gmail.com on 2 Dec 2010 at 10:08

Attachments:

GoogleCodeExporter commented 8 years ago
This error may be due to native data size error (hence I don't get it because 
my JCM is not 64bit). Or it could be OpenJDK vs. Snoracle JVM. In reference to 
andres.colubri 's running tests comment: Do you use Eclipse or Netbeans? Under 
Eclipse, if you open the context menu (right mouse button click) when you are 
above the root of your project: Run -> Unit Test, then it will create a special 
runner that will collect all JUnit tests under your project and run them 
sequentially. There was something like 'Run All Tests' in Netbeans, I think..

Original comment by tsha...@gmail.com on 2 Dec 2010 at 3:36

GoogleCodeExporter commented 8 years ago
Farkas, could you re-ran the StreamInfo test using the branch at 
https://gstreamer-java.googlecode.com/svn/branches/gstreamer-java-issu66?

Thanks

Original comment by tsha...@gmail.com on 2 Dec 2010 at 3:39

GoogleCodeExporter commented 8 years ago

Original comment by tsha...@gmail.com on 2 Dec 2010 at 3:40

GoogleCodeExporter commented 8 years ago
gstreamer-java-issu66 runs junit test without problem!

Original comment by lfar...@gmail.com on 2 Dec 2010 at 5:28

GoogleCodeExporter commented 8 years ago
but i not really like your changes what's more not really understand as the C 
definition now different from the gstreamer-java (which is bad!)
----------------------------
struct _GValueArray
{
  guint   n_values;
  GValue *values;

  /*< private >*/
  guint   n_prealloced;
};
----------------------------
imho we'd have to fix it properly!

Original comment by lfar...@gmail.com on 2 Dec 2010 at 8:27

GoogleCodeExporter commented 8 years ago
imho the the bug was:
Pointer pointerToArray = pointer.getPointer(GType.SIZE);
Pointer pointerToArray = pointer.getPointer(4);
since the pointer on 64 bit is 8 byte, but the changes in the GValueArray 
fields are not useful.

Original comment by lfar...@gmail.com on 2 Dec 2010 at 9:19

GoogleCodeExporter commented 8 years ago
Ironically I have changed 'pointer.getPointer(GType.SIZE)' to 
'pointer.getPointer(4)' in a previous SVN commit on trunk because I thought 
using GType.SIZE is a bug that will cause errors on 64bit JVMs. You see, 
pointer.getPointer(8) means to get a pointer at 8 byte offset from the 
beginning of the memory pointed to by 'pointer'. So, since _GValueArray has 
'n_values' of type int as first member, logically 'values' should be placed at 
offset 4 and pointer.getPointer(4) should be used to retrieve it...

Original comment by tsha...@gmail.com on 3 Dec 2010 at 4:23

GoogleCodeExporter commented 8 years ago
you seems to right, but there should have to be some other reason...

Original comment by lfar...@gmail.com on 3 Dec 2010 at 10:55

GoogleCodeExporter commented 8 years ago
ok i change back to GType.SIZE (even though i don't understand the reason, but 
it's at least do not crash the jvm. but it'd be useful if someone can 
understand it and explain for us:-)

Original comment by lfar...@gmail.com on 3 Dec 2010 at 11:45