Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 449179

Summary: EXCEPTION_ACCESS_VIOLATION with Java 8
Product: [Eclipse Project] JDT Reporter: Sumit Singh <sumitsingh_1234>
Component: DebugAssignee: JDT-Debug-Inbox <jdt-debug-inbox>
Status: CLOSED WONTFIX QA Contact:
Severity: normal    
Priority: P3 CC: markus.kell.r, srikanth_sankaran
Version: 4.4   
Target Milestone: ---   
Hardware: PC   
OS: Windows 7   
Whiteboard: stalebug
Attachments:
Description Flags
Sample project none

Description Sumit Singh CLA 2014-10-29 08:35:18 EDT
I have written a small Socket java program for which is works perfectly fine if I ran it from Windows command prompt(CMD).
But it throws fatal error EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x6c40cb5e, pid=5364, tid=2404 if I ran it in Eclipse(luna).

CMD Environment:
1. java version "1.8.0_25"

Eclipse Environment:
1. Version: Luna Release (4.4.0)
2. Build id: 20140612-0600
3. java version "1.8.0_25" (Used for project)

In Attachment:
1. java project 
2. ReadMe file
3. hs_err_pid5364.log and replay_pid5364.log Logs

How to reproduce the problem:(read ReadMe.txt file from attachment)
/******************** Run in Eclipse(Luna)****************/
1. Use Java 8 
2. Run the com.infineon.javabug.server.Server Class
3. Run the com.infineon.javabug.MainClass Class
4. Application Crashes with EXCEPTION_ACCESS_VIOLATION fatal error.


/*****************Run using CMD **************************/
1. Use Java 8 
2. Run the com.infineon.javabug.server.Server Class
3. Run the com.infineon.javabug.MainClass Class
4. (2, 3)Or run the crashDemo.bat file from inside attached java project.
5. Application Passes(doesn't Crash).
Comment 1 Sumit Singh CLA 2014-10-29 08:36:17 EDT
Created attachment 248253 [details]
Sample project
Comment 2 Sumit Singh CLA 2014-10-29 08:40:54 EDT
One more thing:
If i run program in eclipse with -Xint VM arg then it doesn't crash.
Comment 3 Srikanth Sankaran CLA 2014-10-29 09:27:27 EDT
(In reply to sumit singh from comment #0)
> I have written a small Socket java program for which is works perfectly fine

How was this compiled when you ran it from the command prompt ? 


> if I ran it from Windows command prompt(CMD).
> But it throws fatal error EXCEPTION_ACCESS_VIOLATION (0xc0000005) at
> pc=0x6c40cb5e, pid=5364, tid=2404 if I ran it in Eclipse(luna).

At the outset this looks like a bug in the VM to me.


Also I don't see any crash when I compile I with your project with
master (Mars nearly M3 bits) + JVM 8u20.

Why do you think this is an eclipse problem ?
Comment 4 Sumit Singh CLA 2014-10-30 01:11:34 EDT
(In reply to Srikanth Sankaran from comment #3)

1.> How was this compiled when you ran it from the command prompt ? 
A. compilation is not necessary you can run class file directly compiled by eclipse in bin folder of attachment.
B. If you want to compile the source code from CMD see: http://stackoverflow.com/questions/2356443/building-java-package-javac-to-all-files


2. > Also I don't see any crash when I compile I with your project with
> master (Mars nearly M3 bits) + JVM 8u20.
Program Doesn't crash when you compile it, It crashes when you run the program as above mentioned:
1. Run the com.infineon.javabug.server.Server Class
2. Run the com.infineon.javabug.MainClass Class 

3. >Why do you think this is an eclipse problem ?
I already raised the bug in VM, they ask for reproducible code after running this Programs in eclipse and CMD, I found that program runs in CMD but only crashes in eclipse.
So I'm not sure its VM bug, Because if it is then it should crash in CMD also?
Comment 5 Srikanth Sankaran CLA 2014-10-30 01:52:11 EDT
(In reply to sumit singh from comment #4)
> (In reply to Srikanth Sankaran from comment #3)
> 
> 1.> How was this compiled when you ran it from the command prompt ? 
> A. compilation is not necessary you can run class file directly compiled by
> eclipse in bin folder of attachment.

I was trying to figure out if in the run from the command prompt scenario
you used some other compiler. Since you say you picked it up from eclipse
bin directory, I presume they were compiled by eclipse in both scenarios.

> B. If you want to compile the source code from CMD see:
> http://stackoverflow.com/questions/2356443/building-java-package-javac-to-
> all-files

Well I am back to being unsure. In the command line test scenario did
you use javac at all ? or were the class files compiled by eclipse ? 

> 2. > Also I don't see any crash when I compile I with your project with
> > master (Mars nearly M3 bits) + JVM 8u20.
> Program Doesn't crash when you compile it, It crashes when you run the
> program as above mentioned:

That is what I meant. When I compile and run from master using 8u20, I
don't see any problems when running from the IDE.

> So I'm not sure its VM bug, Because if it is then it should crash in CMD
> also?

The VM should never crash even when input bad files - so there is definitely
a VM bug here. Is there also an eclipse bug is an open question. I'll
reassign this bug to JDT/Debug which controls the launch configurations
to see if they have some insight.
Comment 6 Sumit Singh CLA 2014-10-30 07:12:02 EDT
(In reply to Srikanth Sankaran from comment #5)

> Well I am back to being unsure. In the command line test scenario did
> you use javac at all ? or were the class files compiled by eclipse ? 

They were compiled by eclipse in both scenarios.

> That is what I meant. When I compile and run from master using 8u20, I
> don't see any problems when running from the IDE.

With Below Eclipse Version Every time and in every PC its Crashing:
1. Version: Luna Release (4.4.0)
2. Build id: 20140612-0600
3. java version "1.8.0_25" (Used for project and in Run config's JRE tab )


> The VM should never crash even when input bad files - so there is definitely
> a VM bug here. Is there also an eclipse bug is an open question. I'll
> reassign this bug to JDT/Debug which controls the launch configurations
> to see if they have some insight.

I also sended this project to guy who ask me for reproducible scenario. Let see what they says.
Comment 7 Eclipse Genie CLA 2020-02-23 13:06:59 EST
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet. As such, we're closing this bug.

If you have further information on the current state of the bug, please add it and reopen this bug. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.

--
The automated Eclipse Genie.