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 255983 - [mixeddev] java.util.MissingResourceException: No such bundle org.netbeans.modules.cnd.mixeddev.debugger.Bundle
Summary: [mixeddev] java.util.MissingResourceException: No such bundle org.netbeans.mo...
Status: VERIFIED FIXED
Alias: None
Product: cnd
Classification: Unclassified
Component: Mixed Development (show other bugs)
Version: 8.1
Hardware: All All
: P1 normal (vote)
Assignee: Vladimir Kvashin
URL:
Keywords: 81_HR_FIX
Depends on:
Blocks:
 
Reported: 2015-10-17 11:51 UTC by Chiana
Modified: 2015-10-22 15:17 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter: 220596


Attachments
stacktrace (1.43 KB, text/plain)
2015-10-17 11:51 UTC, Chiana
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Chiana 2015-10-17 11:51:39 UTC
Build: NetBeans IDE Dev (Build 201510160002)
VM: Java HotSpot(TM) 64-Bit Server VM, 24.45-b08, Java(TM) SE Runtime Environment, 1.7.0_45-b18
OS: Windows 8

User Comments:
Chiana: Was trying to step over a "Thread.sleep(200)" statement

Chiana: Was debugging an RS232 application




Stacktrace: 
java.util.MissingResourceException: No such bundle org.netbeans.modules.cnd.mixeddev.debugger.Bundle
   at org.openide.util.NbBundle.getBundle(NbBundle.java:451)
   at org.openide.util.NbBundle.getBundle(NbBundle.java:399)
   at org.openide.util.NbBundle.getMessage(NbBundle.java:642)
   at org.netbeans.modules.cnd.mixeddev.debugger.CndSessionChanger.changeSuggested(CndSessionChanger.java:88)
   at org.netbeans.api.debugger.SessionBridge.suggestChange(SessionBridge.java:129)
   at org.netbeans.modules.debugger.jpda.actions.RunIntoMethodActionSupport.traceLineForMethod(RunIntoMethodActionSupport.java:480)
Comment 1 Chiana 2015-10-17 11:51:41 UTC
Created attachment 156766 [details]
stacktrace
Comment 2 Chiana 2015-10-17 11:58:13 UTC
Also this makes IDE occationally to hang completley and must be killed with taskmanager.
Comment 3 soldatov 2015-10-17 15:43:55 UTC
Easy to reproduce.
Comment 4 Vladimir Kvashin 2015-10-19 08:46:17 UTC
In CndSessionChanger.java:88
there is a call to NbBundle.getMessage(this.getClass(),...)
but there is no resource bundle in the package.
So the fix should be quite primitive and safe.
Comment 5 soldatov 2015-10-19 08:50:06 UTC
Exactly this exception should be fixed. If user installed full IDE and code contains Thread.sleep(200), then MissingResourceException appears.
Comment 6 Vladimir Kvashin 2015-10-19 08:59:42 UTC
Kent, thank you very much for filing this!

As to IDE hangup: can you reproduce this? 
Could you do this and get full thread dump? (To do this, you can use jps command to get java process pid and jsctack command to get full thread dump). If you succeed, could you please file a separate bug and attach thread dump to it?

