Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 311938 - IndexOutOfBoundsExceptions in verbose writer
Summary: IndexOutOfBoundsExceptions in verbose writer
Status: CLOSED WONTFIX
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Debug (show other bugs)
Version: 3.6   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: JDT-Debug-Inbox CLA
QA Contact:
URL:
Whiteboard: stalebug
Keywords:
Depends on:
Blocks:
 
Reported: 2010-05-06 13:19 EDT by Natasha D'Silva CLA
Modified: 2019-10-02 19:39 EDT (History)
1 user (show)

See Also:


Attachments
target workspace log. (6.75 KB, application/octet-stream)
2010-05-06 13:20 EDT, Natasha D'Silva CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Natasha D'Silva CLA 2010-05-06 13:19:14 EDT
Build Identifier: Build id: I20100429-1549

In a plain Eclipse, one generic plugin that depends on the jdt debug plugins, I launch another workbench.  I enable vm tracing by modifying the appropriate variables in VirtualMachineManagerImpl. Eventually I start to get several exceptions:


!ENTRY org.eclipse.core.jobs 4 2 2010-05-06 12:08:44.125
!MESSAGE An internal error occurred during: "JDI Event Dispatch".
!STACK 0
java.lang.IndexOutOfBoundsException: Index: 9, Size: 11
	at java.util.ArrayList.get(ArrayList.java:343)
	at org.eclipse.jdi.internal.VerboseWriter.print(VerboseWriter.java:490)
	at org.eclipse.jdi.internal.VerboseWriter.printWidth(VerboseWriter.java:227)
	at org.eclipse.jdi.internal.VerboseWriter.printDescription(VerboseWriter.java:236)
	at org.eclipse.jdi.internal.VerboseWriter.println(VerboseWriter.java:134)
	at org.eclipse.jdi.internal.MirrorImpl.requestVM(MirrorImpl.java:180)
	at org.eclipse.jdi.internal.MirrorImpl.requestVM(MirrorImpl.java:192)
	at org.eclipse.jdi.internal.MirrorImpl.requestVM(MirrorImpl.java:222)
	at org.eclipse.jdi.internal.ReferenceTypeImpl.interfaces(ReferenceTypeImpl.java:600)
	at org.eclipse.jdi.internal.ReferenceTypeImpl.visibleFields(ReferenceTypeImpl.java:665)
	at org.eclipse.jdi.internal.ReferenceTypeImpl.fieldByName(ReferenceTypeImpl.java:816)
	at org.eclipse.jdt.internal.debug.core.model.JDIThread.determineIfDaemonThread(JDIThread.java:480)
	at org.eclipse.jdt.internal.debug.core.model.JDIThread.initialize(JDIThread.java:295)
	at org.eclipse.jdt.internal.debug.core.model.JDIThread.<init>(JDIThread.java:261)
	at org.eclipse.jdt.internal.debug.core.model.JDIDebugTarget.newThread(JDIDebugTarget.java:525)
	at org.eclipse.jdt.internal.debug.core.model.JDIDebugTarget.createThread(JDIDebugTarget.java:502)..
	

I've seen this affect expressions and variables. The variables view will no longer contain any variables and it's title remains italicized as if it were still updating. I have to close the view and restart my debug session before I can use the view again.



Reproducible: Sometimes
Comment 1 Natasha D'Silva CLA 2010-05-06 13:20:48 EDT
Created attachment 167346 [details]
target workspace log.
Comment 2 Natasha D'Silva CLA 2010-05-17 12:01:19 EDT
Any comments on this bug, or information you would like gathered? It is problematic as it means I cannot relibably generate trace while using the debugger.
Comment 3 Darin Wright CLA 2010-05-17 12:07:48 EDT
If you can easily replicate the problem, perhaps you could debug and attach a patch?
Comment 4 Natasha D'Silva CLA 2010-09-23 10:41:50 EDT
I have tried fixing this problem by synchronizing the fLineBuffer in the VerboseWriter to use a Vector so that list modifications are synchronized, but that has not helped the problem, I still run into this issue. I think the underlying problem is that, only some of the updates to fPosition are synchronized.  These are pervasive enough in the code - I don't really understand the logic well enough to try to synchronize these accesses.
Comment 5 Eclipse Genie CLA 2019-10-02 19:39:48 EDT
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.

If you have further information on the current state of the bug, please add it. 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.