kashiwazakinenji / chromedevtools

Automatically exported from code.google.com/p/chromedevtools
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

Debugger breaks if there are no stack frames in the exception #23

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Somewhere in our web application (I will provide more information when I 
have it) we have a syntax error. This causes uncaught JS exception 
("Uncaught SyntaxError: Unexpected token"). The debug context does not have 
any frames so Chromium Developer Tools fail with exception:
Mar 2, 2010 11:10:16 AM 
org.chromium.sdk.internal.tools.v8.V8CommandProcessor
processIncomingJson
SEVERE: Failed to dispatch response to callback
java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
    at java.util.ArrayList.RangeCheck(ArrayList.java:546)
    at java.util.ArrayList.get(ArrayList.java:321)
    at java.util.Collections$UnmodifiableList.get(Collections.java:1155)
    at
org.chromium.debug.core.model.DebugTargetImpl.logExceptionFromContext(Debug
TargetImpl.java:417)
    at
org.chromium.debug.core.model.DebugTargetImpl.access$6(DebugTargetImpl.java
:415)
    at
org.chromium.debug.core.model.DebugTargetImpl$DebugEventListenerImpl.suspen
ded(DebugTargetImpl.java:399)
    at
org.chromium.sdk.internal.tools.v8.processor.BacktraceProcessor$1.success(B
acktraceProcessor.java:63)
    at
org.chromium.sdk.internal.DebugSession$ScriptLoader.loadAllScripts(DebugSes
sion.java:191)
    at
org.chromium.sdk.internal.tools.v8.processor.BacktraceProcessor.messageRece
ived(BacktraceProcessor.java:67)
    at
org.chromium.sdk.internal.tools.v8.V8CommandProcessor$2.call(V8CommandProce
ssor.java:116)
    at
org.chromium.sdk.internal.tools.v8.V8CommandProcessor.callThemBack(V8Comman
dProcessor.java:157)
    at
org.chromium.sdk.internal.tools.v8.V8CommandProcessor.processIncomingJson(V
8CommandProcessor.java:120)
...

Attached is a patch that avoids the NPE.

Original issue reported on code.google.com by eostrouk...@gmail.com on 2 Mar 2010 at 9:31

Attachments:

GoogleCodeExporter commented 8 years ago
Note: it is not an NPE but IndexOutOfBoundsException

Original comment by eostrouk...@gmail.com on 2 Mar 2010 at 9:33

GoogleCodeExporter commented 8 years ago
This is HTML page that reproduces the problem easily. Connect debugger to it 
and click 
a link.

Original comment by eostrouk...@gmail.com on 2 Mar 2010 at 10:03

Attachments:

GoogleCodeExporter commented 8 years ago
Attached is an updated patch. It will also show the exception text on the 
thread label 
- as JDT does.

Original comment by eostrouk...@gmail.com on 2 Mar 2010 at 10:25

Attachments:

GoogleCodeExporter commented 8 years ago

Original comment by peter.ry...@gmail.com on 3 Mar 2010 at 11:43

GoogleCodeExporter commented 8 years ago
Fixed in HEAD r313

Original comment by peter.ry...@gmail.com on 7 Mar 2010 at 8:57