4

My Java application JVM (1.6.0_26, 32-bit) experienced sporadic crash when closed this Java application. This intermittent JVM crash problem seemed to only affect 64-bit Windows OS.  This problem does NOT occur on 32-bit Windows OS and Mac OS X. Can anyone tell me the reason for this. actually this java application uses 100-150 libraries and it does not get crashed while in execution, once application gets closed crash occurs. Is it appropriate to use 32 bit JVM on 64 bit machine?

Thanks a lot in advance for your help.

6
  • Does the application does anything particular at closing? Particularly, anything OS related?
    – madth3
    Jan 19, 2012 at 5:56
  • 2
    Do you get JVM crash? What is in the crash report? You consider any special actions that happen on 'exit' - like closing on handles, other JNI related stuff etc.
    – Jayan
    Jan 19, 2012 at 6:22
  • No it does not do anything related to OS.
    – Sneha
    Jan 19, 2012 at 6:23
  • I will paste the crash report.
    – Sneha
    Jan 19, 2012 at 6:24
  • A fatal error has been detected by the Java Runtime Environment: # # EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x2d5c6073, pid=9580, tid=9968 # # JRE version: 6.0_26-b03 # Java VM: Java HotSpot(TM) Client VM (20.1-b02 mixed mode windows-x86 ) # Problematic frame: # C 0x2d5c6073 # # If you would like to submit a bug report, please visit: # java.sun.com/webapps/bugreport/crash.jsp # The crash happened outside the Java Virtual Machine in native code. # See problematic frame for where to report the bug.
    – Sneha
    Jan 19, 2012 at 6:24

2 Answers 2

1

Short answer is No. It's not appropriate to use a 32-bit JVM on a 64-bit machine. Longer answer is Windows 64bit OS can run 32bit programs under a compatibility mode if you don't have an option.

There's really no need to do that since 64 bit JVM runs fine on Windows OS. This also means your process can take advantage of more memory and speed than a 32bit process can use.

http://msdn.microsoft.com/en-us/library/aa384249(v=vs.85).aspx

6
  • I'm forced to use a 32 bit JVM on Windows 64 bit due to some of our apps using proprietary 32 bit native database drivers. The 64 bit JVM refuses to load them. However, the 32 bit JVM runs fine (as far as I can tell.)
    – Chris Nava
    Jan 19, 2012 at 6:25
  • Thanks a lot for your input. Is there anyway to run 32 bit application with 32 bit JVM on 64 bit machine? I am facing problem in java, why have you shared msdn link?
    – Sneha
    Jan 19, 2012 at 6:26
  • The MSDN link talks about how 64bit Windows runs 32bit processes. I think you'll need to read up on it, and see if you are following all of the assumptions about emulating 32bit processes on 64 bit machines. If you are using a 32bit database driver with native code it might not be Java that's dying. It could be your driver that's the problem. Look at your crash report, and see what code it was in when it crashed. If its in the driver then it's evidence there's a problem with the a driver on 32bit emulation. Can you remove the driver and use a type 4 jdbc driver with another DB like mysql? Jan 19, 2012 at 16:51
  • I will check the link. Thanks. FYI: It's a legacy application with an ancient proprietary database. The driver is a thin wrapper around a driver.dll. When I load it with a 64 bit JVM I get "Exception in thread "main" java.lang.UnsatisfiedLinkError: C:\driver\drivername.dll: Can't load IA 32-bit .dll on a AMD 64-bit platform" It works fine under a 32 bit JVM on the same machine though.
    – Chris Nava
    Jan 20, 2012 at 4:56
  • The links clearly states "However, 32-bit processes cannot load 64-bit DLLs for execution, and 64-bit processes cannot load 32-bit DLLs for execution." so it would appear I'm out of luck.
    – Chris Nava
    Jan 20, 2012 at 5:00
0

Having a similar issue where I installed my JVM 32 bit on a 64 bit Win7, everything worked well until a third party OLE bridge was loaded. The JVM gave a crash report saying Java binary stopped working and the Message in the crash report code's value was HEAP_MEMORY_CORRUPTION. It is quite strange though because when I attached a profiler, the heap was well under the maximum limit. I suspect that my Bridge provider made some Kernel Mode executions(if that's possible) that is not allowed while being emulated under WOW64.

I solved mine. When the ole populated MS Office, it couldn't populate 2007 instead when I installed 2003, it worked. check whether your app crashed immediately or when some native calls are taking place, that way you could pinpoint the trouble.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.