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.
Description
kawkhins
2007-10-22 10:05:03 UTC
Strange, is there any CPU/disk activity when the editor is in this state? Do you have any idea what triggers it? Does it happen for all files or just some (ie. a particular file type, files in version control, ...)? Did you get any exceptions, could you attach the <userdir>/var/log/messages.log file? Thanks *** Issue 120745 has been marked as a duplicate of this issue. *** Hi Vita, there is additional information (such as a thread dump) in issue 120745. Also, you can find a lot more discussion around it in the comment section of this blog entry: http://blogs.sun.com/tor/entry/ruby_screenshot_of_the_week21#comments 3 separate users reported similar scenarios. Hi Tor, thanks for pointing me to the discussion. I read through it and Graste seems to blame compiz for the problem, but in #120747 he says the editor froze up again even without compiz. Looking at the thread dump there was *nothing* running in the IDE at all AFAICT. I mean no deadlock, all threads either runnable or parked waiting for their request queue. I'm really not sure what's wrong, but I know there are people here that use compiz/beryl on Ubuntu and other linux distros and they don't complain. I think there is a special property that when set will produce extensive logs about focus transition in/from editor panes. I can't remember what it was, but will find it and post it here. If somebody who can reproduce the problem sets this property and send us logs we might be able to find something. I can confirm this behavior as well on a Dell D610 Latitude running Ubuntu 7.10 Gutsy. Compiz is *not* enabled (Appearance->Visual Effects is set to None) though it happens with Compiz on or off. I have tried it with JVM 1.5 and 1.6, same behavior. The loss of keyboard focus happens intermittantly if you navigate using the left hand navigation tree, however, if you do a Navigate -> Go To File/Go To Class when the file is opened there is *never* focus. Closing and re-opening the file in this manner does not fix it. This is a showstopper for me because "Go To File" is the way I navigate my code, using the mouse is too cumbersome for large projects. Note that I am using the latest RC1 bits and the problem persists. We see this problem in NB6rc1 on MacOS X 10.4 -- so I'm pretty sure Compiz cannot be to blame. My partner feels like this is most likely to happen after manipulating the quick-fix lightbulbs. But that is not a sufficient way to reproduce it. Seems like a heisenbug. This has happened to me a lot lately. I remebember seeing it in 5.5 a few times. Then it helped just to close and reopen the editor window. But in 6.0 RC1 that often won't help. I have to restart Netbeans to be able to type in the Java editor again. As pohl I also see a connection to the use of quick-fix lightbulbs, but I can't reproduce it. - MacOS X 10.4 - Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_07-164) - Java HotSpot(TM) Client VM (build 1.5.0_07-87, mixed mode, sharing) - NetBeans 6.0 RC1 Created attachment 53624 [details]
Thread Dump after issue noticed
The above thread dump was created immediately after seeing the behaviour described in this issue. I had created a new, stateless ejb and was in the process of using the lightbulb helpers to add the method declarations to the interface. Normally the lightbulb would change to a green circle, with an I inside to signify the method is defined in an interface. After switching back to the class file in the editor, the lightbulb was still present and it again prompted me with "method not exposed in any interface". I could click to add the method again and it would show up in the interface as a duplicate, but no error icon would show up. The cursor and the keyboard no longer functioned in either file, other than to click the lightbulb helper. The above thread dump was created immediately after seeing the behaviour described in this issue. I had created a new, stateless ejb and was in the process of using the lightbulb helpers to add the method declarations to the interface. Normally the lightbulb would change to a green circle, with an I inside to signify the method is defined in an interface. After switching back to the class file in the editor, the lightbulb was still present and it again prompted me with "method not exposed in any interface". I could click to add the method again and it would show up in the interface as a duplicate, but no error icon would show up. The cursor and the keyboard no longer functioned in either file, other than to click the lightbulb helper. Mac OS 10.4 Netbeans RC2 When I switched back to RC1, i was able to finish adding declarations to the interface using the lightbulbs with no issues, but I have seen this issue since 5.5, just like the others. The problems on Mac are discussed also in issue 120880 *** Issue 123908 has been marked as a duplicate of this issue. *** I have this issue constantly as well. It seems to be limited to when I do non-trivial refactorings. For example, renaming a variable doesn't do it, but adding new methods to a Java class (like accessors) does it almost every time. It's very annoying. I do have a workaround that's not great but beats restarting: go into Preferences and just hit Ok. When you come back to the editors the cursor will be back. Looking forward to seeing this fixed. This also happens to me all the time on OSX. It seems to show up after I use the lightbulbs to "Implement all abstract methods" (and others like this). There is no more focus in that particular Editor (the others seem ok). A quick solution I discovered is to open the Settings and click on "Manual Proxy Settings". This makes a caret show up in there, and after I close the window (escape key), I get the caret back in the Editor. This is kinda ruining my workflow as I keep on fighting with the Editor for the caret :) Product Version: NetBeans IDE 6.0 (Build 200711261600) Java: 1.5.0_13; Java HotSpot(TM) Client VM 1.5.0_13-121 System: Mac OS X version 10.4.11 running on i386; MacRoman; en_US (nb) Hi, just adding my testimony this bugs is so annoying that I'm not even able to use Netbeans anymore. I found Netbeans so great for Rails dev, but unfortunately this bug tends to happen almost on every file edition so it's not usable. I'm back to Scite and Vim for the moment, sad. I'm on Ubuntu Kernel 2.6.22-14, Intel core duo, Java 6 build 11.0-b09, using Gnome. The bug has been around for a while (at least the last 6 months). Guys I can't believe there is so little people having the trouble you don't fix it. Really it's ruining all your great JRuby integration efforts. I might be wrong be I would say that if fixing this bug would take you half of the Ruby features, it would still be a benefit for users like me. I guess it doesn't happen with the same frequency on every PC. Still I re-installed lots of NB versions while Java uses to run fine on my PC, so I believe a few other people see the same level of trouble I see, that should be devastating. Best regards and thanks for the open source in any case. Raphaël Valyi. Raphaël, what exactly is your JVM - 'Java 6 build 11.0-b09'? I'm on Ubuntu myself and have been using it + Netbeans for everyday development for about a year. No focus problems at all. As we believe this issue is related to particular JVMs that people use. Typical sufferers are Mac users, because they have no other choice that using Apple's JVM. On Ubuntu you should be able to use latest stable JDK from Sun for example. I'm currently using JDK6 Update3 from java.sun.com: java version "1.6.0_03" Java(TM) SE Runtime Environment (build 1.6.0_03-b05) Java HotSpot(TM) Server VM (build 1.6.0_03-b05, mixed mode) This is *not* as much a problem of Apple's VM as a NetBeans 6.0 problem ! I've used NetBeans 5.5(.0 and .1) for a long time and the cursor didn't disappear on me like it does on NetBeans 6.0 (like 50 times a week at least). Sure, maybe Apple's VM has some bugs (and please *close* this if it's provable only Apple's fault and there's no workaround available) but this is foremost a NetBeans bug and I would say P1 or P2, not the lowend P3 like it is now. I'm going to increase this to P2 and please someone explain why would they move it to P3 again, if they do it. *** Issue 127169 has been marked as a duplicate of this issue. *** I'm not sure why this issue as marked as incomplete? What data are you looking for? This issue is hitting a lot of users, and I'm concerned it's not showing up on the dashboard because it's marked as incomplete. I agree it's a P2. Right, at the moment we probably don't need more info, but what we could use some help. Neither Mila nor I work on Mac OS and can't easily analyze this problem. Maybe the problem is not as much in Mac or Apple's VM as it is in Netbeans, we don't know, but the fact is that it shows up on Mac OS a lot and only very rarely (if at all) on other OSes. We would really appreciate if somebody with Mac OS could analyze the problem and find out what's wrong, why is it wrong and how we can fix it. Thanks a lot. Do you have an attack angle for this problem ? Some hints we could try to produce a patch or at least better debugging info for you guys ? *** Issue 120880 has been marked as a duplicate of this issue. *** Probably not directly related, but who knows - issue #126260. Emilian, the truth is that we have no idea how to track this down. As I mentioned in #126260, I'm preparing a small module, which should dump status info about opened editor windows. When it's ready I'll ask whoever is willing to help to install it and send us its diagnostic output. If anybody has any idea (links to similar issues, docs to read, etc) please post it here or drop me an email. Thanks FYI, this has stopped happening for me with recent builds... Hi, unfortunately, bug as usual for me with last M1 version... As usual, I didn't get the bug at the very first files openings, the first clicks and autocompletions. But still, soon after opening a few ruby and rhtml files (6) from the project tree, I had my cursor not responding to keyboard actions, as usual. I don't know if it heps you, but some of my Ruby files are relatively large, one is more than 300 lines of code. My whole Rails app isn't that small. It's also requiring Java and a few javabeans of my own to run properly (I don't know if this could interfere). I think I got the same problem with standard Java files too actually. A workaround for me is to open the Window > properties panel and then close it, then I can edit my file again (but don't ask me why). Anyway this doesn't make editing very fluid either... Guys, finally: I'M NOT RUNNING ON MACOSX, NO, I'M ON AN UP TO DATE UBUNTU, JUST LIKE OTHERS REPORTED. So please stop flagging this topic as a pure MacOSX JVM issue, I believe it's not (at least for us it's not). MY JAVA IS ALSO UP TO DATE: rvalyi@rvalyi-laptop:~$ java -version java version "1.6.0_10-ea" Java(TM) SE Runtime Environment (build 1.6.0_10-ea-b09) Java HotSpot(TM) Client VM (build 11.0-b09, mixed mode, sharing) Finally: I'm responsible of the IT survey in the company I'm working in (www.Smile.fr) I've been a JRuby early adopter and I'm only waiting my hour to demonstrate the true power of JRuby the my company. But until this is issue gets fixed, I really can't present that to the company. I mean the guys will laugh at me when I'll tell Jruby has great IDE support and the cursor in Nebteans will freeze every 5 minutes. JRuby is now rock solid I think I hope you get netbeans fixed too. (Still congrats for the debugging support). Regards, Raphaël Valyi. Guys, as msauer suggested, issue http://www.netbeans.org/issues/show_bug.cgi?id=126260 Is a perfect description of my problem too (including whole discussion). I guess both are duplicates indeed unless I missed something very subtle. Hope this helps. Raphaël Valyi. *** Issue 126260 has been marked as a duplicate of this issue. *** Thanks Raphaël, we understand that this is not purely Mac OS issue. Ok, I downloaded and installed the same JDK as Raphaël. I'm also using Ubuntu 7.10 with Gnome and Intel Core Duo, 2GB memory. I believe this is very similar environment to what Raphaël is using. I'll keep using this setup for a while for my everyday development and we will see if I can reproduce the problem. The only apparent difference is that I don't do Ruby, but Java. uname -a: Linux veech-laptop 2.6.22-14-generic #1 SMP Tue Feb 12 07:42:25 UTC 2008 i686 GNU/Linux java -version: java version "1.6.0_10-ea" Java(TM) SE Runtime Environment (build 1.6.0_10-ea-b11) Java HotSpot(TM) Server VM (build 11.0-b11, mixed mode) Hi vstejskal, glad to see you are trying to find out the issue and glad to see the OS platform has been moved to "all". To make sure it wasn't due to the Ruby plugin, I just downloaded M1 again, but only the Java SE edition this time. Then I only openned an existing java project: JRuby (SVN head; the java project, only consisting in java classes). Then I only had to open some 3 files. I each of those 3 files, I tried trivial things like positioning the cursor inside a java method, then writing "this." and pressing CTRL+Space to see the autocompletion popup. I tried to happen a few (less than 10) methods removing them afterwards to try with an other. On the third file I clicked in the project tree, the cursor was frozen unresponsive to keyboard events in the freshly open file: same bug. Again, no CPU usage, no apparent memory leak; rather sounds like the cursor gets disabled programmatically for whatever reason. When coding in Ruby, this tends to happen either on file opening, either on auto completion, either in Ruby and RHTML files. So no this isn't even due to the Ruby plugin: this is happening as easily in plain java projects without the ruby plugin. Again, openning Window > properties and closing the properties panel enabled the cursor again. Also, on the #jruby IRC chat, Charles Nutter, JRuby lead told me that he had the problem occurring occasionally when refactoring Java code. I guess he was speaking about the same issue. Indeed it's him who told me about the properties panel hack to enable the cursor again, and that's almost the only thing that worked for me too, so I guess it was the same issue. I guess he is on Mac OSX, but as others reported, including me, this happens on Linux + GTK too. So far the About popup in netbeans told: Product Version: NetBeans IDE 6.0.1 (Build 200801291616) Java: 1.6.0_10-ea; Java HotSpot(TM) Client VM 11.0-b09 System: Linux version 2.6.22-14-generic running on i386; UTF-8; fr_FR (nb) And last thing about the JVM: I tried a few other java 6 version before this one and had the bug all the time. I think I didn't had the bug on Netbeans 5.5 but I'm not very sure since I used it very little. If there is any thing easy I might try to help you to find out what is going wrong (like launching an instrumented version), please let me know. Good luck, Raphaël Valyi. Ok, the bad news first, I've been using the environment for nearly two days without any problem (I was developing Netbeans, having about 20 projects opened, mostly editing java files). Moreover, there are now two guys in my office running Mac OS X 10.5.2 and using it for their normal everyday Netbeans work as well and still no problems... There are probably still some differences in our environments or in the way we work, which obscure the problem. Now, the good news, I prepared a little plugin which when installed will dump the editor status. I'd like to ask anybody who can reproduce the problem and is willing to spend half an hour on diagnosing this problem please follow the instructions below and attach the dump file here or send it directly to my nb.org email. The plugin shows information that I think will be useful for the analyzes, but we might need to add more output and run through several iterations. So, please be patient. You can build the plugin from main/contrib or use the version attached to this issue: 1. hg clone http://hg.netbeans.org/main/contrib 2. Open editor.probe project 3. Right click the project node and 'Create NBM' In order to use the module: 1. Install the module and check for 'Editor Probe listening on port XYZ' message in the log (console). 2. Go to your browser and load http://localhost:XYZ/. 3. You should see a message asking you to switch back to Netbeans and wait, please do so. 4. After a while (5 sec) the page will be refreshed with the editor status. 5. You can copy-paste or 'Save Page As' the status info and attach it here. Please note that in #3 it is important that Netbeans has a focus otherwise the page in your browser won't refresh. You should preferably use Alt+Tab (on Mac I think it is Meta(Apple)+Tab) for switching back to Netbeans. Please avoid using mouse and clicking somewhere inside the IDE, because it may change the focused component. After 5 sec or slightly more you can switch back to your browser, the status page should be there. If it is not, please try repeating steps 2-4 and possibly wait a bit longer. Thanks for your help! Created attachment 56877 [details]
Editor Probe 1.1.0
Created attachment 56883 [details]
Editor probe output
Attached my dump from editor probe. A couple of other things to note: - I am writing code in Java, not Ruby - I am using JDK 1.5 - The problem happens much less frequently than it used to, but it still happens about three times a day - The workaround of going to Preferences, clicking around, and coming back to the editor works for me. This is significantly more acceptable than restarting NB, but most people won't know that this does the trick. Hi vstejskal, I would like to install your probe plugin to help out but was unable to do so with Netbeans 6M1 java SE only. In the plugin manager, when attempting to install the .nbm you attached, I got: Missing required modules for Plugin Editor Probe: Editor Library 2 [module org.netbeans.modules.editor.lib2/1 > 1.6.0.2] Editor Utilities [module org.netbeans.modules.editor.util/1 > 1.22] File System API [module org.openide.filesystems > 7.6] Datasystems API [module org.openide.loaders > 6.8] Module System API [module org.openide.modules > 7.4] Nodes API [module org.openide.nodes > 7.3.0.1] Utilities API [module org.openide.util > 7.12.0.1] Window System API [module org.openide.windows > 6.19] Any idea how I can install it (like force to discover the dependent modules, from where)? I'm sorry, I can't build it from HG. Not used to it and no time. You can also reach me at r-v-a-l-y-i-@g-m-a-i-l.com (without the - of course) if that might helps. Thanks in advance, Raphaël Valyi. BTW, for me the bug arises far more than 3 times a day. When developing it's occurring like on every single minute but always on file edition or auto completion (only). So for Ruby dev, I've a balanced feeling with constantly firing the properties window or sticking with Vim or Scite. For regular Java dev, I don't even think a minute about using Netbeans, this bug really kills it for me. So as I said, I hope it's a bit exceptional because else it's bad for Sun image. I can't compare with co-workers as they all use Eclipse. i hope I can provide you helpful log if you give me more clues to install your probe as I said earlier. Raphaël Valyi. Raphaël, I'm sorry, my bad, I'll update the dependencies in the probe to match those in Nb6, this way it should install to Nb6 and later builds. I'll attach a new nbm here. Thanks David, the output you attached shows that there were no editors open in the IDE. Did you generate the output when the IDE was in the broken state? Thanks Created attachment 56910 [details]
Editor Probe 1.2.0 - declares only dependencies on Nb6 libraries
Created attachment 56916 [details]
Editor Probe dump from OS X when the editor is blocked
I attached output from my environment when the editor was blocked. I clicked on the lightbulb to implement all missing methods from an Interface when it happened. Thanks for the dump, you had two editors and none of them had focus, but I'm not sure why. So, the first thing we should do is to find out where the focus had gone. Maybe we could try installing our own FocusManager, which would log focus transitions between components or something along this path. Created attachment 56952 [details]
/home/rvalyi/Desktop/editor_probe_dump_rvalyi_linux.txt
Ok, and here is mine: (/home/rvalyi/Desktop/editor_probe_dump_rvalyi_linux.txt) I had 4 java files openned when it happenned, it was just after the autocompletion popup appeared. I cliked back in the file and the editor had no cursor. Hope this helps. Raphaël Valyi. Umm, Raphaël, your file shows only two editors - RubyContinuation.java and another nomadic editor pane (no file-based). The editor with RubyContinuation.java apparently did have a focus. vstejskal, well, I'm not sure there is absolutely no focus somewhere. Then my question is: how I can check where the hell my focus is gone? If You try to move arrow keys, nothing happens, it doesn't bring me in some mysterious panel that got the focus. Also, it's still obviously a bug the focus to go away when auto completing or opening a file. Since I would be very happy to use Netbeans for Rails dev, please feel free to tell me other things I might try to help you to track what s going wrong. BTW, I code Java all day long at my job, I have some 2 years of experience in Swing dev, and never had such a trouble except with Netbeans 6. That's just to emphasis I doubt it's my Java install or me misusing Netbeans. I don't really know about how it works, but may be we could set up some VNC access to my Linux box if you want to try yourself if the problem were to persist. Regards and thanks for your efforts, Raphaël Valyi. FYI, one thing that seems to regularly do it for me is choosing the lightbulb hint to add the @Override notation. You might try that to see if you can more reliably reproduce... BTW, I also tried whith an other JVM: java version "1.6.0_04" Java(TM) SE Runtime Environment (build 1.6.0_04-b12) Java HotSpot(TM) Client VM (build 10.0-b19, mixed mode, sharing) And also tried to force the Metal look and feel, but none of the two helped. Also tried to increase -Xmx and MaxPermGen, and also tried to totally disable my Compiz 3D Desktop but without any success regarding this bug. Now trying with last Netbeans snapshot... Raphaël, thanks for your help. None of us is saying that it is you or your way of using java/Netbeans, my friend. David, I am aware that using hints seems to expose the problem and I've been using them as much as I could in the last several days. But unfortunately with no success. Anyway, we are going to keep hunting it. The VNC session might be a good idea, but first I'll try preparing that logging FocusManager. I have a new version of the probe which listens on FocusManager and logs focus transitions to standard Netneans log file. It also dumps more info about current focused component. I'd like to kindly ask you to install it and send me the output it generates plus the Netbeans *log* file from the same IDE session. I had to change the codenamebase of the module, because it violated our new (Hg) naming conventions, which means that you will first have to explicitly uninstall the old version. You can do that from the plugin manager, just go to the 'Installed' tab and enter 'probe' in the search text field. Then tick the checkbox in the 'Uninstall' column. After that go to 'Downloaded' tab and use 'Add plugins...' to install the new nbm. If in doubt what version you are installing it should be 1.4.0. Also before you send us any log files please double check that it contains lines starting with "INFO [nbeditor.focus]:". If you can't see any then the probe didn't log anything and it most likely means that your logging level is higher then INFO. You can change the level by running the IDE with '-J-Dnbeditor.focus.level=INFO' (without apostrophes). Thanks again for your help. Created attachment 57198 [details]
Editor Probe 1.4.0 - uninstall the old version first!
I get: "Exception in Editor Probe: null" From the log: VARNING [org.netbeans.modules.editor.retools.probe.Installer]: Exception in Editor Probe java.lang.NullPointerException at org.netbeans.modules.editor.retools.probe.Probe.dumpAncestors(Probe.java:273) at org.netbeans.modules.editor.retools.probe.Probe.addGeneralStatus(Probe.java:151) at org.netbeans.modules.editor.retools.probe.Probe.getStatus(Probe.java:90) at org.netbeans.modules.editor.retools.probe.Installer$HttpServer$1.run(Installer.java:140) at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:199) at java.awt.EventQueue.dispatchEvent(EventQueue.java:461) at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:269) at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:190) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:184) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:176) at java.awt.EventDispatchThread.run(EventDispatchThread.java:110) Caused: java.lang.reflect.InvocationTargetException at java.awt.EventQueue.invokeAndWait(EventQueue.java:853) at javax.swing.SwingUtilities.invokeAndWait(SwingUtilities.java:1257) [catch] at org.netbeans.modules.editor.retools.probe.Installer$HttpServer.serve(Installer.java:136) at org.netbeans.modules.editor.retools.probe.NanoHTTPD$HTTPSession.run(NanoHTTPD.java:302) at java.lang.Thread.run(Thread.java:613) I will attach a file with some more context from the log. Created attachment 57211 [details]
Log from NPE in Editor Probe
Thanks for the log marvi. I think it actually shows something useful. I think the exception is just another symptom of the problem we are trying to solve. The exception was thrown because there was no focus owner (a component), but it was thrown from the probe when it was generating the status info, which doesn't happen unless the IDE has a focus (precisely the IDE's main window has a focus). So, the FocusManager in the IDE was in the state where it had an activeWindow, focusedWindow, but no focusOwner nor permanentFocusOwner. Now, I'm not an expert in this field, but I would believe that this should never happen unless all components in the application are non-focusable or something about focus traversal policy is broken. Anyway, the interesting part of the log is just before the probe crashed and I assume that it is when the focus got broken and the editor became unusable. - Here things were as usual - QuietEditorPane is the editor, its focusCycleRoot is the TabbedAdapter, ... 'focusOwner' old=[org.openide.text.QuietEditorPane@8194e2; name='null'; isFocusable=true; isFocusOwner=false] new=[null] 'permanentFocusOwner' old=[org.openide.text.QuietEditorPane@8194e2; name='null'; isFocusable=true; isFocusOwner=false] new=[null] 'currentFocusCycleRoot' old=[org.netbeans.core.windows.view.ui.tabcontrol.TabbedAdapter@d2240d; name='null'; isFocusable=true; isFocusOwner=false] new=[org.netbeans.core.windows.view.ui.MainWindow@c3c5ee; name='frame1'; isFocusable=true; isFocusOwner=false] - Here the focus goes to a mysterious java.awt.Panel and then to null (probably when you switched to your browser) 'focusOwner' old=[null] new=[java.awt.Panel@76d490; name='panel0'; isFocusable=true; isFocusOwner=true] 'permanentFocusOwner' old=[null] new=[java.awt.Panel@76d490; name='panel0'; isFocusable=true; isFocusOwner=true] 'permanentFocusOwner' old=[java.awt.Panel@76d490; name='panel0'; isFocusable=true; isFocusOwner=true] new=[null] 'focusOwner' old=[java.awt.Panel@76d490; name='panel0'; isFocusable=true; isFocusOwner=false] new=[null] 'permanentFocusOwner' old=[null] new=[null] I'll keep investigating it and attach new version of the probe. But I think we might need to do some JDK patching in order to find out what that mysterious java.awt.Panel is. Thanks I have updated version of the probe, which records where instances of java.awt.Component were created from. It also records failures in Component.requestFocus() and similar calls. In order to do that I had to patch java.awt.Component and add our own custom code to it. Therefore installing the probe now requires a special jar to be placed at the beginning of the bootclasspath. The jar (in fact two jars - one for JDK5 and the other for JDK6) contains patched version of java.awt.Component class and is queried from the probe when it generates its output. Here are the instructions how to install the jar: 1. decide which one you need; if running Netbeans on JDK5 grab the editor-probe-jdk5patches.jar if on JDK6 use editor-probe-jdk6patches.jar 2. copy the jar to your Netbeans *installation* directory 3. edit the <nb-install-dir>/etc/netbeans.conf file and add '-J-Xbootclasspath/p:editor-probe-jdk5patches.jar' (or ...jdk6patches.jar if on JDK6) at the end of the 'netbeans_default_options' entry You can then run Netbeans as usually, install the probe from the attached nbm (version 1.6.0) and generate and attach its output here when your editor misbehaves. Thanks Created attachment 57603 [details]
Editor Probe 1.6.0 - don't forget to install the JDK patch too
Created attachment 57604 [details]
JDK5 patch for Editor Probe 1.6.0
Created attachment 57605 [details]
JDK6 patch for Editor Probe 1.6.0
Probably related to issue #90371. Could somebody please try the new probe with the JDK patches and post the report here? I know this is dragging, but without further help and without being able to reproduce the problem I can't do much. Thanks a lot When using your settings the Editor Probe complains about a missing method, meaning the patch wasn't activated. NetBeans on Windows uses the NetBeans directory as current working directory. On Mac/Linux it is the bin directory that is CWD. I ran into this in my platform app when I wanted to reference a jar from netbeans_default_options. You can't do that in a platform independent way. You could in 5.5. When I succesfully added the patch, NetBeans wouldn't start. No error message, even if I start it on the command line. The shell script just exits after ten seconds. No window opens. This is Java 5 on OS X. Guys, Perhaps this would be a perfect time to make the case to your managers that you need a shinny new iMac to diagnose issues like this :) FYI... I've been having this problem since I upgraded to NB 6.0.1 (I don't think I saw it with 6.0). Phil System Version: Mac OS X 10.4.11 (8S2167) Kernel Version: Darwin 8.11.1 java version "1.5.0_13" Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_13-b05-241) Java HotSpot(TM) Client VM (build 1.5.0_13-121, mixed mode, sharing) Product Version: NetBeans IDE 6.0.1 (Build 200801291616) Java: 1.5.0_13; Java HotSpot(TM) Client VM 1.5.0_13-121 System: Mac OS X version 10.4.11 running on i386; MacRoman; en_US (nb) Guys, Perhaps this would be a perfect time to make the case to your managers that you need a shinny new iMac to diagnose issues like this :) FYI... I've been having this problem since I upgraded to NB 6.0.1 (I don't think I saw it with 6.0). Phil System Version: Mac OS X 10.4.11 (8S2167) Kernel Version: Darwin 8.11.1 java version "1.5.0_13" Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_13-b05-241) Java HotSpot(TM) Client VM (build 1.5.0_13-121, mixed mode, sharing) Product Version: NetBeans IDE 6.0.1 (Build 200801291616) Java: 1.5.0_13; Java HotSpot(TM) Client VM 1.5.0_13-121 System: Mac OS X version 10.4.11 running on i386; MacRoman; en_US (nb) marvi, thanks for the info. I think I will have to prepare a special version of the JDK patches for Mac. Adding probe version for MacOSX/JDK1.5. Created attachment 58379 [details]
mac od / jdk 1.5 probe version
Thanks for this Maxi. Just to summarize - jdk5patches.jar and jdk6patches.jar should work on linux/solaris/windows and jdk5patches_mac.jar should work on Mac OS X. There is no JDK6 version of the patches for Mac. Regarding where to place the jar before starting Netbeans, you can place it anywhere on your disk and then add its full path to the '-Xbootclasspath/p' switch. This is safer than the steps I described originally. Additional questions for those suffering with this problem: What keyboard profile are you using? Could you confirm if showing a hint (eg. alt+ENTER on a line with a lightbulb) and then canceling it by ESC does or does not trigger the problem? Thanks After installing the new JDK patch, I haven't been able to reproduce the problem like before. I will have it installed for a while and see if it shows again. Thanks marvi. What you're saying sounds like a timing issue of some sort, because all the patches do is that they record stacktraces when an instance of java.awt.Component is created and when some of its requestFocus calls fails (ie. would return false to a caller). We've noticed some Mac OS X specific code in java.awt.Component, which was why the original jdk5patches.jar didn't work. I'm going to have a closer look at it to see if there is something suspicious. Another thing to look at is the use of requestFocus vs requestFocusInWindow. The javadoc discourages using the former one in favor of the latter saying that it's behavior is platform dependent. Still, in Netbeans we use requestFocus in many places. Hi vstejskal, sorry for the delay: not much time. BUT, THIS IS FANTASTIC, I CAN NOW USE NETBEANS! BYBY RADRAILS!!! Same as marvi: activating the JDK6 patch fixes all cursor issues for me! Time to patch the JDK or Netbeans for real then. I quite sure of it. I t tried everyting I could, either eiditing (J)Ruby code, eitheir editing Java, no bug. then I disapled the command line option and the bug was there again. So I'll stcik with the patch and hope Sun can do something for all the folks I suspect might see the bug and are neither able to patch anything, neither aware of it. Still, if you want me to try to log something while reactivating the bug I could do it, I'll stick arround. Best regards. Raphaël Valyi. Thanks Raphaël! I'm really happy for you guys, but at the same time this is still puzzling me. The patches we prepared actually do *not* patch or fix anything. They only record creation stacktraces of AWT components and failures in focus transition calls to j.a.Component.requestFocus and similar. At the best the patches may slow down things a little bit. So, after all this exercise the only thing we know is that something is broken around requestFocus calls, but we don't know what nor how to fix it. We don't still even know if it's JDK or Netbeans to blame. Should the problem happen again when running with the JDK patch please use the probe to generate the report and post it here. Hopefully there will be enough evidence in the report to find out what went wrong. Thanks Created attachment 58565 [details]
Output from editor probe after editor freeze.
This problem occurs frequently in my setup. Too frequently, unfortunately, to make Netbeans useful. I can confirm also that it does appear to be related to the hints at the side of the editor. I can recreate the problem fairly easily: 1. Create new project. 2. Create new class. 3. Edit class source code so that an error message occurs and red triangle appears. 4. Save file and close netbeans. Then either: 5a. Simply restart netbeans (editor is locked up immediately) or 5b. Restart netbeans, click on red triange. I've attached Editor.probe output from the above scenario. If there's anything else I can help with please let me know. Nigel Hi Nigel, thanks for the report. Could you please install the jkd6patches.jar and rerun the test? If the editor locks up again please generate and attach the probe info here again. If it doesn't lock up anymore then, well, you have a workaround and we will have to keep searching ;-). Thanks Created attachment 58647 [details]
Patched editor.probe log - pre-freeze
Created attachment 58648 [details]
Patched editor.probe log - post-freeze
Hi Vita - many thanks for the help for applying patches. I have now attached two traces. To obtain these I: a) Started netbeans - with the test project (which opens with a source file containing compilation error) b) Confirmed source file is editable at that stage c) Took snapshot 20080319_1 d) Clicked on red triangle in editor gutter e) Confirmed source file is no longer editable f) Took snapshot 20080319_2 Hope this sheds some light... as usual, let me know if there's anything further I can do. Cheers, Nigel I have some additional info, which I hope will help track down this problem. I am attaching an annotated output of messages.log. (Look for ">> NEKE++" comments for significant actions during the trace). Basically, as before, I a) start Netbeans b) click on red error icon c) focus on editor window. Nigel Created attachment 58811 [details]
Annotated messages.log
One more symptom to report. Following a freeze, if I right-click on the file's "title" and select Undock (or Dock, if the window was already undocked), the file is then editable. The freeze can occur on docked and undocked windows. Thanks a lot Nigel! *** Issue 131197 has been marked as a duplicate of this issue. *** *** Issue 131197 has been marked as a duplicate of this issue. *** Shame to note the waive request. Clearly I'm biased as I'm suffering from this defect, however please keep in mind the 'duplicates' that are also being raised here, when evaluating the request. Thanks for all the patches etc to help us track the problem. This is not to make excuses or anything. But we don't seem to be the only IDE fighting focus problems - http://www.jetbrains.net/jira/browse/IDEADEV-2359. I also found http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4851685, which seems to be closed as 'not reprodicuble'. It was originally opened for JDK5, but it contains some not so old comments complaining about the same problem in JDK6... *** Issue 131970 has been marked as a duplicate of this issue. *** > Re: TM -> Future
Note there is already 'Dev' TM for the next release.
Created attachment 60105 [details]
crashing again on Netbeans RC1 on Ubuntu, log for probe + jdk6 patch
Hi, Unfortunately, as you can see: http://www.netbeans.org/nonav/issues/showattachment.cgi/60105/nb_rc1_ubuntu_lost_focus_rvalyi.txt It's still crashing with Netbeans RC1, just editing a basic Java SE file on Ubuntu Linux, with last JDK6. The probe makes the bug happen quite less often, but IT DOES STILL HAPPEN and it sucks when it appears. I don't know how many users get it, but as for myself at least that's a showstopper for version 6.1, saddly. Please if you can't fix it, try to provide some button or something to go back editing when it happens; it would still make our life much simpler than always try to invent a working way to get the focus back. May be a plugin forcing the focus to come back for the crashing platforms? Thank you for your help. BTW: I didn't provide a log sooner because I was lacking of time for that, not because the bug didn't show up. It still does happen on a very regular basis. Raphaël Valyi. Thanks Raphaël. That's what I suspected, the probe doesn't fix the problem it only changes timing and the defect may happen less frequently. Anyway, having a button that would somehow force the focus back to the editor is not a bad idea. I also have one more question - are you guys using 'focus follow mouse'? I'm not using 'Focus follow Mouse'. I turned it on to see if there was any difference, but there isn't. Hi vstejskal, No, not using any "focus follow mouse" option either. Thank you for your help anyway. Raphaël Valyi. Change of environment has "fixed" this problem for me. I have recently upgraded to Ubuntu 8.04 (AMD) release. As a result I have also upgraded to Netbeans 6.1 (RC2) (and today - 6.1) releases. The lock-up does not appear to occur for me now. The hardware environment is the same. Hi all, Sorry for the bad news, but I'm also on Ubuntu 8.04 with Netbeans 6.1 final and I DO HAVE THE EDITOR FREEZE! Yes, it's seems it's not very often, not as often as it used to be, even pretty usable, but it does still occur for me. Several times in the past I got misleader: the bug didn't show up very often so I thought it was gone, but then it came back showing up very often again. So even if I saw it only once after 1 hours of use, I wouldn't say it's over. It's a one year old friend and I'm starting to know him... Sorry for the bad news then. Great work on the (J)Ruby editor still! My Ubuntu upgrade was also from i386 to AMD, i.e. 32-bit to 64-bit. But I do say "fixed" with reservations. To date it hasn't re-occurred, but I'll continue to follow this defect and post if I do see this happen again. *** Issue 32755 has been marked as a duplicate of this issue. *** A few more details: At least our bug doesn't seem to be this bug http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6465038 at least as I coudln't reproduce that #6465038 bug. Also I tried, starting Ubuntu in failsafe mode without Gnome (only terminal and then Netbeans 6.1 final) and experienced focus losses again. So that's really nothing to do with Compiz or Gnome. Still, that other issue seems weird on my Ubuntu: http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4851685 If I focus outside from the JTextField and then try to writte inside again, it won't work. That's weird but unfortunately I didn't understand if this was the expected behavior. Making the field a static property (still in #4851685) and doing it the following allows me to gain the focus again in the provided test case. That would be perfect if we could apply such a fix for Netbeans but I'm not sure yet that the same case and what to do exactly. public void focusLost(FocusEvent e) { System.out.println(name + (e.isTemporary() ? " lost temporary focus." : " lost focus.")); if (field != null) { window.setVisible(true);// if you don't do this you can't gain the focus again; but that one seems //expected after the focus spec since the field owner is a JWindow //which isn't focusable. field.requestFocus(); } } Hope this helps some way. READ: WORKAROUND INCLUDED: use last Java 1.5 on Linux! Hi guys, I actually CONFIRM I do have this bug almost systematically on my Ubuntu: http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4851685 I just confirmed that on my Ubuntu I'm not able to focus the JTextField again after I click outside it once. On the contrary, on an other Windows PC we don't see that bug, never (see comments for #4851685). So, it might be something else, but it's also highly probable that the bug we see with Netbeans is actually #4851685 I've two reasons to believe it's the same bug: 1) since I'm one of the few one having both two bugs, it's probable they are related. 2) somebody told #4851685 was fixed in last JDK1.5 updates (see comments). Actually as I said (see comments (I didn't observe a fix of #4851685 (because of what appears to be an other bug, but I couldn't either try the same jdk 1.5 build because it's not available for download anymore, see my #4851685 comments). But I GOT NETBEANS 6.1 final WORKING FINE USING 1.5.0_15-b04 RATHER THAN ANY JAVA 6!!! SO GUYS RUN TO JAVA 1.5 DOWNLOADS PAGE AND USE IT WITH NETBEANS (only) IF YOU ARE IN TROUBLE WITH THAT BUG. CAN ANYONE CONFIRM ? (at least on Linux). Still Java 1.5 sucks because the font rendering is much worse. Still, I could find the comment here: scroll to "gfodor Thu Nov 15 01:20:25 +0000 2007" where godfor said he had the problem using Ubuntu and Java 1.5 (version no mentionned). But may be it was due to a previous Java 1.5 or a previous Netbeans release. All other folks reporting the issue with Java1.5 seem to run Mac/OSX and this could be an other JVM issue then. ANYWAY I THINK SUN MADE A SERIOUS JAVA6 REGRESSION HERE. Any workaround/patch for using Java 6? Hope this helps, Raphaël Valyi www.smile.fr Thanks a lot Raphaël for all this work and sharing it with others. *** Issue 136212 has been marked as a duplicate of this issue. *** This is JDK bug. http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4851685 jbecicka: Are you sure? The JDK bug doesn't mention OS X. And it is closed as not reproduceable? The issue is resolved for me in Leopard, with Java 6 and Netbeans 6.1. Could we leave this issue open until we're sure that a proper bug report (open, accepted, covers this actual bug...) has been filed against the JDK? I see no indication from Raphaël that Anton's request (that a separate issue be filed) had been met. Problem is still occuring on the latest available NetBeans 6.1 release at this time. Mac OS 10.5.3 on i386 (Intel-based) Apple JRE (based on Java HotSpot VM 1.5.0_13-119) Using the Metal/Ocean look and feel. Problem seems to occur every time any macro action is invoked that results in any kind of editor text to be altered, e.g. invoking the light bulb hints to add imports or implement interfaces, or using the code re-factoring macros. So far, the only way I've been able to restore the cursor/editability is to complete close out of NetBeans and restart it, which is way too much of a burden every time an automated process is used to alter code. pohl, Despite Anton request, I confirm that http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4851685 seems to be a very correct description of the bug that seems involved here. At least I'm able to reproduce issue #4851685 with any jdk6 I tried on my Ubuntu so I think this is the big. At least I've no better bug description for Anton that #4851685 which seems the exact bug for me (see attached explanations). Also, I found a better work around, at least for Linux users like me: for me, using jdk7 (build 26 at least and above) fixes that bug and provides a much better Swing that JDK5. So you could end up using JDK7 at least for Netbeans. BTW I use jdk7 for everything else on my dev PC except for production of course and I saw no regression so far. Hope this helps and wish good luck to your MacOSX folks; bare in mind that for MacOSX, the bug might be different. Raphaël Valyi > The JDK bug doesn't mention OS X. Yes. Sun's bug tracking system does not track OS X issues, because OS X JDK is developed by Apple. > And it is closed as not reproduceable? Yes, we cannot reproduce it either, but we are work closely with JDK team on it. If anyone of you have steps to reproduce, please contact me privately, I'll contact you with responsible JDK engineer. Thanks I don't think this is just a Mac issue. I think I'm also experiencing this on Windows XP SP3 using JDK 1.6 update 4. See issue #143830 which I think may be a duplicate of this issue, but it is certainly happening. Is there any relation to what is in my issue with any one else's? Are any of you using another IDE to edit files? Is it happening when you try to use find? Anyways, I feel this needs to be left opened and not have a WONTFIX as it definitely is real. If you close my bug as a duplicate, then please reopen this one; it is real, on multiple operating systems, and needs to be on the radar and not hidden behind a WONTFIX. Either way I'll see if I can find out something by debugging the IDE and anything else if I can actually figure out what is making it happen on my system. Umm, I'm not sure if issue #143830 is a duplicate of this one. In #143830 you say that the editor pane reacts to the arrow buttons, but they scroll the pane instead of moving the caret. This exactly happens if there are no shortcuts (keybindings) loaded in an editor pane; it's then forwarding all keyevents to its parent scroll pane. If #143830 were the focus issue the pane would ignore the keyboard input completely. I am using Netbeans 6.5beta, and lost focus issue appears every time when i somethink type in skype, and return to netbeans editor. Product Version: NetBeans IDE Dev (Build 200810090201) Java: 1.6.0_07; Java HotSpot(TM) Client VM 10.0-b23 System: Linux version 2.6.24-19-generic running on i386; UTF-8; en_US (nb) Userdir: /home/darius/.netbeans/dev Have you tried the attached Editor probe? Could you please attach the messages.log after using the tool? Thanks. > I am using Netbeans 6.5beta, and lost focus issue appears every time when i somethink type in skype,
> and return to netbeans editor.
Interesting, that it happens always. I use Skype and Netbeans everyday without problems. I tried that with dev builds
and it worked fine (I had a different JDK though).
Product Version: NetBeans IDE Dev (Build 081201)
Java: 1.6.0_10-ea; Java HotSpot(TM) Client VM 11.0-b11
System: Linux version 2.6.22-16-generic running on i386; UTF-8; en_US (nb)
I still think that this is a JDK issue and can't be fixed in Netbeans.
Are any of you folks experiencing this issue able or willing to download VirtualBox: http://www.virtualbox.org/ Setup the image basically like your computer. You don't have to put everything on there you have on your system, but try to get the issue to surface in the setup. Then, when you get the issue to occur, would you be able to share that image? If you can do that it might actually help track the issue down whether it is in the JDK or in some logic patterns or NB. Otherwise the developers are stuck on the issue really. Thanks. Vita, I'm sure I am reopening your nightmare as I reopen this bug - mea culpa :-). Given the number of users commenting and people running into this (and a substantial thread on the DreamTeam list), it seems like any sort of workaround that would at least get people out of having to restart NetBeans would be a help. I've run into this issue on my Mac in the past (I think I filed one of the duplicates here) - I did discover that a workaround was to get focus to another window such as the Find dialog (invoked by mouse from the menu) and back. Perhaps a small module which does the horrible hack of installing a keystroke which, when invoked will - Open a new window with some focusable component in it - Send focus to that component - Close the window - Send focus back to the editor would probably at least enable people to get work done. FYI, I noticed a few peculiarities of focus handling in NetBeans a few years ago when I was working on the window system. I don't know if this is still true - and it is probably an artifact of hacks somewhere in the window system - but I recall that there are some differences between a normal Swing app's focus behavior and NetBeans' - I never tracked down the culprit, I just noticed it when I was writing a focus logging module similar to what you wrote here. What I saw was that in a normal Swing app, focus traversal from component A to component B is usually just A -> B. In NetBeans, if you listen to KeyboardFocusManager, what you usually see is A -> null -> B. Anyway, perhaps that could help provide a clue. The main reason for reopening is that the JDK bug which is the assumed culprit is closed as not reproducible. There needs to be a bug open somewhere that documents that this needs really is broken. I'd suggest pushing hard on the JDK team to reopen their bug and then close this, but any workaround would probably help a lot of people here out. On linux and ubuntu I encounter this bug long time ago when I was still using Netbeans 5.5 and found that gnome scim have problem (stealing the focus) with my Netbeans usage. So just remove the scim and the problem gone. And now on Ubuntu 8.04 and Netbeans 6.5, I never use/install scim again :) So I suspect, it is related with some application eg: Input Methods Software, etc that compete/stealing the focus from eg: Netbeans. And it might happend in other platform (my case is Linux and Gnome) when similar application are trying to steal focus. It seem it is not Netbeans specific bug, but it is Java Swing and Linux bug. Please see the Sun Java bug report for this case http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6506617 It was happening to me on Windows XP. But, the main problem for NB is that it isn't affecting JDeveloper or IntelliJ as far as I have seen or read. Of course as Eclipse uses SWT this particular bug doesn't affect it. But, it kills NB for those running into it. Too, as it seems to only be affecting NB we need some workaround or something. Can't wait for Java 7 for those folks who can't use it or they can't use NB...lost users and bad word of mouth, and there has apparently been no movement to show it would be fixed for Java 7. It only manifested for me when working in another IDE, JDeveloper, and switching back and forth between NB working on the same files, having them both opened at the same time, and I'm not 100% sure why, and not near as much as it did for some of these folks. It has never happened to me on openSuSE 10-11. *** Issue 155137 has been marked as a duplicate of this issue. *** I don't know if it is related or not, but certainly seems it can be the same bug, but on one of my XP systems on location controlled through GoToMyPC, not the same as Windows virtual terminal services, the edited document will be messed up when I ALT+TAB to other applications then ALT+TAB back. So far I haven't found a method to reliably reproduce though. Essentially it does it sometimes and not others, and at times it does it more often. The problem is the cursor shows up, but keys don't work and the arrow keys move the scrollbars back and forth and up and down; thus the arrow keys move the view as if I was using the mouse on the scrollbars. The cursor does not move, but is in the document. Seems related to some of the things going on in the side of the editor such as the gutter and other things like code folds. Mine is now looking different and acting slightly different. The cursor shows up and I can move it with the mouse and the arrow keys move the scrollbars. I can type, but I must then use the mouse to go back and delete something, so the arrow keys and focus are messed up in some funny ways. It certainly seems it may be related though, and may be exposing the root cause albeit in the JSP editor, but very similar none the less. I'll attach a screen shot. This is happening very frequently. Created attachment 75656 [details]
Visual view of a focus and cursor error...maybe key events...either way the JEditorPane looks different
Wade, I think your report is the same problem as issue #154292. I'm not sure if it's related to the original problem mentioned in this issue, but let's keep it separate. In #154292 there seems to be a problem in accessing SVN, which could be the rot cause for all this. Are you using any kind of VCS on the machine where this happens? The messages.log attached in #154292 shows exceptions when accessing SVN through a tunnel and the connection apparently could not have been established. Please post your comments (messages.log and/or uiguestures) to #154292. Thanks I am actually using SVN with this project this has been happening. More information. It happened again, but this time I couldn't even get a cursor in the editor. This was on a local laptop running Windows XP SP3. This was on a project using Mercurial. I was working on https://hg.netbeans.org/platformx. I had build scripts and some Java files opened. I changed them in a text editor, TextPad, outside of the IDE; I was checking on some things, opened them, and just worked on them there...spontaneous I guess. Anyways, I changed back to NB, tried to click in the editor, and nothing. I had to close the files and reopen them. Is anyone else noticing this as being their issue? Are you editing files outside of the IDE and then switching back and roughly then it is losing focus? Every time this or the other issue has happened to me I have been using something else to edit files and switching between the other editor and NB. This has happened to me in Ant, Java, and JSP files now. Too, this doesn't happen always. It is sporadic. I can edit files quite regularly at times back and forth, and it doesn't happen. Other days it happens a whole lot. In all cases it seems to have been when changing files outside the IDE. Maybe some of you others have not been using another editor, but maybe you have been using svn or hg to update files and ones you have opened in the editor are reloaded perhaps? Anyways, I'm just noticing this as a pattern from my end on more than one system now. waiver update hi guys, I can confirm this issue happens with me on netbeans and other java applications. It happens with me with netbeans 6.0, 6.1, 6.5, and 6.7 on sun java and openJDK. ALso happens with Dynamsoft SourceAnywhere for VSS. I am mainly developing JavaME and every time I run my application and start the emulator, after I return to netbeans I found it not receiving input from keyboard. It isn't necessary to open a dialog to restore input, just opening and closing a menu by mouse is sufficient. *** Issue 170110 has been marked as a duplicate of this issue. *** *** Issue 167562 has been marked as a duplicate of this issue. *** All you really need to see the issue is a GoToMyPC.com account. Probably already accounts on gotomypc used at Sun from home computers...maybe...maybe not. But seems to show the issue seemingly every time I leave NB running, exit GoToMyPC, and then reconnect. *** Bug 176395 has been marked as a duplicate of this bug. *** *** Bug 187290 has been marked as a duplicate of this bug. *** I am closing this report is "wontfix". I have marked it as JDK Bug 4851685 with what a lot of people in this thread already agreed. If you think that the behavior you see is indeed a NetBeans bug (and not general Java bug in your setup) please file separate issues. Also it is highly probably that the code that deals with focus is somewhere in the platform and not in the editor itself so tracking this issue as editor problem is rather inaccurate. Thanks everyone for your understanding and patience with us. (In reply to comment #133) > I am closing this report is "wontfix". I have marked it as JDK Bug 4851685 with > what a lot of people in this thread already agreed. If you think that the > behavior you see is indeed a NetBeans bug (and not general Java bug in your > setup) please file separate issues. > > Also it is highly probably that the code that deals with focus is somewhere in > the platform and not in the editor itself so tracking this issue as editor > problem is rather inaccurate. > > Thanks everyone for your understanding and patience with us. Can you link us to a JDK bug report we can track? I only see: http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4851685 which is marked as "closed, not reproducible," and which doesn't have any comments pointing back to this netbeans example. If we can help them get a net-beans based test case I think we'll be more likely to see our issue resolved. This bug is STILL present on Netbeans 7.0.1
From netbeans about box.
Product Version: NetBeans IDE 7.0.1 (Build 201107282000)
Java: 1.6.0_25-ea; Java HotSpot(TM) 64-Bit Server VM 20.0-b10
System: Linux version 2.6.18-128.el5 running on amd64; UTF-8; en_US (nb)
Userdir: /home/sguha/.netbeans/7.0
>uname -a
Linux gull.arc.nasa.gov 2.6.18-128.el5 #1 SMP Wed Dec 17 11:41:38 EST 2008 x86_64 x86_64 x86_64 GNU/Linux
Keyboard input for Netbeans IDE goes dead.
Cursor shows up in the editor window, when mouse is clicked.
Mouse works, all mouse related menus work.
Could not find a workaround:
Only workaround: restart IDE.
Keyboard keystrokes work on other applications
I run with debug on, no exceptions on console.
Thanks
(In reply to comment #135) > This bug is STILL present on Netbeans 7.0.1 It is also present on not-a-Netbeans, so I guess it's some kind of a more general Java bug. I'm experiencing exactly the same behavior with IntelliJ Idea 10.5.2 $ java -version java version "1.7.0_147-icedtea" OpenJDK Runtime Environment (IcedTea7 2.0) (Gentoo build 1.7.0_147-icedtea-b147) OpenJDK 64-Bit Server VM (build 21.0-b17, mixed mode) $ uname -a Linux xxx 3.1.0 #1 SMP Sat Nov 5 16:39:33 MSK 2011 x86_64 Intel(R) Core(TM) i3 CPU M 330 @ 2.13GHz GenuineIntel GNU/Linux BTW, it was not present on IcedTea6 There are more complaints about this problem here: http://www.shinephp.com/netbeans-ide-for-php-7-1-available/. Is this now happening more frequently? BTW, since this user can reproduce the problem *consistently*, would it be worth it to work with him, e.g. by giving him a build with special logging messages, so we can chase this down and figure out where exactly the problem is? I still run in this **serious** issue on 7.3.rc1. On every start after some seconds no keyboard input in the editor was possible. This shows on openjdk-7, oracle-7, oracle-8 below ubuntu 12.04 (amd64). The workaround I use is to use the openjdk-6. (see also comment #136). Please do not change version. Also would be nice and much better to track it as new bug, since this one is too old and contains all relevant & irrelevant informations. Thanks for understanding. I have also encountered the keyboard dropping out after creating a new file problem. The only solution is to restart Netbeans. (I have been unsuccessful with just closing and reopening the file, and keyboard inputs don't work anywhere else in Netbeans after the drop.) Caps lock and number lock still function while Netbeans is the focused window. I have also noticed when I try to highlight/copy/paste from chrome web browser, the keyboard drops, and when I switch to chrome web browser and do a search, it's a 50/50 chance that the keyboard will drop. I am running compiz with fusion icon, and either window manager (compiz or xfwm4) doesn't matter, problem is reproducible every time. Below are some system stats in case it helps. Arch Linux x86_64 - kernel 3.7.10-1 Netbeans 7.3-1 jdk7-openjdk 7.u17_2.3.8-1 jre7-openjdk 7.u17_2.3.8-1 jre7-openjdk-headless 7.u17_2.3.8-1 xfce 4.10.0-6 - Will I came across the same issue: - netbeans 7.3 - Oracje JDK 1.7 u17 64 bit - Ubuntu 12.10 with Xfce - all of the above 64 bit system (64 bit kernel etc) NB starts, loads project, I can edit file, but as soon as I alt-tab to other application and get back.. no keyboard actions are available. I mean click on the editor and I see that status bar indicates that curor position changed, but there is no cursor, I cannot type anything etc.. I may leave NB open and do some other work and after some time when I get back cursor is available, but of course when I switch to other application for a moment, everything starts again... making I've tried following things with no effect: - Netbeans 6.2 - Jdk 1.7 u 17 32 bit the only thing that currently works is downgrading jdk to 1.6 so it would suggest that it's indeed JDK issue, however issue linked there as root cause is closed long ago.... also, exacly the same configuration, except that running on 32 bit system shows no problems. I had the same problem using Xubuntu 64-bit and Netbeans 7.4, it was practically unusable, as ihsahn says in comment #142, as soon as I alt-tab to other application and get back I couldn't enter any text. The solution that worked for me is to enable "Honor standard ICCCM focus hint" in the "Window Manager Tweaks" configuration of Xfce (http://docs.xfce.org/xfce/xfwm4/wmtweaks#focus). With that activated, I have no more problem. Getting same on Xubuntu 16.4 (Xfce) which, as I recall, doesn't *use* or *need* Compiz. Solution mentioned in comments: "Honor ICCM Focus Hint" did not resolve issue: was already activated. ``` ATI Radeon HD 4200 NetBeans IDE 8.1 (Build 20151231-debian-8.1) X.Org X Server 1.19.3 Release Date: 2017-03-15 X Protocol Version 11, Revision 0 Build Operating System: Linux 4.4.0-87-generic i686 Ubuntu Current Operating System: Linux Mephisto 4.10.0-32-generic #36~16.04.1-Ubuntu SMP Wed Aug 9 09:18:53 UTC 2017 i686 Kernel command line: BOOT_IMAGE=/vmlinuz-4.10.0-32-generic root=/dev/mapper/xubuntu--vg-root ro quiet splash vt.handoff=7 Build Date: 25 July 2017 01:31:02PM ``` |