This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 115728

Summary: Debugger hangs if code contains a class without members
Product: cnd Reporter: Alexander Pepin <apepin>
Component: DebuggerAssignee: _ gordonp <gordonp>
Status: VERIFIED FIXED    
Severity: blocker    
Priority: P1    
Version: 6.x   
Hardware: All   
OS: All   
Issue Type: DEFECT Exception Reporter:

Description Alexander Pepin 2007-09-17 16:53:12 UTC
Steps to reproduce:
- create Welcome sample projecr
- modify source code by adding a class with a multiple inheritance:
class A{
    int a;
};
class B{
    int b;
};
class C : public A, 
        public B{
    
};
- create an instance of the class "C" in the main method like this:
C c;
-do step into, it stops in main()
-do step over
Result: Exception appears:
java.lang.StringIndexOutOfBoundsException: String index out of range: -1
	at java.lang.String.substring(String.java:1938)
	at org.netbeans.modules.cnd.debugger.gdb.GdbDebugger.getCSUFieldMap(GdbDebugger.java:728)
	at org.netbeans.modules.cnd.debugger.gdb.GdbDebugger.resultRecord(GdbDebugger.java:472)
	at org.netbeans.modules.cnd.debugger.gdb.proxy.GdbProxyEngine.processMessage(GdbProxyEngine.java:192)
	at org.netbeans.modules.cnd.debugger.gdb.proxy.GdbProxyEngine.access$000(GdbProxyEngine.java:49)
	at org.netbeans.modules.cnd.debugger.gdb.proxy.GdbProxyEngine$1.run(GdbProxyEngine.java:116)
	at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:539)
[catch] at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:964)

If a user closes the exception window then does "Step Over" debugger gets unknown state. Only Stop and Pause buttons are
still active (Pause does not work). The debugging process can not be continued.
Comment 1 _ gordonp 2007-09-18 23:12:00 UTC
Fixed
Comment 2 Alexander Pepin 2007-09-19 14:51:44 UTC
Verified in nightly build 20070919