Thank you!
Vladimir
Comment 7 Vladimir Kvashin 2015-10-19 09:08:43 UTC
(In reply to soldatov from comment #3)
> Easy to reproduce.
I have some doubts that it happens when stepping *over*.
My understanding is that it happens when trying to step *into*.
(The filer could just make a mistake and, e.g. probably pressed F7 while intended to press F8).

This bug should be fixed in any case, but if CndSessionChanger is called for each stepping *over* a native call and invoke a ps each time - this is dangerous and can slow down debugging very much. So in this case we should file a separate bug and fix it.

I checked this (although in trunk, not release81) on my Ubuntu and in debugger and I see that we don't get into CndSessionChanger when stepping *over*. But who nows, probably in other circumstances (Windows?) we can?

Please check this.
Comment 8 Chiana 2015-10-19 10:28:36 UTC
(In reply to Vladimir Kvashin from comment #6)
> Kent, thank you very much for filing this!
> 
> As to IDE hangup: can you reproduce this? 
> Could you do this and get full thread dump? (To do this, you can use jps
> command to get java process pid and jsctack command to get full thread
> dump). If you succeed, could you please file a separate bug and attach
> thread dump to it?
> 
> Thank you!
> Vladimir

You are most welcome.

The hangs seems to be intermittent and the entire jvm seems to be hanging and I tried to make a dump but it did not work. My guess is that there is a bug in the jvm itself that causes the hang because only a "taskkill /F <pid>" seems able to terminate it.
Comment 9 Chiana 2015-10-19 10:29:48 UTC
(In reply to Vladimir Kvashin from comment #7)
> (In reply to soldatov from comment #3)
> > Easy to reproduce.
> I have some doubts that it happens when stepping *over*.
> My understanding is that it happens when trying to step *into*.
> (The filer could just make a mistake and, e.g. probably pressed F7 while
> intended to press F8).
> 
> This bug should be fixed in any case, but if CndSessionChanger is called for
> each stepping *over* a native call and invoke a ps each time - this is
> dangerous and can slow down debugging very much. So in this case we should
> file a separate bug and fix it.
> 
> I checked this (although in trunk, not release81) on my Ubuntu and in
> debugger and I see that we don't get into CndSessionChanger when stepping
> *over*. But who nows, probably in other circumstances (Windows?) we can?
> 
> Please check this.

You are correct, it was "step into" (F7)
Sorry for that mistake!
Comment 10 Vladimir Kvashin 2015-10-19 10:32:52 UTC
fixed in cnd-main:
http://hg.netbeans.org/cnd-main/rev/d9aa4b6adda8
Comment 11 Vladimir Kvashin 2015-10-19 10:44:10 UTC
(In reply to Chiana from comment #8)
> ... <skipped> ...
> The hangs seems to be intermittent and the entire jvm seems to be hanging
> and I tried to make a dump but it did not work. My guess is that there is a
> bug in the jvm itself that causes the hang because only a "taskkill /F
> <pid>" seems able to terminate it.

That's just for your information.

Stepping into a native method works as follows:
- NB finds java process PID (initial report concerned exactly the situation when PID wasn't found, so NB tried to report this and couldn't find message bundle)
- NB  attaches to this process with native debugger; 
at this moment the process is stopped
- NB sets a breakpoint in appropriate method
- NB releases the java process

So there is a period when the java process is stopped.
(But sure only in the case PID is found).

So in general, stepping into a native method can stop java process, in which case you won't be able to get a thread dump.
Comment 12 Chiana 2015-10-19 11:00:51 UTC
(In reply to Vladimir Kvashin from comment #11)
> (In reply to Chiana from comment #8)
> > ... <skipped> ...
> > The hangs seems to be intermittent and the entire jvm seems to be hanging
> > and I tried to make a dump but it did not work. My guess is that there is a
> > bug in the jvm itself that causes the hang because only a "taskkill /F
> > <pid>" seems able to terminate it.
> 
> That's just for your information.
> 
> Stepping into a native method works as follows:
> - NB finds java process PID (initial report concerned exactly the situation
> when PID wasn't found, so NB tried to report this and couldn't find message
> bundle)
> - NB  attaches to this process with native debugger; 
> at this moment the process is stopped
> - NB sets a breakpoint in appropriate method
> - NB releases the java process
> 
> So there is a period when the java process is stopped.
> (But sure only in the case PID is found).
> 
> So in general, stepping into a native method can stop java process, in which
> case you won't be able to get a thread dump.

Hmmm... To my knowledge I do not have a native debugger installed unless there is one in NB that I don't know about. This particular application that I am working on uses a lot of native calls (mostly JNI).
Comment 13 Quality Engineering 2015-10-20 01:14:45 UTC
Integrated into 'main-silver', will be available in build *201510200002* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/d9aa4b6adda8
User: Vladimir Kvashin <vkvashin@netbeans.org>
Log: fixed #255983 - [mixeddev] java.util.MissingResourceException: No such bundle org.netbeans.modules.cnd.mixeddev.debugger.Bundle
Comment 14 Chiana 2015-10-21 21:18:57 UTC
Looks a little better now, a nice box saying it can't find the native process, a little unbalanced thou... Some cosmetic mockup later perhaps...
Comment 15 Antonin Nebuzelsky 2015-10-22 14:32:40 UTC
This needs to be backported to release81 today and marked as 81_HR_FIX.
Comment 16 ilia 2015-10-22 15:17:12 UTC
Transplanted to releases~release81:
  hg.netbeans.org/releases/rev/e171e7046bd3 - [fixed #255983 - [mixeddev] java.util.MissingResourceException: No such bundle org.netbeans.modules.cnd.mixeddev.debugger.Bundle]