Eclipse Mars 2 jvm崩溃 [英] Eclipse Mars 2 jvm crash

查看:408
本文介绍了Eclipse Mars 2 jvm崩溃的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我不知道出了什么问题!我试图运行一个简单的套接字通信。我使用的是Eclipse Mars 2,顺便说一句,它会在调试模式下运行并且尝试运行Junit测试时退出。我不知道为什么!

 
#Java运行时环境检测到致命错误:$在pc = 0x739ac3e1,pid = 2144,tid = 0x0000182c

#JRE版本:Java(TM)SE运行时环境(8.0_111-b14)中的b $ b#
#EXCEPTION_ACCESS_VIOLATION(0xc0000005) )(build 1.8.0_111-b14)
#Java VM:Java HotSpot(TM)客户端虚拟机(25.111-b14混合模式,共享windows-x86)
#有问题的框架:
#C [chtbrkg.dll + 0x1c3e1]

#无法写入核心转储。默认情况下,客户端版本的Windows

#上没有启用Minidumps。具有更多信息的错误报告文件保存为:
#C:\Users\User.ASUS\Documents \eclipse\workspace\Sockets\hs_err_pid2144.log

#如果要提交错误报告,请访问:
#http://bugreport.java。 com / bugreport / crash.jsp
#崩溃发生在Java虚拟机的本机代码之外。
#查看有关哪里报告错误的问题框架。

我在服务器上收到上面的错误消息,还有一个java.util。客户端上的NoSuchElementException!当我尝试从服务器获取结果(temp = scanner2.nextInt();在Client.java中)



服务器类

  package main; 

import java.io.IOException;
import java.io.PrintStream;
import java.net.ServerSocket;
import java.net.Socket;
import java.util.Scanner;

public class Server {

public static void main(String [] args)throws IOException {
ServerSocket serverSocket = new ServerSocket(1234);
System.out.println(等待客户端...);
Socket socket = serverSocket.accept();
System.out.println(Client connected);
扫描仪扫描仪=新的扫描仪(socket.getInputStream());
int number = scanner.nextInt();
int temp = number * 2;
PrintStream printStream = new PrintStream(socket.getOutputStream());
printStream.println(temp);
}

}

客户端类

  package main; 

import java.io.IOException;
import java.io.PrintStream;
import java.net.Socket;
import java.net.UnknownHostException;
import java.util.Scanner;

public class Client {

public static void main(String [] args)throws UnknownHostException,IOException {
int number,temp = 0;
扫描仪扫描仪=新扫描仪(System.in); //从用户
读取输入Socket socket = new Socket(127.0.0.1,1234);
扫描仪scanner2 =新的扫描仪(socket.getInputStream()); //用于接受服务器的结果
System.out.println(输入任意数字);
number = scanner.nextInt();
PrintStream printStream = new PrintStream(socket.getOutputStream());
printStream.println(number); //发送号码到服务器
temp = scanner2.nextInt();
System.out.println(temp);
}

}


解决方案

崩溃发生在不属于Java或Eclipse Mars或Windows的 chtbrkg.dll 库中。我真的不知道什么 chtbrkg.dll 是(googling建议它是AdSkip软件的一部分),但这显然是您的PC上的第三方软件的问题。


I can't figure out what went wrong ! I'm trying to run a simple sockets comunication. I'm using Eclipse Mars 2 and by the way, it cashes and quits in debug mode and when I try to run Junit tests ! I don't know why !

#
# A fatal error has been detected by the Java Runtime Environment:
#
#  EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x739ac3e1, pid=2144, tid=0x0000182c
#
# JRE version: Java(TM) SE Runtime Environment (8.0_111-b14) (build 1.8.0_111-b14)
# Java VM: Java HotSpot(TM) Client VM (25.111-b14 mixed mode, sharing windows-x86 )
# Problematic frame:
# C  [chtbrkg.dll+0x1c3e1]
#
# Failed to write core dump. Minidumps are not enabled by default on client versions of Windows
#
# An error report file with more information is saved as:
# C:\Users\User.ASUS\Documents\eclipse\workspace\Sockets\hs_err_pid2144.log
#
# If you would like to submit a bug report, please visit:
#   http://bugreport.java.com/bugreport/crash.jsp
# The crash happened outside the Java Virtual Machine in native code.
# See problematic frame for where to report the bug.
#

I get the error message above on the server, and a java.util.NoSuchElementException on the client ! precisely when I try to get the result from the server ( temp = scanner2.nextInt(); in Client.java )

Server class

package main;

import java.io.IOException;
import java.io.PrintStream;
import java.net.ServerSocket;
import java.net.Socket;
import java.util.Scanner;

public class Server {

public static void main(String[] args) throws IOException {
    ServerSocket serverSocket = new ServerSocket(1234);
    System.out.println("Waiting for the client...");
    Socket socket = serverSocket.accept();
    System.out.println("Client connected");
    Scanner scanner = new Scanner(socket.getInputStream());
    int number = scanner.nextInt();
    int temp = number * 2;
    PrintStream printStream = new PrintStream(socket.getOutputStream());
    printStream.println(temp);
}

}

Client class

package main;

import java.io.IOException;
import java.io.PrintStream;
import java.net.Socket;
import java.net.UnknownHostException;
import java.util.Scanner;

public class Client {

public static void main(String[] args) throws UnknownHostException, IOException {
    int number, temp = 0;
    Scanner scanner = new Scanner(System.in);   // to read input from user
    Socket socket = new Socket("127.0.0.1", 1234);
    Scanner scanner2 = new Scanner(socket.getInputStream());    // used to accept results from the server
    System.out.println("Enter any number");
    number = scanner.nextInt();
    PrintStream printStream = new PrintStream(socket.getOutputStream());
    printStream.println(number);    // send the number to the server
    temp = scanner2.nextInt();
    System.out.println(temp);
}

}

解决方案

The crash has happened inside chtbrkg.dll library, which does not belong to Java or Eclipse Mars or Windows. I don't really know what chtbrkg.dll is (googling suggests it is a part of AdSkip software), but this is apparently a problem of third party software on your PC.

这篇关于Eclipse Mars 2 jvm崩溃的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