msgbartop
Free PC Help Articles for Windows and PC
msgbarbottom

Java Crashes

Java crash – An error in executing programs

Java crash is a term used to define a run-time error that occurs whenever a user tries to open a web page that requires Java to execute. As a result, the web browser or mostly Explorer crashes. The only result or remedy for this error is to reinstall or reload Java but it does not proof a useful solution in some cases.

Java crash occurs at random times during the execution of the system’s programs and the work done up to that level is lost and cannot be retrieved. It happens eventually without the prior knowledge of the user. The Web applications such as JIRA and Confluence, etc. are running in a Java virtual machine (JVM) which is mainly responsible for managing the memory, CPU and the devices attached with the system, same as the operating system take care of applications like MS Office, web browsers etc. A JVM crash is visible by getting a characteristic ‘Windows Blue Screen of Death’ while using MS Office or a web browser and occurs when the JVM is running low of the free memory.

The Java crash is an error that occurs in JVM not in the software operating within the system. These crashes are sometimes the result of JDK bugs that can be fixed by installing new JDK version. When this crash happens, it is due to the execution of two threads that are calling VTK C++ calls. These two threads are:

· The main event thread

· The finalizer thread which performs the garbage collection.

For example, see the following call:

vtkPointData t = pointPolyData.GetPointData (); vtkDataArray u = t.GetNormals();

What happens is when the GetNormals function is being processed in the C++ side, then due to some system’s processing reasons, the garbage collector starts thinking that t can be de-allocated to empty the allocated memory locations. So, the finalizer thread deletes it from the main event thread which is actually expecting it to Exists. Therefore, Java crash appears and the program is stopped from running.

Sometimes, the reason for Java crashes is thought to be the use of weak global references (NewWeakGlobalRef and DeleteWeakGlobalRef) as the weak global references do not behave as a real reference. Therefore, the objects get collected in garbage during the thread call to native method. The use of non-weak global references (NewGlobalRef and DeleteGlobalRef) helps to avoid these Java crashes.

Click Here For A Free PC Scan.

Tags: ,