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 - Debugger tries to evaluate wrong expression
Summary: Debugger tries to evaluate wrong expression
Status: RESOLVED WONTFIX
Alias: None
Product: cnd
Classification: Unclassified
Component: Debugger (show other bugs)
Version: 8.0.2
Hardware: PC Windows 7 x64
: P2 normal (vote)
Assignee: henk89
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-02-27 16:57 UTC by VIP_Andrey
Modified: 2015-03-02 13:55 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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.