|
Project
|
IntelliJ IDEA
|
|
Priority
|
Critical |
|
Type
|
Bug |
|
Fix versions
|
No Fix versions |
|
State
|
Fixed |
|
Assignee
|
Kirill Kalishev |
|
Subsystem
|
Code Analysis. Dependencies |
|
Affected versions
|
No Affected versions |
|
Fixed in build
|
No Fixed in build
|
I'm using linux FC3, jre 1.5.0 and kde 3.4
Changing "idea.popup.weight" to medium does not help either.
Focus in Tab A, switch to tab B, mouse click & type... characters went to Tab A. Also same behavior when using Find Find/Replace. After closing find dialog, when typing in Tab A characters still went to find dialog. I Swicthed to JDK 1.5.0_04. Now cannot reproduce.
It started with the 5.0 series.
Although I don't have a specific way to reproduce it. But it seems to happen when
focus is lost momentarily by the editor, for example when doing 'Layout code' via Ctrl-Alt-L.
Then the editor stops responding to keyboard events - although the mouse functions normally -,
and I have to restart IDEA to be able to type text again.
And has anyone tried running in some other DE (Gnome, for example)? It looks like a lot of us are running KDE 3.4. I never get this problem with other Swing apps, though.
In my case, the blinking text cursor ALWAYS disappears and cannot be restored without
restarting Idea. Another key symptom I did not see mentioned at least explicitly in the
other postings on this bug is that left-clicking the mouse in the editor window is no longer
an effective means of restoring the cursor (and the keyboard focus) to the editor pane.
In other words, after moving the I-shaped mouse cursor to the position where I would
like to enter some text, I left-click. Normally, the I-cursor would immediately be replaced
by a blinking text cursor; however, as a result of the bug, the text cursor never appears
and text cannot be entered. I agree that the root cause lies with the keyboard focus,
and not with the text cursor, which is merely an indicator, but some some users
have said that the binking cursor is visible even though text cannot be entered and
my experience contradicts those reports. Perhaps these users have configured
their respective editors to use the text cursor as a mouse cursor, but this seems
unlikely (in fact I don't know whether it is even possible). Also, I have never experienced
behavior indicative of a SWITCH in focus, like text appearing in another tabbed pane.
On the contrary, there is always a total LOSS of the keyboard focus.
Version 4.5 of IDEA had occasionally inability to regain focus after another window had had it, which got cured in the same way. It got much worse after changing to 5.0, now two switchings to other desktops are required, and input is still taken, but only inserted when the focus is regained - at whereever the cursor is then.
Never seen anything like it in other apps.
RHEL: 2.4.21-27.0.1ELsmp
KDE: 3.4.3-1.1.el3.kde
Seems like simpler solution than restarting
I still lose input focus from time to time. And the 'unfloat' trick doesn't always work for me.
So I vote for reopening this issue.
Using Ubuntu 5.10, Gnome 2.10, JDK 1.5.0_06.
Restarting does not help
Gentoo Linux 2.6.12
JDK 1.5.0_06-b5
Idea 5.1 (build 4155)
Window manager: XFWM
I lose the input focus on average 10 times a day... makes using Idea nearly impossible. When it happens, the frame refuses to acknowledge any keyboard input, however it does respond to mouse input. I haven't found any way to get the frame to regain input focus by using the mouse. I have to kill the process and restart.
Seems to happen whenever Idea attempts to shift focus from a dialog box or popup back to the main frame. (For example, when I invoke Refactor:Copy, or press Alt-Enter on an inspection.)
I'm still seeing this on Debian running kernel 2.6.15, using Gnome and Sawfish.
java version "1.5.0_06"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_06-b05)
Java HotSpot(TM) 64-Bit Server VM (build 1.5.0_06-b05, mixed mode)
I have to restart IDEA every 5-10 minutes, and it's really annoying.
suse 10.0 2.6.13-15.8-smp KDE 3.5.1 "level a"
java version "1.5.0_06"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_06-b05)
Java HotSpot(TM) Client VM (build 1.5.0_06-b05, mixed mode, sharing)
The problem is really annoying, and actually with 5.1.1 seems to be even worst.
Anyone have any workaround at all for this?
The worse problem is that sometimes when focus is lost, you are unable to get focus back and type anything in the editor. You have to restart IDEA.
Which JDK? In a JDK-specific bug, all "it breaks for me" comments that don't mention critical details like the JDK are next to useless.
FWIW, I used to have this problem. Upgrading to the latest JDK (1.5.0_06 at the time) fixed it.
Thank you for your valuable input. Now if you scroll up to my comment dated march 9th, you'll find the details you need.
Which JDK? In a JDK-specific bug, all "it breaks for me" comments that don't mention critical details like the JDK are next to useless.
FWIW, I used to have this problem. Upgrading to the latest JDK (1.5.0_06 at the time) fixed it.
I had this problem with every JDK 1.5.0 I tried: 01, 02, 04, 06. No difference.
We have an inhouse trading application which exhibits exactly the same issue:
(1) keyboard input works fine,
(2) a popup appears,
(3) "keyboard focus" is lost; a text field appears to have focus (or the mouse can be used to give focus to any other text field) but you just can't type anything in.
Fortunately for us, dismissing the popup always cures the problem. The problem is intermitent (ie: won't occur every time a popup appears) - it's actually quite hard to reproduce in our testing environment.
Following configuration has the issue:
JDK 1.5.0_06, Red Hat Linux 2.6.9-22.0.1.ELsmp #1, Gnome/Metacity 2.8.6 - I have tried upgrading to 1.5.0_07 but not very hopeful given the list of fixed issues contained in it.
Following configuration does NOT have the issue:
JDK1.4.2_10, Windows XP Pro SP2
Conclusion: this really looks like a JDK 1.5 on Linux bug (not sure about 1.4 but not really an option for us) rather than an application specific one. Here are some more reports of this: www.jroller.com/page/slava?entry=java_1_5_window_focus... Yet Sun's bug DB doesn't really seem to contain anything that useful. We will raise this with our dedicated Sun support chanel.
IDEA 5.1.1, JDK 1.5.0_07, current Ubuntu (Dapper).
And i have two simple workarounds for the problem. For me, following two solutions work.
1. Minimizing and maximizing IDEA window makes the editor gain focus again. And voila, your typings are there. (But only if you have only one instance of IDEA running, otherwise your typings go to the other instance.)
2. Right-clicking on the editor window makes the editor gain focus again. (But sometimes, if you have some copied text in clipboard they will be pasted to the location where you just right-clicked.)
This is consistent with my previous comment. I'd say it's a Swing bug rather than Java. Eclipse uses SWT...
By "light version" I mean a focus loosing (caret disappearing) problem which can be cured by left-clicking editor region. On sawfish I made a workaround mentioned in my previous post, but on ion3 similar hack doesn't work (WRegion.goto(ioncore.current() doesn't fully restore IDEA focus).
I made some investigation and here's what I have found: IDEA's XWindow uses Globally Active ICCCM focus model (see http://tronche.com/gui/x/icccm/sec-4.html#s-4.1.7 ): WM_TAKE_FOCUS is present, but InputField set to 0.
xprop | grep -i focus gives
_XSETFOCUS_TIMESTAMP(_XSETFOCUS_TIMESTAMP) = 0x66, 0x6f, 0x6f
Client accepts input or input focus: False
WM_PROTOCOLS(ATOM): protocols WM_DELETE_WINDOW, WM_TAKE_FOCUS
ICCCM says:
Globally Active Input - The client expects keyboard input and explicitly sets the input focus [...] Thus, it wants to prevent the window manager from setting the input focus to any of its windows.
..and further...
Globally Active clients set the input field to False , which requests that the window manager not set the input focus to their top-level window.
I'm not sure that this is the real cause of the problem. However, I made one interesting experiment: I wrote a program which calls XSetInputFocus on IDEA window, and sends WM_TAKE_FOCUS XEvent to it. This combination fully restores the focus, and typing works again. But as soon as program is chaned to only call XSetInputFocus (without sending WM_TAKE_FOCUS message), focus returns only 'partially' and caret doesn't appear.
It is probably a JDK bug, but I wonder why other swing apps aren't affected..
We are going to focus on reproducing this right after 6.0.2. This is all I can promise for now.
Does anyone still have this problem with the latest SDK?
Regards,
--Venkat.
The version I originally installed in May 05 did not have this bug, it was only introduced a few builds later and has been with all versions since.
I think it would helpful if all reporters are as detailed as possible perhaps there is a common setting which might result in this behaviour:
Linux Version
Windowmanager Version
Mouse focus following setting and automatically window raising
X-Windows Version
(see http://java.sun.com/j2se/1.5.0/docs/guide/awt/1.5/xawt.html) and the bug reappeared. This definitely points to a bug in Java rather than in Idea itself.
Not to developers: If trying to reproduce, try having more than one Idea window open with different projects, and do stuff that opens dialogues, like CVS update.
Again, I cannot reproduce on my machine (FC6, i686, JDK 1.5.0_07), unless using MToolKit
Sometimes the dialog could be unrolled by clicking quickly on the title bar, but not always.
No idea if it's related, though.
My config:
Fedora FC4 + Gnome
JDK 1.5.0_09
IDEA 5.1.2
nSystem.impl.ActionManagerImpl - enter: getAction(EditorChooseLookupItem)
nSystem.impl.ActionManagerImpl - enter: getAction(NextTemplateVariable)
nSystem.impl.ActionManagerImpl - enter: getAction(EditorEnter)
2006-11-21 13:39:47,890 [1475906] DEBUG - .openapi.wm.impl.WindowWatcher - enter: propertyChange(java.beans.PropertyChangeEvent[source=java.awt.DefaultKeyboardFocusManager@e39218])
2006-11-21 13:39:47,890 [1475906] DEBUG - ight.daemon.impl.EditorTracker - windowLostFocus for IdeFrame
2006-11-21 13:39:47,890 [1475906] DEBUG - ight.daemon.impl.EditorTracker - active editors changed:
2006-11-21 13:39:47,890 [1475906] DEBUG - ight.daemon.impl.EditorTracker - <none>
2006-11-21 13:39:47,890 [1475906] DEBUG - on.impl.DaemonCodeAnalyzerImpl - windowLostFocus for IdeFrame
2006-11-21 13:39:47,890 [1475906] DEBUG - .openapi.wm.impl.WindowWatcher - enter: propertyChange(java.beans.PropertyChangeEvent[source=java.awt.DefaultKeyboardFocusManager@e39218])
2006-11-21 13:39:47,890 [1475906] DEBUG - .openapi.wm.impl.WindowWatcher - exit: propertyChange()
2006-11-21 13:39:47,890 [1475906] DEBUG - ight.daemon.impl.EditorTracker - windowGainedFocus for IdeFrame
2006-11-21 13:39:47,890 [1475906] DEBUG - ight.daemon.impl.EditorTracker - active editors changed:
2006-11-21 13:39:47,890 [1475906] DEBUG - ight.daemon.impl.EditorTracker - <none>
2006-11-21 13:39:47,890 [1475906] DEBUG - on.impl.DaemonCodeAnalyzerImpl - windowGainedFocus for IdeFrame
2006-11-21 13:39:48,015 [1476031] DEBUG - .openapi.wm.impl.WindowWatcher - enter: propertyChange(java.beans.PropertyChangeEvent[source=java.awt.DefaultKeyboardFocusManager@e39218])
2006-11-21 13:39:48,015 [1476031] DEBUG - ight.daemon.impl.EditorTracker - windowLostFocus for IdeFrame
2006-11-21 13:39:48,015 [1476031] DEBUG - ight.daemon.impl.EditorTracker - active editors changed:
2006-11-21 13:39:48,015 [1476031] DEBUG - ight.daemon.impl.EditorTracker - <none>
2006-11-21 13:39:48,015 [1476031] DEBUG - on.impl.DaemonCodeAnalyzerImpl - windowLostFocus for IdeFrame
2006-11-21 13:39:48,218 [1476234] DEBUG - ntellij.ide.SaveAndSyncHandler - enter: save()
2006-11-21 13:39:48,218 [1476234] DEBUG - ntellij.ide.SaveAndSyncHandler - save project: com.intellij.openapi.project.impl.ProjectImpl@26c7da
2006-11-21 13:39:48,421 [1476437] INFO - lij.localVcs.impl.LocalVcsImpl - purged 0 items
2006-11-21 13:39:48,484 [1476500] DEBUG - mand.impl.CommandProcessorImpl - executeCommand: com.intellij.openapi.project.impl.ProjectImpl$2@10b4f24, name = Save settings, groupId = null
2006-11-21 13:39:48,484 [1476500] DEBUG - ageSupportingDeletionComponent - Startednull, commandLevel: 1
2006-11-21 13:39:48,484 [1476500] DEBUG - .localVcs.impl.LvcsFileTracker - enter: commandStarted()
2006-11-21 13:39:48,484 [1476500] DEBUG - .localVcs.impl.LvcsFileTracker - enter: commandStarted()
This is with SCIM 1.4.4.
SCIM is an input method framework for entering languages such as Chinese, Japanese, etc. For example, you can enter the Chinese word for "you" by typing "ni" and then selecting the correct character from a popup menu. Since SCIM works by intercepting keyboard input, it makes sense that it has the potential to interact badly with certain applications. Although I should note that I haven't noticed this problem with any other application than IDEA.
The essential thing in IDEA-35572 is that we have several IDEA frames to reproduce the bug. In that case they are main frame and floating tool window.
Does anybody meet IDEA-30053 without several frames opened?
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_08-b03)
Java HotSpot(TM) Server VM (build 1.5.0_08-b03, mixed mode)
Issue still exists.
No SCIM running.
IDE:
Intellij IDEA 6.0.4
Build #6148
JVM:
java version "1.5.0_08"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_08-b03)
Java HotSpot(TM) Client VM (build 1.5.0_08-b03, mixed mode, sharing)
Desktop:
Gnome 2.16.1
OS:
Ubuntu 6.10 (edgy)
Linux 2.6.17-11-386 #2 Thu Feb 1 19:50:13 UTC 2007 i686 GNU/Linux
I upgraded my JDK to 1.6.0 and reset the $JAVA_HOME variable to point to the new JDK (referenced in idea-6148/bin/idea.sh) - and what do you know, it works - no more typing in the wrong tabs & windows :-)
IDEA = 6.0.5 build 6180
OS = Linux Fedora Core 6 (2.6.20-1.2933.fc6)
KDE = 3.5.6-0.3.fc6 Fedora-Core
Java = Jdk 1.5.0_11 and Jdk 1.6.0_01
It is really bad on this configuration. Virtually anything - modal dialog, covering IDEA window with another app's window, etc., causes loss of keyboard focus in editor windows.
FWIW, Netbeans has a somwhat less bad version of the the same problem:
http://www.netbeans.org/issues/show_bug.cgi?id=94316
http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6598651
I see the issue often in
IDEA build 6180
JDK 1.5.0_12
Ubuntu Drake
Window manager: fvwm2
iow, e.g., Crtl-L to reformat should not bring up a dialog, but just reformat with the last options used. And rebuilding the project should not put up the 'Cancel/Background' dialog, but rather move that to a menu bar option. Everytime a new dialog is put up, it seems I lose focus returning to the editor. I'm probably exaggerating, because I cannot remember all the details. But focus gets lost /all the time/.
Who knows when the jdk bug causing loss of focus will get fixed. But there no sense in aggravating the situation with triggering dialogs that can be disruptive to work flow anyway.
Just some thoughts.
However, after several upgrades of the JDK and more than a month of work with it, *I'm now rid of the focus problem*.
Some more details:
IDE:
Intellij IDEA 6.0.6
Build #6197
JVM:
(from Debian package: sun-java6, version 6-00-2ubuntu2)
java version "1.6.0"
Java(TM) SE Runtime Environment (build 1.6.0-b105)
Java HotSpot(TM) Client VM (build 1.6.0-b105, mixed mode, sharing)
Desktop:
Gnome 2.18.1
OS:
Ubuntu 7.04 (feisty)
Linux 2.6.20-16-generic #2 SMP Sun Sep 23 19:50:39 UTC 2007 i686 GNU/Linux
I had the same issue:
I have IntelliJ 7.0
Build #7361
Ubuntu Feisty
Beryl Installed but not running
I did the following:
1. Removed Beryl completely..
2. Removed Debian java jdk packages using apt-get remove sun-java6-jdk
3. Removed Debian java jre packages using apt-get remove sun-java6-jre
4. You will notice something very interesting when doing this....seems that the debian apt-get installed a java-beryl bridge, now that that is gone, I think this is the crux of the problem.
5. I also removed : AWT_TOOLKIT=MToolkit from my .bashrc (That was something I put in for beryl, but now that that is gone, I don't need it)
6. I installed a jdk from java.sun.com
7. Setup the paths (JAVA_HOME, PATH) like a good java programmer.
8. Ran IDEA.
So far so good.
I too have had this problem ever since intalling Feisty. In fact it's the only bug holding be back from switching to Linux from windows. That said it is a pretty significant bug!
I never had the AWT_TOOLKIT variable set. I totally uninstalled Beryl and reinstalled Java 1.6 (not from SUN's site but from Ubuntus build 1.6.0-b105).
I also un-installed SCIM. Am running 6.0.5.
After all of that, the problem is still there. The simplest way for me to create it is:
1. Start intelliJ
2. Create a new project
3. You can't enter a project name
Having created a project called 'untitled', I found you also can not name any modules you try and add!
Pretty weird that such an incompatibility between Java and Linux can exist for sooooooooo loooong. I periodically switch back to Ubuntu from Windows to see if this bug has had any progress.
System-Preference-Appearance, Visual Effects, and None.
I have come to the conclusion that all these desktop effects aren't quite compatible with java like many people say it is.
;)
Let us know what you find.
Thx for the feedback. Unfortunately I have always had desktop effects off. Seem to remember it having too many glitches.
Anyways, in an effort to narrow things down, we can happily confirm that on a pretty vanilla install of IJ on Feisty, you can't use IJ!
Am upgrading to 7.1 now and will report back when I've had a chance....
Surely keyboard input in to a dialog is Tech 101??? How hard could this be for Jetbrains to track down with some assistance from Sun? I mean really, how many years now? I know it's not exclusively a jetbrains issue, but man, can companies not work together for the benefit of the community? Being as IJ is closed source and they have the Sun source, surely they could work this out!
Enough ranting.....
thx.
Upgrading to IJ7.1 fixed the problem I was experiencing.
It's really PITA.
After dialog popup/interaction, you need to switch tabs (mouse click) to enable keyboard.
Also, some dialogs don't get focus at all, e.g. recent files popup appears, but focus is till in the document window.
but, currently there is no other workaround except switchin tabs each time something pops up, and within Idea something always pop-ups. Now it's time to choose between getting RSI, using 1.5 compiled version or using other IDE: I would rather not choose last option..
http://download.java.net/jdk6/6u10/promoted/b11/binaries/jdk-6u10-ea-bin-b11-linux-i586-24_jan_2008.bin
even ctrl + e focus works. Now lets hope this finally gets fixed with next JDK update.
some popups doesn't alway render (it seems like it happens randomly;-),
but reopening it few times it renders well.
IDEA 7.0.4, JDK 1.6.0_10.
sun jdk 1.6.0_10 (x86_64)
ubuntu 8.10
editor stops receiving input unexpectedly quite often. To restore input I press CTRL or ALT several (every time it is different) times. Idea 7 had no such a problem on the same jdk.
Linux Mint 6
Sun JDK 1.6_u11 installed manually
No compiz
IDEA build 9821
2. Removed Debian java jdk packages using apt-get remove sun-java6-jdk
3. Removed Debian java jre packages using apt-get remove sun-java6-jre
4. You will notice something very interesting when doing this....seems that the debian apt-get installed a java-beryl bridge, now that that is gone, I think this is the crux of the problem.
5. I also removed : AWT_TOOLKIT=MToolkit from my .bashrc (That was something I put in for beryl, but now that that is gone, I don't need it)
6. I installed a jdk from java.sun.com
7. Setup the paths (JAVA_HOME, PATH) like a good java programmer.
8. Ran IDEA.
On installing IDEA 8.1.2 9852 on Ubuntu 9.04 I was experiencing missing caret and inability to type into class files, dialogs etc on a random basis.
A restart of IDEA cleared it, but restarting every 5-10 minutes and then only getting 5-10 minutes use was annoying.
What I had done prior to running idea was:
Unset the AWT_TOOLKIT=MToolkit variable which fixes many apps problems with Compiz.
Set my IDEA_JDK and JAVA_HOME to /usr/lib/jvm/default which is a symlink I MADE to /usr/lib/jvm/java-6-sun.
Still experienced problems.
How I fixed.
I set JAVA_HOME in my idea.sh file to /usr/lib/jvm/java-6-sun INSTEAD of my symlink.
Not had any trouble since, but will update if I do.
I even have my JAVA_HOME set correctly this time. I am copying my idea.sh modifications and vmopts modifications to the RC-1 build to see if it solves the problem.
idea.sh (at the top, just after attribution notes):
AWT_TOOLKIT=""
IDEA_JDK=/usr/lib/jvm/java-6-sun
JAVA_HOME=$IDEA_JDK
idea.vmoptions:
Getting really sick of this bug, and it appears to have been around since v5.
export AWT_TOOLKIT=MToolkit in the same shell before you run idea (maybe add it to idea.sh like I suggested above)
Use a newer version of Gnome/Linux and IntelliJ.
I have had no issues since Ubuntu 10.04 and IntelliJ IDEA 9. Currently on Ubuntu 10.10 and IntelliJ IDEA 10.