Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 313964

Summary: [vm] StackOverflowException in a toString() method in AbstractVMProvider.
Product: [Tools] CDT Reporter: Pawel Piech <pawel.1.piech>
Component: cdt-debug-dsfAssignee: Pawel Piech <pawel.1.piech>
Status: RESOLVED FIXED QA Contact: Pawel Piech <pawel.1.piech>
Severity: normal    
Priority: P3 CC: aleherb+eclipse, pawel.1.piech
Version: 7.0Flags: aleherb+eclipse: review+
Target Milestone: 7.0   
Hardware: PC   
OS: Linux   
Whiteboard:
Attachments:
Description Flags
Patch with fix. cdtdoug: iplog-

Description Pawel Piech CLA 2010-05-21 14:48:38 EDT
Created attachment 169545 [details]
Patch with fix.

While testing bug 313957, I came across a bug in a toString() method which lead to the debug view to stop updating.  The exception trace:

Caused by: java.lang.StackOverflowError
	at java.lang.StringBuffer.<init>(StringBuffer.java:120)
	at org.eclipse.debug.core.DebugEvent.toString(DebugEvent.java:383)
	at org.eclipse.cdt.dsf.ui.viewmodel.AbstractVMProvider$2.toString(AbstractVMProvider.java:390)
	at java.lang.String.valueOf(String.java:2838)
	at java.lang.StringBuilder.append(StringBuilder.java:132)
	at org.eclipse.cdt.dsf.ui.viewmodel.AbstractVMProvider$2.toString(AbstractVMProvider.java:390)
	at java.lang.String.valueOf(String.java:2838)
	at java.lang.StringBuilder.append(StringBuilder.java:132)
	at org.eclipse.cdt.dsf.ui.viewmodel.AbstractVMProvider$2.toString(AbstractVMProvider.java:390)
	at java.lang.String.valueOf(String.java:2838)
...
Comment 1 Pawel Piech CLA 2010-05-21 14:49:30 EDT
I committed the fix.  Toni please review when you get a chance.
Comment 2 Anton Leherbauer CLA 2010-05-27 06:50:51 EDT
+1 Nasty pitfall.
Comment 3 CDT Genie CLA 2010-07-28 15:29:24 EDT
*** cdt cvs genie on behalf of ppiech ***
Bug 313964 -  [vm] StackOverflowException in a toString() method in AbstractVMProvider.

[*] AbstractVMProvider.java 1.20 http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cdt/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/ui/viewmodel/AbstractVMProvider.java?root=Tools_Project&r1=1.19&r2=1.20