Java wrapper causes jvm crash

Help
Tobias
2012-07-04
2012-12-11
  • Tobias
    Tobias
    2012-07-04

    Hi,

    Loading the DLL seems to work, I can call the "Info_Version", "Info_Codecs", "Info_Parameters". And I can even open a file. But as soon as I tried to query something, my jvm crashs (jvm 32bit, Win 7 32bit):

    Problem signature:
      Problem Event Name: APPCRASH
      Application Name: javaw.exe
      Application Version: 6.0.330.3
      Application Timestamp: 4faa9fa4
      Fault Module Name: jna4563917294102168368.dll
      Fault Module Version: 3.4.0.86
      Fault Module Timestamp: 4ec28db1
      Exception Code: c0000005
      Exception Offset: 0000d300
      OS Version: 6.1.7601.2.1.0.256.4
      Locale ID: 1033
      Additional Information 1: 75f5
      Additional Information 2: 75f534f5ed3a33e52a7354318cdb96d6
      Additional Information 3: 02a1
      Additional Information 4: 02a1893a36a38545d23143790d9e839e

    Any idea? Thx!

    -Tobias

     
  • Tobias
    Tobias
    2012-07-04

    Forgot, I am using version 0.7.58 (32bit)

     
  • Tested the JNA example + Example.ogg from MediaInfo_DLL_0.7.58_Windows_i386_WithoutInstaller.7z with with 0.7.58 32-bit Windows + Java 1.6.0_33-b033 + twall-jna-3.4.1-16-g4c814e7.zip + Win7 64-bit

    D:\MediaInfoLib\Project\Java\Example.JNA>ver

    Microsoft Windows

    D:\MediaInfoLib\Project\Java\Example.JNA>java -version
    java version "1.6.0_33"
    Java(TM) SE Runtime Environment (build 1.6.0_33-b03)
    Java HotSpot(TM) 64-Bit Server VM (build 20.8-b03, mixed mode)

    D:\MediaInfoLib\Project\Java\Example.JNA>Compile

    D:\MediaInfoLib\Project\Java\Example.JNA>dir
    05/07/2012  09:54    <REP>          .
    05/07/2012  09:54    <REP>          ..
    11/05/2012  09:50               128 Compile.bat
    11/05/2012  09:50               122 Compile.sh
    11/05/2012  09:50             4 855 Example.ogg
    05/07/2012  09:19             3 010 HowToUse_Dll.class
    24/06/2012  12:17         1 369 421 jna.jar
    11/05/2012  09:50               111 MakeJavaDoc.bat
    11/05/2012  09:50               105 MakeJavaDoc.sh
    05/07/2012  09:19             1 287 MediaInfo$InfoKind.class
    05/07/2012  09:19               769 MediaInfo$MediaInfoDLL_Internal$1.class
    05/07/2012  09:19             1 265 MediaInfo$MediaInfoDLL_Internal.class
    05/07/2012  09:19             1 183 MediaInfo$StreamKind.class
    05/07/2012  09:19             3 466 MediaInfo.class
    29/05/2012  10:22         3 710 576 MediaInfo.dll
    11/05/2012  09:50               329 ReadMe.txt
    11/05/2012  09:50                34 Run.bat
    11/05/2012  09:50                35 Run.sh

    D:\MediaInfoLib\Project\Java\Example.JNA>javac -d . -classpath .;jna.jar ..\..\..\Source\MediaInfoDLL\MedaInfoDLL.JNA.java ..\..\..\Source\Example\HowToUse_Dll.JNA.java

    D:\MediaInfoLib\Project\Java\Example.JNA> Run
    (…)
    Custom Inform
    Example : FileSize=4855

    GetI with Stream=General and Parameter=2
    1

    Count_Get with StreamKind=Stream_Audio
    1

    Get with Stream=General and Parameter="AudioCount"
    1

    Get with Stream=Audio and Parameter="StreamCount"
    1

    Get with Stream=General and Parameter="FileSize"
    4855

    Close

    ***

    I don't have a 32-bit Win7 now, but I don't think something will change with it. Do you have the latest JNA version? Can you compile/run the example?

     
  • Tobias
    Tobias
    2012-07-05

    Just tried it on a 64Bit Windows - you're right, it works. But doing the same on a 32Bit Windows yields a JVM crash… Latest JNA - 3.4.0

    Any idea?

     
  • Tobias
    Tobias
    2012-07-09

    Thanks a lot :) You saved my day!