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 269959 - selecting expression for debugger tooltip cause program core dump when step out from method
Summary: selecting expression for debugger tooltip cause program core dump when step o...
Status: RESOLVED FIXED
Alias: None
Product: cnd
Classification: Unclassified
Component: Debugger (show other bugs)
Version: Dev
Hardware: All All
: P1 normal (vote)
Assignee: Maria Tishkova
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-03-01 16:01 UTC by Vladimir Voskresensky
Modified: 2017-04-13 10:43 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
suggested_fix (3.26 KB, patch)
2017-03-02 12:05 UTC, Maria Tishkova
Details | Diff
proposed fix (-var-delete invoked for closed pinned tooltip) (5.63 KB, patch)
2017-03-02 13:47 UTC, Maria Tishkova
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Vladimir Voskresensky 2017-03-01 16:01:17 UTC
Somewhere deep in call stack I selected "var.getWidth()" in editor to see it's value in tooltip. Let's say result was "64".
I haven't pinned tooltip, but step out from method => SIGABRT signal was sent and app crashed with core file.
Log was sent privately.
Comment 1 Maria Tishkova 2017-03-02 12:04:30 UTC
suggested fix is attached. Please evaluate if it works for you
Comment 2 Maria Tishkova 2017-03-02 12:05:17 UTC
Created attachment 163746 [details]
suggested_fix

please evaluate and let me know if the problem is gone
Comment 3 Vladimir Voskresensky 2017-03-02 12:46:02 UTC
Interesting effect:
Tooltip doesn't show value if selected expression has function call (fun_call) in which I have breakpoint
Displayed like: fun_call(val)=
I tried multiple times...
After that the next step stopped me multiple times in fun_call.
Looks like we hit breakpoints when evaluate expression
Comment 4 Vladimir Voskresensky 2017-03-02 12:47:05 UTC
when I removed breakpoint from inside fun_call
Displayed like: fun_call(val)=1234
Comment 5 soldatov 2017-03-02 12:51:43 UTC
I recommend to see CR 19720112 too.
Comment 6 Maria Tishkova 2017-03-02 13:00:35 UTC
Vladimir, please attach gdb log.
When you are talking about function expression evaluation do you mean that it worked before this patch?
And we do not hit breakpoint by intention when evaluate function evaluation maybe GDB does?
Comment 7 Maria Tishkova 2017-03-02 13:03:06 UTC
(In reply to soldatov from comment #5)
> I recommend to see CR 19720112 too.

Valera,
What you refer to is dbx bug. The problems the bug is filed is in GDB
Comment 8 Maria Tishkova 2017-03-02 13:04:54 UTC
(In reply to Vladimir Voskresensky from comment #4)
> when I removed breakpoint from inside fun_call
> Displayed like: fun_call(val)=1234

Vova,

what about the problem this bug was filed about. Core dump and slow down.
Have you checked if the patch helps.

==Masha
Comment 9 Vladimir Voskresensky 2017-03-02 13:46:43 UTC
(In reply to Maria Tishkova from comment #8)
> (In reply to Vladimir Voskresensky from comment #4)
> > when I removed breakpoint from inside fun_call
> > Displayed like: fun_call(val)=1234
> 
> Vova,
> 
> what about the problem this bug was filed about. Core dump and slow down.
> Have you checked if the patch helps.
> 
> ==Masha

Evaluating...
Comment 10 Maria Tishkova 2017-03-02 13:47:26 UTC
Created attachment 163747 [details]
proposed fix (-var-delete invoked for closed pinned tooltip)
Comment 11 Vladimir Voskresensky 2017-03-02 13:48:26 UTC
(In reply to Maria Tishkova from comment #6)
> Vladimir, please attach gdb log.
> When you are talking about function expression evaluation do you mean that
> it worked before this patch?
Probably not related to the patch.

> And we do not hit breakpoint by intention when evaluate function evaluation
> maybe GDB does?
I don't know. I will file a separate bug with a log
Comment 12 Vladimir Voskresensky 2017-03-02 13:54:38 UTC
(In reply to Maria Tishkova from comment #10)
> Created attachment 163747 [details]
> proposed fix (-var-delete invoked for closed pinned tooltip)
I hope System.out.println is not required :-)
Comment 13 soldatov 2017-03-02 13:55:12 UTC
> What you refer to is dbx bug. The problems the bug is filed is in GDB
It is not a DBX bug. Function call is very dangerous operation if we speak about native languages (C, C++ and other). Therefore IDE returns address only. If user calls function or method He/She understand risk, debugger can fails in any moment.
Comment 14 Vladimir Voskresensky 2017-03-02 14:02:19 UTC
(In reply to Vladimir Voskresensky from comment #11)
> (In reply to Maria Tishkova from comment #6)
> > Vladimir, please attach gdb log.
> > When you are talking about function expression evaluation do you mean that
> > it worked before this patch?
> Probably not related to the patch.
> 
> > And we do not hit breakpoint by intention when evaluate function evaluation
> > maybe GDB does?
> I don't know. I will file a separate bug with a log
https://netbeans.org/bugzilla/show_bug.cgi?id=269968
Comment 15 Vladimir Voskresensky 2017-03-02 14:04:56 UTC
(In reply to soldatov from comment #13)
> > What you refer to is dbx bug. The problems the bug is filed is in GDB
> It is not a DBX bug. Function call is very dangerous operation if we speak
> about native languages (C, C++ and other). Therefore IDE returns address
> only. If user calls function or method He/She understand risk, debugger can
> fails in any moment.
As a user I find it very useful that instead of step-into I can evaluate expression in tooltip. Yes, I understand the risk, but I known better when I call const-methods.
Simple Usecase:
  // Either in a function body compound statement, or a function-try-block.
  switch (CheckFallThrough(AC)) {
    case UnknownFallThrough:
      break;
    case ...
      ....
      break;
    case ...
      ....
      break;
Comment 16 Maria Tishkova 2017-03-05 18:43:54 UTC
fixed in enum/release82 - should be transplanted into the trunk and releases(release82)

changeset:   314364:1df91d650025
branch:      release82
user:        Maria Dalmatova <mromashova@netbeans.org>
date:        Sun Mar 05 21:01:52 2017 +0300
summary:     fixed bz#269959 - selecting expression for debugger tooltip cause program core dump when step out from method
Comment 17 Quality Engineering 2017-03-07 02:47:55 UTC
Integrated into 'main-silver', will be available in build *201703070002* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/71d47fcf768e
User: Maria Dalmatova <mromashova@netbeans.org>
Log: fixed bz#269959 - selecting expression for debugger tooltip cause program core dump when step out from method
(transplanted from 1df91d650025751971cadc4aa88f5dd8ae4d5378)
Comment 18 ilia 2017-04-13 10:43:40 UTC
https://netbeans.org/bugzilla/show_bug.cgi?id=269959 Changesets:
    http://hg.netbeans.org/releases/rev/1df91d650025 # fixed bz#269959 - selecting expression for debugger tooltip cause program core dump when step out from method