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 250774

Summary: Debugger tries to evaluate wrong expression
Product: cnd Reporter: VIP_Andrey
Component: DebuggerAssignee: henk89
Status: RESOLVED WONTFIX    
Severity: normal    
Priority: P2    
Version: 8.0.2   
Hardware: PC   
OS: Windows 7 x64   
Issue Type: DEFECT Exception Reporter:

Description VIP_Andrey 2015-02-27 16:57:35 UTC
When you have simple console application, run without parameters, and if you add to debugger variable like strlen(argv[5]) (your argc == 1) - Segmentation fault
Comment 1 Martin Entlicher 2015-02-27 17:03:59 UTC
IMHO this can be expected. It's impossible to find in advance if the evaluated expression will crash your program or not.
Comment 2 VIP_Andrey 2015-02-27 17:17:51 UTC
Yesterday I spend about 2 hours for figuring out what's wrong with the simple program - my example is my simplified situation. In my specific case this value exist until some time and after this period I don't worry about this evaluation - I still need this expression for future. And I have error on line like
if (_pointer == NULL)

It's not expected. IMHO.
Comment 3 henk89 2015-03-02 13:55:25 UTC
I've just tried your scenario in GDB (w/o NetBeans).
If you try evaluating an incorrect expression it behaves the same way.

There is an option to make GDB return the previous state in case it receives a signal. Type "set unwindonsignal on" in the Debugger console after starting a debugging session.