java.exe run my classes ok, but in IDEA I get errors:

Answered

java.exe run my classes ok, but in IDEA I get errors 0xC0000005, in log:

java.lang.InternalError: Remote thread failed for unknown reason (in log)

simple example:

public class Test0xC0000005 {
public static void main(String[] args) {
for (int i = 0; i < 50000; i++) {
System.out.println(i+":"+Math.sin(i));
}
}
}


result:
.........
31585:-0.5417680548370093
31586:0.41456142266293844
31587:0.9897450400145335
31588:0.6549616320198749
31589:-0.28199047994353665

Process finished with exit code -1073741819 (0xC0000005)

(any jdk 9 8 10 11)

I try change heap size, -Dswing.noxp=true, set compability mode (windows 7 or 8) for java.exe or idea, but all it not work.


Can you help me?

key places in log:

 

2018-12-22 09:37:06,462 [ 0] INFO - #com.intellij.idea.Main - ------------------------------------------------------ IDE STARTED ------------------------------------------------------
2018-12-22 09:37:06,495 [ 33] INFO - #com.intellij.idea.Main - IDE: IntelliJ IDEA (build #IU-183.4886.37, 17 Dec 2018 18:06)
2018-12-22 09:37:06,495 [ 33] INFO - #com.intellij.idea.Main - OS: Windows 10 (10.0, amd64)
2018-12-22 09:37:06,495 [ 33] INFO - #com.intellij.idea.Main - JRE: 1.8.0_152-release-1343-b26 (JetBrains s.r.o)
2018-12-22 09:37:06,495 [ 33] INFO - #com.intellij.idea.Main - JVM: 25.152-b26 (OpenJDK 64-Bit Server VM)
2018-12-22 09:37:06,500 [ 38] INFO - #com.intellij.idea.Main - JVM Args: -Xms128m -Xmx750m -XX:ReservedCodeCacheSize=240m -XX:+UseConcMarkSweepGC -XX:SoftRefLRUPolicyMSPerMB=50 -ea -Dsun.io.useCanonCaches=false -Djava.net.preferIPv4Stack=true -Djdk.http.auth.tunneling.disabledSchemes="" -XX:+HeapDumpOnOutOfMemoryError -XX:-OmitStackTraceInFastThrow -Dswing.noxp=true -Djb.vmOptionsFile=C:\Users\USER\.IntelliJIdea2018.3\config\idea64.exe.vmoptions -Didea.jre.check=true -Dide.native.launcher=true -Didea.paths.selector=IntelliJIdea2018.3 -XX:ErrorFile=C:\Users\USER\java_error_in_idea_%p.log -XX:HeapDumpPath=C:\Users\USER\java_error_in_idea.hprof
2018-12-22 09:37:06,501 [ 39] INFO - #com.intellij.idea.Main - ext: C:\Program Files\JetBrains\IntelliJ IDEA 2018.3.1\jre64\lib\ext: [access-bridge-64.jar, cldrdata.jar, dnsns.jar, jaccess.jar, jfxrt.jar, localedata.jar, meta-index, nashorn.jar, sunec.jar, sunjce_provider.jar, sunmscapi.jar, sunpkcs11.jar, zipfs.jar]
2018-12-22 09:37:06,502 [ 40] INFO - #com.intellij.idea.Main - charsets: JNU=Cp1251 file=Cp1251
2018-12-22 09:37:06,552 [ 90] INFO - #com.intellij.idea.Main - JNA library (64-bit) loaded in 50 ms
2018-12-22 09:37:06,555 [ 93] INFO - penapi.util.io.win32.IdeaWin32 - Native filesystem for Windows is operational
2018-12-22 09:37:06,742 [ 280] INFO - #com.intellij.util.ui.JBUI - User scale factor: 1.0

.......

java.lang.InternalError: Remote thread failed for unknown reason
at sun.tools.attach.WindowsVirtualMachine.enqueue(Native Method)
at sun.tools.attach.WindowsVirtualMachine.<init>(WindowsVirtualMachine.java:62)
at sun.tools.attach.WindowsAttachProvider.attachVirtualMachine(WindowsAttachProvider.java:69)
at com.sun.tools.attach.VirtualMachine.attach(VirtualMachine.java:208)
at com.intellij.debugger.impl.attach.JavaAttachDebuggerProvider.a(JavaAttachDebuggerProvider.java:240)
at com.intellij.debugger.impl.attach.JavaAttachDebuggerProvider.b(JavaAttachDebuggerProvider.java:211)
at com.intellij.openapi.application.impl.ApplicationImpl$2.call(ApplicationImpl.java:337)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)

0
5 comments

Hello,

Do you use any antivirus software?

1

No. Just Windows Defender. I tried to off it. No effect.
And. java.exe with any classes work normally and stability. The problem arises only in Idea (Run).

Seems if AV was a source of problems then java.exe probably wouldn't work normally. 

0

Do you use PuntoSwitcher?

Please copy command from the output window and try to run it in command line.

1

Yes! Thanks! Seems, PuntoSwitcher - is the problem. 

1) If I unload PuntoSwitcher, IDEA works ok, all right.

2) I have already tried to start java.exe+parameters. It works correctlly in cmd or in the terminal IDEA with or without PuntoSwitcher.

3) If I run idea.bat as administrator, or idea64.exe as adminidtrator, too IDEA works ok, all right. With or without PuntoSwitcher.

Only start IDEA as user + PuntoSwitcher in memory, I have this exit code after Run: 0xC0000005 (in main, tests, or any other code) after 2-4 secons.

In principle, this is enough to work further, but on another computer, such a problem does not occur, all other things being equal. I would like to understand the reasons.

Thanks anyway.

0

It depends on PuntoSwitcher version. Seems latest update doesn't cause crashes.

1

Please sign in to leave a comment.