I am working on Java project in Eclipse. I can start application (Run As ) and i works fine, but I cannot start Debug As ( I could start Debug As but suddenly I cannot anymore ). Does anybody have experience with this weird stuff ?
@dimitrisil in debug console
MainWindow (1) [Java Application]
com.euroicc.histo.view.MainWindow at localhost:4325
Thread [AWT-Shutdown] (Running)
Daemon Thread [AWT-Windows] (Running)
Thread [AWT-EventQueue-0] (Suspended (exception NumberFormatException))
Integer.parseInt(String, int) line: not available
Integer.<init>(String) line: not available
InetAddressCachePolicy.<clinit>() line: not available
InetAddress$Cache.getPolicy() line: not available
InetAddress$Cache.put(String, Object) line: not available
InetAddress.cacheInitIfNeeded() line: not available
InetAddress.cacheAddress(String, Object, boolean) line: not available
InetAddress.getAddressFromNameService(String, InetAddress) line: not available
InetAddress.getLocalHost() line: not available
SeedGenerator$1.run() line: not available
AccessController.doPrivileged(PrivilegedAction<T>) line: not available [native method]
SeedGenerator.getSystemEntropy() line: not available
SecureRandom.engineNextBytes(byte[]) line: not available
SecureRandom.nextBytes(byte[]) line: not available
SecureRandom.next(int) line: not available
SecureRandom(Random).nextLong() line: not available
File.generateFile(String, String, File) line: not available
File.createTempFile(String, String, File) line: not available
FileCacheImageInputStream.<init>(InputStream, File) line: not available
InputStreamImageInputStreamSpi.createInputStreamInstance(Object, boolean, File) line: not available
ImageIO.createImageInputStream(Object) line: not available
ImageIO.read(URL) line: not available
BrushedMetalDecorationPainter.<init>() line: 69
BusinessBlackSteelSkin.<init>() line: 135
SubstanceBusinessBlackSteelLookAndFeel.<init>() line: 54
MainWindow$7.run() line: 238
InvocationEvent.dispatch() line: not available
EventQueue.dispatchEvent(AWTEvent) line: not available
EventDispatchThread.pumpOneEventForFilters(int) line: not available
EventDispatchThread.pumpEventsForFilter(int, Conditional, EventFilter) line: not available
EventDispatchThread.pumpEventsForHierarchy(int, Conditional, Component) line: not available
EventDispatchThread.pumpEvents(int, Conditional) line: not available
EventDispatchThread.pumpEvents(Conditional) line: not available
EventDispatchThread.run() line: not available
Thread [DestroyJavaVM] (Running)
C:\Program Files\Java\jre1.6.0_17\bin\javaw.exe (17.12.2010. 15.00.45)
MainWindow (1) [Java Application]
com.euroicc.histo.view.MainWindow at localhost:4363
Thread [AWT-Shutdown] (Running)
Daemon Thread [AWT-Windows] (Running)
Thread [AWT-EventQueue-0] (Suspended (exception NumberFormatException))
Integer.parseInt(String, int) line: not available
Integer.<init>(String) line: not available
InetAddressCachePolicy.<clinit>() line: not available
InetAddress$Cache.getPolicy() line: not available
InetAddress$Cache.put(String, Object) line: not available
InetAddress.cacheInitIfNeeded() line: not available
InetAddress.cacheAddress(String, Object, boolean) line: not available
InetAddress.getAddressFromNameService(String, InetAddress) line: not available
InetAddress.getLocalHost() line: not available
SeedGenerator$1.run() line: not available
AccessController.doPrivileged(PrivilegedAction<T>) line: not available [native method]
SeedGenerator.getSystemEntropy() line: not available
SecureRandom.engineNextBytes(byte[]) line: not available
SecureRandom.nextBytes(byte[]) line: not available
SecureRandom.next(int) line: not available
SecureRandom(Random).nextLong() line: not available
File.generateFile(String, String, File) line: not available
File.createTempFile(String, String, File) line: not available
FileCacheImageInputStream.<init>(InputStream, File) line: not available
InputStreamImageInputStreamSpi.createInputStreamInstance(Object, boolean, File) line: not available
ImageIO.createImageInputStream(Object) line: not available
ImageIO.read(URL) line: not available
BrushedMetalDecorationPainter.<init>() line: 69
BusinessBlackSteelSkin.<init>() line: 135
SubstanceBusinessBlackSteelLookAndFeel.<init>() line: 54
MainWindow$7.run() line: 238
InvocationEvent.dispatch() line: not available
EventQueue.dispatchEvent(AWTEvent) line: not available
EventDispatchThread.pumpOneEventForFilters(int) line: not available
EventDispatchThread.pumpEventsForFilter(int, Conditional, EventFilter) line: not available
EventDispatchThread.pumpEventsForHierarchy(int, Conditional, Component) line: not available
EventDispatchThread.pumpEvents(int, Conditional) line: not available
EventDispatchThread.pumpEvents(Conditional) line: not available
EventDispatchThread.run() line: not available
Thread [DestroyJavaVM] (Running)
C:\Program Files\Java\jre1.6.0_17\bin\javaw.exe (17.12.2010. 15.01.06)
MainWindow (1) [Java Application]
com.euroicc.histo.view.MainWindow at localhost:4369
Thread [AWT-Shutdown] (Running)
Daemon Thread [AWT-Windows] (Running)
Thread [AWT-EventQueue-0] (Suspended (exception NumberFormatException))
Integer.parseInt(String, int) line: not available
Integer.<init>(String) line: not available
InetAddressCachePolicy.<clinit>() line: not available
InetAddress$Cache.getPolicy() line: not available
InetAddress$Cache.put(String, Object) line: not available
InetAddress.cacheInitIfNeeded() line: not available
InetAddress.cacheAddress(String, Object, boolean) line: not available
InetAddress.getAddressFromNameService(String, InetAddress) line: not available
InetAddress.getLocalHost() line: not available
SeedGenerator$1.run() line: not available
AccessController.doPrivileged(PrivilegedAction<T>) line: not available [native method]
SeedGenerator.getSystemEntropy() line: not available
SecureRandom.engineNextBytes(byte[]) line: not available
SecureRandom.nextBytes(byte[]) line: not available
SecureRandom.next(int) line: not available
SecureRandom(Random).nextLong() line: not available
File.generateFile(String, String, File) line: not available
File.createTempFile(String, String, File) line: not available
FileCacheImageInputStream.<init>(InputStream, File) line: not available
InputStreamImageInputStreamSpi.createInputStreamInstance(Object, boolean, File) line: not available
ImageIO.createImageInputStream(Object) line: not available
ImageIO.read(URL) line: not available
BrushedMetalDecorationPainter.<init>() line: 69
BusinessBlackSteelSkin.<init>() line: 135
SubstanceBusinessBlackSteelLookAndFeel.<init>() line: 54
MainWindow$7.run() line: 238
InvocationEvent.dispatch() line: not available
EventQueue.dispatchEvent(AWTEvent) line: not available
EventDispatchThread.pumpOneEventForFilters(int) line: not available
EventDispatchThread.pumpEventsForFilter(int, Conditional, EventFilter) line: not available
EventDispatchThread.pumpEventsForHier开发者_如何学JAVAarchy(int, Conditional, Component) line: not available
EventDispatchThread.pumpEvents(int, Conditional) line: not available
EventDispatchThread.pumpEvents(Conditional) line: not available
EventDispatchThread.run() line: not available
Thread [DestroyJavaVM] (Running)
C:\Program Files\Java\jre1.6.0_17\bin\javaw.exe (17.12.2010. 15.01.30)
MainWindow (1) [Java Application]
com.euroicc.histo.view.MainWindow at localhost:4383
Thread [AWT-Shutdown] (Running)
Daemon Thread [AWT-Windows] (Running)
Thread [AWT-EventQueue-0] (Suspended (exception NumberFormatException))
Integer.parseInt(String, int) line: not available
Integer.<init>(String) line: not available
InetAddressCachePolicy.<clinit>() line: not available
InetAddress$Cache.getPolicy() line: not available
InetAddress$Cache.put(String, Object) line: not available
InetAddress.cacheInitIfNeeded() line: not available
InetAddress.cacheAddress(String, Object, boolean) line: not available
InetAddress.getAddressFromNameService(String, InetAddress) line: not available
InetAddress.getLocalHost() line: not available
SeedGenerator$1.run() line: not available
AccessController.doPrivileged(PrivilegedAction<T>) line: not available [native method]
SeedGenerator.getSystemEntropy() line: not available
SecureRandom.engineNextBytes(byte[]) line: not available
SecureRandom.nextBytes(byte[]) line: not available
SecureRandom.next(int) line: not available
SecureRandom(Random).nextLong() line: not available
File.generateFile(String, String, File) line: not available
File.createTempFile(String, String, File) line: not available
FileCacheImageInputStream.<init>(InputStream, File) line: not available
InputStreamImageInputStreamSpi.createInputStreamInstance(Object, boolean, File) line: not available
ImageIO.createImageInputStream(Object) line: not available
ImageIO.read(URL) line: not available
BrushedMetalDecorationPainter.<init>() line: 69
BusinessBlackSteelSkin.<init>() line: 135
SubstanceBusinessBlackSteelLookAndFeel.<init>() line: 54
MainWindow$7.run() line: 238
InvocationEvent.dispatch() line: not available
EventQueue.dispatchEvent(AWTEvent) line: not available
EventDispatchThread.pumpOneEventForFilters(int) line: not available
EventDispatchThread.pumpEventsForFilter(int, Conditional, EventFilter) line: not available
EventDispatchThread.pumpEventsForHierarchy(int, Conditional, Component) line: not available
EventDispatchThread.pumpEvents(int, Conditional) line: not available
EventDispatchThread.pumpEvents(Conditional) line: not available
EventDispatchThread.run() line: not available
Thread [DestroyJavaVM] (Running)
C:\Program Files\Java\jre1.6.0_17\bin\javaw.exe (17.12.2010. 15.05.23)
MainWindow (1) [Java Application]
com.euroicc.histo.view.MainWindow at localhost:2740
Thread [AWT-Shutdown] (Running)
Daemon Thread [AWT-Windows] (Running)
Thread [AWT-EventQueue-0] (Suspended (exception NumberFormatException))
Integer.parseInt(String, int) line: not available
Integer.<init>(String) line: not available
InetAddressCachePolicy.<clinit>() line: not available
InetAddress$Cache.getPolicy() line: not available
InetAddress$Cache.put(String, Object) line: not available
InetAddress.cacheInitIfNeeded() line: not available
InetAddress.cacheAddress(String, Object, boolean) line: not available
InetAddress.getAddressFromNameService(String, InetAddress) line: not available
InetAddress.getLocalHost() line: not available
SeedGenerator$1.run() line: not available
AccessController.doPrivileged(PrivilegedAction<T>) line: not available [native method]
SeedGenerator.getSystemEntropy() line: not available
SecureRandom.engineNextBytes(byte[]) line: not available
SecureRandom.nextBytes(byte[]) line: not available
SecureRandom.next(int) line: not available
SecureRandom(Random).nextLong() line: not available
File.generateFile(String, String, File) line: not available
File.createTempFile(String, String, File) line: not available
FileCacheImageInputStream.<init>(InputStream, File) line: not available
InputStreamImageInputStreamSpi.createInputStreamInstance(Object, boolean, File) line: not available
ImageIO.createImageInputStream(Object) line: not available
ImageIO.read(URL) line: not available
BrushedMetalDecorationPainter.<init>() line: 69
BusinessBlackSteelSkin.<init>() line: 135
SubstanceBusinessBlackSteelLookAndFeel.<init>() line: 54
MainWindow$7.run() line: 238
InvocationEvent.dispatch() line: not available
EventQueue.dispatchEvent(AWTEvent) line: not available
EventDispatchThread.pumpOneEventForFilters(int) line: not available
EventDispatchThread.pumpEventsForFilter(int, Conditional, EventFilter) line: not available
EventDispatchThread.pumpEventsForHierarchy(int, Conditional, Component) line: not available
EventDispatchThread.pumpEvents(int, Conditional) line: not available
EventDispatchThread.pumpEvents(Conditional) line: not available
EventDispatchThread.run() line: not available
Thread [DestroyJavaVM] (Running)
C:\Program Files\Java\jre1.6.0_17\bin\javaw.exe (17.12.2010. 16.17.11)
MainWindow (1) [Java Application]
com.euroicc.histo.view.MainWindow at localhost:2926
Thread [AWT-Shutdown] (Running)
Daemon Thread [AWT-Windows] (Running)
Thread [DestroyJavaVM] (Running)
Thread [AWT-EventQueue-0] (Suspended (exception NumberFormatException))
Integer.parseInt(String, int) line: not available
Integer.<init>(String) line: not available
InetAddressCachePolicy.<clinit>() line: not available
InetAddress$Cache.getPolicy() line: not available
InetAddress$Cache.put(String, Object) line: not available
InetAddress.cacheInitIfNeeded() line: not available
InetAddress.cacheAddress(String, Object, boolean) line: not available
InetAddress.getAddressFromNameService(String, InetAddress) line: not available
InetAddress.getLocalHost() line: not available
SeedGenerator$1.run() line: not available
AccessController.doPrivileged(PrivilegedAction<T>) line: not available [native method]
SeedGenerator.getSystemEntropy() line: not available
SecureRandom.engineNextBytes(byte[]) line: not available
SecureRandom.nextBytes(byte[]) line: not available
SecureRandom.next(int) line: not available
SecureRandom(Random).nextLong() line: not available
File.generateFile(String, String, File) line: not available
File.createTempFile(String, String, File) line: not available
FileCacheImageInputStream.<init>(InputStream, File) line: not available
InputStreamImageInputStreamSpi.createInputStreamInstance(Object, boolean, File) line: not available
ImageIO.createImageInputStream(Object) line: not available
ImageIO.read(URL) line: not available
BrushedMetalDecorationPainter.<init>() line: 69
BusinessBlackSteelSkin.<init>() line: 135
SubstanceBusinessBlackSteelLookAndFeel.<init>() line: 54
MainWindow$7.run() line: 238
InvocationEvent.dispatch() line: not available
EventQueue.dispatchEvent(AWTEvent) line: not available
EventDispatchThread.pumpOneEventForFilters(int) line: not available
EventDispatchThread.pumpEventsForFilter(int, Conditional, EventFilter) line: not available
EventDispatchThread.pumpEventsForHierarchy(int, Conditional, Component) line: not available
EventDispatchThread.pumpEvents(int, Conditional) line: not available
EventDispatchThread.pumpEvents(Conditional) line: not available
EventDispatchThread.run() line: not available
C:\Program Files\Java\jre1.6.0_17\bin\javaw.exe (17.12.2010. 16.37.37)
I have seen those two menus become separately confused about their target. For example, for an Ant buildfile, one will continue to be titled "Run As>Ant Build" and the other will be titled something else, and fail.
Restarting Eclipse has always solved the problem.
Based on the (poorly formatted) answer that really ought to be part of the question, it looks like you might have a malformed socket address.
The NumberFormatException is repeated over and over again, in regards to INetAddress.getLocalhost...
Ah! Do you have IPv4 or IPv6? If a v4 (decimal) interpreter tried to parse a v6 (hex) address, things could get mangled.
It could also be that your debug socket number isn't a number (at least not a decimal one)... but I don't see anywhere in the UI to adjust this so I don't see how you could have broken it.
Just for the case someone will get to the same problem in future. Recently I was fooled by the same use-case (however in NetBeans) - the problem was caused by the breakpoint on java.lang.IllegalArgumentException I've created some time ago and forgot about it, so IDE was stopping all the time somewhere in the Java core code just because of that breakpoint, but I was thinking it was caused by something in my code or run-time environment :(
Actually, I would say that this problem is in general coding style in core Java libraries. There are to many places where exceptions are thrown in the cases where if() condition would be more appropriate and this causes major problem in debugging of Exceptions - there are just too many of them. In that particular case problem it is caused by the following lines (I took sources of InetAddressCachePolicy from here http://download.java.net/openjdk/jdk6/):
try {
tmp = new Integer(
java.security.AccessController.doPrivileged (
new PrivilegedAction<String>() {
public String run() {
return Security.getProperty(cachePolicyProp);
}
}));
} catch (NumberFormatException e) {
// ignore
}
You may notice that someone who wrote the code was aware about potential 'not-a-number' String provided in configuration, but did not try to handle more elegantly at least cases of String is null or empty, which is actually the case for that problem.
There is relevant discussion about Integer.parseInt() here - Java: Good way to encapsulate Integer.parseInt()
精彩评论