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
  • Created by   Stephen Scaringi
    6 years ago (01 Sep 2005 18:42)
  • Updated by   Antony Jones
    14 months ago (03 Mar 2011 13:52)
  • Jira: IDEADEV-2359
    (history, comments)
 
IDEA-30053 Can't type in editor using 5.0.1 and Linux
39
Issue is visible to: All Users
  The issue is visible to the selected user group only
After upgrading to 5.0.1, the editor will frequently stop accepting text input – typing characters into a file. It looks like the editor still has focus, the cursor is blinking in the editor tab, but you can't type any text into the file. Other keyboard actions, cursor movement keys, ctrl-z, etc., still work.

I'm only seeing this on my linux box. 5.0.1 appears to work fine on my Windows machine.

Environment: RHEL 3 with KDE 3.4
Comments (98)
 
History
 
Linked Issues (?)
 
Keith Lea
  Keith Lea
01 Sep 2005 20:12
6 years ago
A coworker sees this too. In his case, all text input goes to another tool window, not the focused window.
Paulo Alexandre N. Traça
  Paulo Alexandre N. Traça
01 Sep 2005 23:25
6 years ago
I have seen this too. Whenever a change the editing tab or the IDEA window looses focus, when i return to the editor the text dosent appear. If a remove the focus from the idea window and then return it, the text appears.

I'm using linux FC3, jre 1.5.0 and kde 3.4
Thomas Hartwig
  Thomas Hartwig
01 Sep 2005 23:41
6 years ago
For me the same problem since the new build #3461. I use KDE with focus follows mouse. If I focus to an other window and focus back the idea window the blindly typed keys appear in the editor.
Changing "idea.popup.weight" to medium does not help either.
Thomas Hartwig
  Thomas Hartwig
02 Sep 2005 02:14
6 years ago
Perhaps this JDK related like some other bugs. What JDK are you using? I have upgraded to jdk1.5.0_04 now and will test it tomorrow.
Stephen Scaringi
  Stephen Scaringi
02 Sep 2005 17:27
6 years ago
I was using jdk 1.5.0_02. I upgraded to 1.5.0_04, but that didn't help the problem.
Robert Hopwood
  Robert Hopwood
11 Sep 2005 19:13
6 years ago
I experienced the same symptoms. Build 3641, Redhat EL 3, JDK 1.5.0_02.
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.
Niklas Herder
  Niklas Herder
20 Oct 2005 11:12
6 years ago
I'm using JDK 1.5.0_05, Gentoo Linux, and also have this problem.
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.
Thomas Hartwig
  Thomas Hartwig
04 Nov 2005 19:16
6 years ago
The problem did not occure any more at my work. Because it was hard to reproduce I can not say since when, but now I'm using build 3542 and did not have this problem for more than 2 weeks.
Niklas Herder
  Niklas Herder
10 Nov 2005 14:30
6 years ago
I'm still having the same problem, with 3542, so the problem hasn't gone away.
Niklas Herder
  Niklas Herder
29 Nov 2005 13:19
6 years ago
I get the feeling that the problem occurs more frequently when I'm attached to a remote debugging session via IDEA. Also, the remote debug never manages to detach from a session that's been terminated manually.
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.
Nadia Robertson
  Nadia Robertson
29 Nov 2005 13:31
6 years ago
I am running IntelliJ build 3542 under Gnome, and have the same problem.
Jeff Turner
  Jeff Turner
01 Dec 2005 07:53
6 years ago
I've frequently had this problem editing JSPs (to the point I hardly bother trying any more, and switch immediately to vim), and occasionally with Java files, so file type/syntax may affect this.
Marcus Brito
  Marcus Brito
17 Dec 2005 15:22
6 years ago
I've seen this too, long before 5.0.1 (long before 5.0, actually). My guess is that this is a VM/Swing problem.
ben tompkins
  ben tompkins
18 Dec 2005 07:06
6 years ago
I've experienced this problem as early as 4.x/rh9 and continue to do so on 5.02/rhas 3.
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.
Lars Clausen
  Lars Clausen
19 Dec 2005 14:22
6 years ago
I have this too under RedHat EL3, kernel 2.4.21, XFree86 v. 4.3, Metacity v. 2.4.55, IDEA build 3542. I suspect a window manager interaction issue.

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.
Stephen Scaringi
  Stephen Scaringi
19 Dec 2005 19:00
6 years ago
I've upgraded to 5.0.2 and jdk 1.5.0_05, and this seems to have resolved the issue for me. I haven't seen the focus bug since the upgrade.

RHEL: 2.4.21-27.0.1ELsmp
KDE: 3.4.3-1.1.el3.kde
Lars Clausen
  Lars Clausen
20 Dec 2005 13:22
6 years ago
Confirmed, that does indeed cure the problem. Wish I knew why:)
Konstantin
  Konstantin
03 Feb 2006 22:55
6 years ago
It seems to be related to floated panels, when cursor has disappeared I 'unfloated' project panel where it seemed to stuck and then made it floating again. Cursor has appeared in the editor.

Seems like simpler solution than restarting
Niklas Herder
  Niklas Herder
07 Feb 2006 18:05
6 years ago
I just downloaded IDEA 5.1, believing this issue to be resolved, but it isn't...
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.
Jeff Turner
  Jeff Turner
20 Feb 2006 12:43
6 years ago
Same here using IDEA 5.1 + JDK 1.5.0_06. When the focus is lost (1-2 times a day) the switch-windows and unfloat tricks don't help, and I have to restart.
Luca Botti
  Luca Botti
23 Feb 2006 04:33
6 years ago
Add my comment here, Linux Gentoo, KDE 3.5.1, IDEA 5.1 + jdk 1.5.0_06. Suddenly, the cursor does not appear anymore. I can write, but without a cursor position.

Restarting does not help
Darryl Anderson
  Darryl Anderson
24 Feb 2006 01:35
6 years ago
Same problem here:
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.)
Christoffer Hammarström
  Christoffer Hammarström
09 Mar 2006 19:33
6 years ago
Why is this issue marked as Resolved?

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.
Christoffer Hammarström
  Christoffer Hammarström
10 Mar 2006 13:51
6 years ago
Could it be http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4851685 or any of the bugs related to it?
Per Leine
  Per Leine
20 Apr 2006 15:11
6 years ago
I still experience the problem with 5.1.1(since 5.0), using KDE 3.3.2, i've tested on different platforms getting excatly the same problem. it often appears after fast typing/cursor movement: The blinking cursor disapperas when in the editing widnow, and no characters can be entered, but the "line marker" can be moved with the mouse (similar to opening a read-only file). The top menu can not be accessed using keyboard shortcuts, but can be opened with the mouse. If opening a dialog (e.g. search),
Renzo
  Renzo
21 Apr 2006 14:43
6 years ago
I`m using 5.1.1 and I experience the same problem (since 5.0):

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.
David M. Lloyd
  David M. Lloyd
19 May 2006 21:44
6 years ago
I also see this problem frequently... sometimes unfloating panes fixes it, sometimes not.

Anyone have any workaround at all for this?
Konstantin Sobolev
  Konstantin Sobolev
05 Jun 2006 04:22
5 years ago
I've tried 1.5.0_07 and 1.6.0-beta2-b84 together with idea-4247 and different WMs: fluxbox, kwin, sawfish, twm. Problem exists in all combinations, but in a less critical form: focus is gone almost always after some popup (like layout code or introduce variable dialog) is shown and then closed, but it can be restored by left-clicking the main window. It is still quite annoying and I've hacked up a sawfish script which forces focus return in such situations. Email me if you need it (konstantin[dot]sobolev[at]gmail[dot]com).
Christoffer Hammarström
  Christoffer Hammarström
07 Jun 2006 15:36
5 years ago
Focus losing is standard, and although annoying, something you can cope with.

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.
Jeff Turner
  Jeff Turner
08 Jun 2006 04:45
5 years ago
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.
Christoffer Hammarström
  Christoffer Hammarström
08 Jun 2006 12:32
5 years ago
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.


Thank you for your valuable input. Now if you scroll up to my comment dated march 9th, you'll find the details you need.
Kamil Podlešák
  Kamil Podlešák
08 Jun 2006 12:54
5 years ago
bq. 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.


I had this problem with every JDK 1.5.0 I tried: 01, 02, 04, 06. No difference.
Christian Sarrasin
  Christian Sarrasin
08 Jun 2006 15:31
5 years ago
I stumbled on this IDEA bug report courtesy of Google. I don't use IDEA but wanted to contribute something that may be useful in pointing to the root cause of the problem.

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.
Niklas Herder
  Niklas Herder
08 Jun 2006 15:42
5 years ago
I've run IDEA with the 1.5.0_07 JDK, and the bug is still there.
IDEA 5.1.1, JDK 1.5.0_07, current Ubuntu (Dapper).
Keith Lea
  Keith Lea
08 Jun 2006 22:19
5 years ago
Yes, this happens to me on 5.0u6
sadik
  sadik
18 Jul 2006 21:29
5 years ago
I have the same problem with all versions of IDEA 5.x on a RH system with JDK 1.5.0_02-b09. Symptoms are; when you navigate to another class you loose focus, and if you have more than one instances of IDEA running, your typings go to the other instance of IDEA. I'm also using JBuilder 2006 and Eclipse 3.2 on the same computer. I never met such a problem with Eclipse but same problem happened in JBuilder 2006 when I was trying to create new packages or classes using the small pop-up windows. JBuilder does not react to any keyboard input in these small pop-ups anymore. Why I'm writing this here is because, this kind of behaviour is common to both IDEs and it may be a Java bug not IDEA.

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.)
Christian Sarrasin
  Christian Sarrasin
18 Jul 2006 21:51
5 years ago
bq. Why I'm writing this here is because, this kind of behaviour is common to both IDEs and it may be a Java bug not IDEA.

This is consistent with my previous comment. I'd say it's a Swing bug rather than Java. Eclipse uses SWT...
Konstantin Sobolev
  Konstantin Sobolev
02 Sep 2006 23:49
5 years ago
I've stumbled upon the "light version" of this bug again when I decided to switch away from sawfish to ion3 WM.
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..
Keith Lea
  Keith Lea
19 Sep 2006 00:31
5 years ago
This affects me and almost everyone I work with. It happens to me several times per week and requires restarting IDEA and reopening all projects. It wastes lots of my time. I think it should be marked for demetra final.
Exception Robot
  Exception Robot
10 Oct 2006 19:27
5 years ago
I have just moved this issue to the Next Version. This is not because we do not care, but because we still cannot reproduce the problem.

We are going to focus on reproducing this right after 6.0.2. This is all I can promise for now.
Niklas Herder
  Niklas Herder
10 Oct 2006 21:25
5 years ago
I've run JDK 1.5.0_08 for a few weeks now, and I haven't seen the problem so far. I would guess that it's a Swing bug that's been fixed with the -08 release.

Does anyone still have this problem with the latest SDK?
Per Leine
  Per Leine
10 Oct 2006 22:12
5 years ago
I.ve encountered it a few times with JDK 1.5.0_08 on Linux kernel 2.6.15-27-386, Ubuntu dist. with KDE. But so far, I have never encountered it with Idea 6.0. I'll post if I see it in 6.0.
Venkat Sonnathi
  Venkat Sonnathi
11 Oct 2006 07:55
5 years ago
One or my colleagues was having this problem with RHEL 3 and JDK 1.5.0 and after upgrading the JDK 1.5.0_08 the problem went away.

Regards,
--Venkat.
Nadia Robertson
  Nadia Robertson
11 Oct 2006 18:33
5 years ago
I've upgraded my JDK and still experience the problem with Idea 6.0.1 using Linux - It is such a shame this has gone on so long... I've just paid money to upgrade my licence for another year, but still have a buggy product - I keep typing into the wrong file (the cursor appears to be in the tab that I have selected, but is actually editing the file in the next tab to the right. I have to close all tabs except the tab I am editing in order to get the correct cursor focus)

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.
Thomas Hartwig
  Thomas Hartwig
11 Oct 2006 19:02
5 years ago
I had the same problem, but for me it has gone with Fedora Core 5 + KDE 3.5.4 + JSE >= 1.5.0_07, unfortunately I can not be more specific when it vanished because it happened not so often.
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
Araz
  Araz
13 Nov 2006 10:10
5 years ago
the problem is solved using JDK 1.5.0_06
Kåre Fiedler Christiansen
  Kåre Fiedler Christiansen
13 Nov 2006 13:35
5 years ago
Here's an interesting observation: I haven't seen that issue for a long time, but due to another problem I just tried running with AWT_TOOLKIT=MToolkit
(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
Christoffer Hammarström
  Christoffer Hammarström
13 Nov 2006 14:17
5 years ago
Congratulations. I still have this problem with Java 1.5.0_08.
David M. Lloyd
  David M. Lloyd
13 Nov 2006 18:31
5 years ago
It's much more helpful to give JDK versions where you DO have the problem, than it is to say that the problem is fixed with JDK XYZ, since it's a randomly-occuring problem, and just becuase it hasn't happened doesn't mean it WON'T happen. On the other hand, if it DOES happen, that's a useful fact.
Per Leine
  Per Leine
13 Nov 2006 23:02
5 years ago
A (maybe, or is this another issue?) related problem I rather often encounter with JDK 1.5.0_08 on kernel 2.6.15-27-386, Ubuntu "edgy" as well as "dapper" dist with KDE is that when dialogs are opened (such as rename or search), the dialog is immediately "rolled up" so that I only see the top bar. The dialog can no be rolled back using any of the "shade" or "restore" selections, the only way out is to close using the top-right close button and re-opening.
Niklas Herder
  Niklas Herder
13 Nov 2006 23:58
5 years ago
I had this problem with KDE in edgy, but it seems to have disappeared since I switched to Gnome as my DE.
Sometimes the dialog could be unrolled by clicking quickly on the title bar, but not always.

No idea if it's related, though.
Andreas Rehn
  Andreas Rehn
20 Nov 2006 17:48
5 years ago
I'm afraid I have to complicate this even further... I am experiencing the same problem but on Windows XP SP2. Am I the only one that have this problem on win? From all the comments I can come to no other conclusion that it is the same problem. Every now and then the focus dispapears and IDEA stop accepting keyboard input but the mouse works ok. Sometimes not all keybord input stops working but only certiain keys like "return", "arrows" and "spacabar". I have not had this problem with any other pgm (including java/swing) on my machine so to me it is clearly a idea problem. I have tried everything but the only thing that seams to help is a restart... some days it works fine but other days (like today) I have to restart every 10min or so. I have tried all official IDEA 5.x versions and 6.x versions (with the bundled jre's) and have the same problems with all.
Kenji Matsuoka
  Kenji Matsuoka
21 Nov 2006 05:11
5 years ago
I lose keyboard input about 50% of the time after pressing Alt-F7. However, if I select Find Usages from the main menu, or from the context menu, it doesn't happen. Other dialogs don't seem to cause this problem for me.

My config:

Fedora FC4 + Gnome
JDK 1.5.0_09
IDEA 5.1.2
Kenji Matsuoka
  Kenji Matsuoka
21 Nov 2006 05:41
5 years ago
Here are debug logs from the two cases I described in my last comment. The main difference in the BAD (Alt-F7) case seems to be these lines:

nSystem.impl.ActionManagerImpl - enter: getAction(EditorChooseLookupItem)
nSystem.impl.ActionManagerImpl - enter: getAction(NextTemplateVariable)
nSystem.impl.ActionManagerImpl - enter: getAction(EditorEnter)
Andreas Rehn
  Andreas Rehn
21 Nov 2006 16:48
5 years ago
Was running with debug loggin and I noticed this about the same time my IDEA lost focus:
Andreas Rehn
  Andreas Rehn
21 Nov 2006 16:49
5 years ago
sorry... here it comes:

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()
Kenji Matsuoka
  Kenji Matsuoka
21 Nov 2006 23:29
5 years ago
Just curious, is anyone else using SCIM? I haven't had to restart IDEA since I killed SCIM.
Kenji Matsuoka
  Kenji Matsuoka
23 Nov 2006 03:47
5 years ago
SCIM was definitely the problem for me! I can reproducibly make IDEA stop responding to keyboard input by pressing Alt-F7 while SCIM is running. Killing SCIM makes IDEA start responding to the keyboard again.

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.
Christoffer Hammarström
  Christoffer Hammarström
24 Nov 2006 13:57
5 years ago
I don't have anything running that is called SCIM, and i'm still having this problem.
Alexander Chernikov
  Alexander Chernikov
24 Nov 2006 22:42
5 years ago
Related issue IDEA-35572: seems that it is one of possible existing defects, steps to reproduce are defined.

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?
Tim
  Tim
09 Jan 2007 01:53
5 years ago
java version "1.5.0_08"
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.
Regis Desgroppes
  Regis Desgroppes
13 Feb 2007 16:28
5 years ago
I have the same problem. Some more details :

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
Nadia Robertson
  Nadia Robertson
13 Feb 2007 17:18
5 years ago
After months (or is it years?) I have finally resolved it on both my Linix machines (Fedora 5, Gnome 2.14.0 Desktop, IDEA 6.0.4 build #6148).

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 :-)
Dinky Pumpkin
  Dinky Pumpkin
04 Apr 2007 22:55
5 years ago
Alas, using JDK 1.6.0 doesn't solve this problem on my machine.

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
Dinky Pumpkin
  Dinky Pumpkin
17 Apr 2007 16:43
5 years ago
It turned that SCIM (1.4.4) was my problem as well. Killing SCIM also fixed the similar problem with Netbeans.
Mark Petrovic
  Mark Petrovic
08 Sep 2007 00:48
4 years ago
Yes, NetBeans users see the same loss of focus. I've seen it many times in NB while reformatting code or fixing imports. A JDK bug was recently filed by a NB user with regard to this issue:

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
Ari Paartola
  Ari Paartola
11 Sep 2007 13:44
4 years ago
Same problem again with IDEA-7126 with 1.5.0_11 in Kubuntu
Mark Petrovic
  Mark Petrovic
11 Sep 2007 17:28
4 years ago
Because this jdk bug (presumably) is triggered by common actions, such as reformatting code and sometimes just building a project, perhaps the IDE should not put up new, essentially superfluous dialogs during build and reformats that trigger this bug.

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.
Regis Desgroppes
  Regis Desgroppes
15 Oct 2007 12:12
4 years ago
While I have no reason to put in doubt this is a JDK bug, I state Intellij IDEA is the only Java application on my box that losts of focus.
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
Daniel Hinojosa
  Daniel Hinojosa
23 Oct 2007 02:28
4 years ago
I got a workaround, just need a verification...

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.
Mr Jones
  Mr Jones
21 Nov 2007 07:01
4 years ago
Daniel,

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.
Daniel Hinojosa
  Daniel Hinojosa
21 Nov 2007 08:21
4 years ago
Mr. Jones, it may be that you have to turn off all Compiz based support.
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.
Mr Jones
  Mr Jones
24 Nov 2007 01:22
4 years ago
Daniel,

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.
Mr Jones
  Mr Jones
28 Nov 2007 01:28
4 years ago
Upgrading Linux had no affect

Upgrading to IJ7.1 fixed the problem I was experiencing.
M.Milicevic
  M.Milicevic
11 Jan 2008 21:07
4 years ago
any news on this?
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.
M.Milicevic
  M.Milicevic
24 Jan 2008 21:27
4 years ago
FYI: working with 1.5 version works (for me), but dan I have to disable too many plugins (which are compiled for 1.6).
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..
Bas Leijdekkers
  Bas Leijdekkers
24 Jan 2008 22:21
4 years ago
Ironically choosing another IDE might not help: http://www.netbeans.org/issues/show_bug.cgi?id=119617
M.Milicevic
  M.Milicevic
24 Jan 2008 22:26
4 years ago
well, my coworker, with same setup doesn't have those problems with netbeans (he does hav rendering issues, but no keyboard issues). Those rendering issues mostly are sporadic and go away when called again. So, there are issues but not same as within Idea
M.Milicevic
  M.Milicevic
24 Jan 2008 22:31
4 years ago
There is (at least) one issue with 1.5 compiled version: if you bring up recent files (CTRL +E) focus is still within editor, so you have to pivk up file with mouse click. Other than that it works..
M.Milicevic
  M.Milicevic
24 Jan 2008 22:32
4 years ago
and Bas there's always that dark side of the sun called eclipse ..shiver.. ;-)
Christian Sarrasin
  Christian Sarrasin
24 Jan 2008 22:43
4 years ago
Indeed, as pointed out previously (http://www.jetbrains.net/jira/browse/IDEADEV-2359#action_52005), Eclipse is not affected by this issue - this really seems to be a Swing issue...
M.Milicevic
  M.Milicevic
28 Jan 2008 21:05
4 years ago
ok. it seems all problems are gone with:

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.
M.Milicevic
  M.Milicevic
06 Feb 2008 22:07
4 years ago
just one glitch when using above jdk:
some popups doesn't alway render (it seems like it happens randomly;-),
but reopening it few times it renders well.
Niklas Herder
  Niklas Herder
12 Nov 2008 00:33
3 years ago
Haven't had any problems for a few months, so as far as I'm concerned this one is fixed.

IDEA 7.0.4, JDK 1.6.0_10.
Mr Jones
  Mr Jones
12 Nov 2008 00:46
3 years ago
I concur. Can't remember what upgrade it appeared to be fixed in. Might have been using OpenJDK?
Sergey Artuh
  Sergey Artuh
26 Nov 2008 12:56
3 years ago
idea 8 (build 9158)
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.
Gennady Krizhevsky
  Gennady Krizhevsky
26 Apr 2009 05:22
3 years ago
I have similar problem with Idea 8.1 build 9732 on Ubuntu 8.10 (GNOME). If I start debugger with upper button (right below the menu) - functional keys stop working. If you stop debugger after that - no keys work at all. The only way to restore functionality - to click on lower tabs (Debug, TODO, Version Control). Only several clicks help - one is never enough.
Gennady Krizhevsky
  Gennady Krizhevsky
26 Apr 2009 18:49
3 years ago
Just tried Idea 7.0.5 build 7971 on Ubuntu 8.10 (GNOME). Exactly the same problem. Real productivity destroyer.
opticyclic
  opticyclic
27 Apr 2009 00:55
3 years ago
Following Daniel Hinojosa's instructions above seems to fix the issue for me
Linux Mint 6
Sun JDK 1.6_u11 installed manually
No compiz
IDEA build 9821

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.
Gennady Krizhevsky
  Gennady Krizhevsky
27 Apr 2009 05:52
3 years ago
I had nothing of beryl except for the leftover - AWT_TOOLKIT. Removed it - the problem seem to go away. Keep my fingers crossed - thanks.
Antony Jones
  Antony Jones
20 May 2009 20:21
3 years ago
Here's how I fixed mine.

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.
Antony Jones
  Antony Jones
29 Jun 2009 16:07
2 years ago
Just trying IDEA 9 RC-1. Same problem as I had with IDEA 8.2 (just above).

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.
Antony Jones
  Antony Jones
29 Jun 2009 17:36
2 years ago
Fixed once again (in v9) by making the following modifications to:

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:

  • Xms512m
  • Xmx1024m
  • XX:MaxPermSize=256m
  • ea
Antony Jones
  Antony Jones
30 Jun 2009 13:34
2 years ago
Just to let you know that the above did not work for long in v9. I managed about a days use but I am unable to enter text again today.

Getting really sick of this bug, and it appears to have been around since v5.
Chuck Canning
  Chuck Canning
07 Dec 2009 23:41
2 years ago
I used to have this problem until jdk1.6.0_14 was released from Sun. before that, I had to use a non-sun JVM.
Luisa Lu
  Luisa Lu
03 Mar 2011 10:53
14 months ago
Does the fix require using some specific JDK or no? Using 95.627 and still happening!
Thomas Hartwig
  Thomas Hartwig
03 Mar 2011 11:43
14 months ago
I did not have this bug since several versions now. It is most likely related to a mixture of window manager and JDK. I successful use Idea with KDE 3.4 and JDK 1.6-20. I install the JDK for myself and use a special startup script for idea to set the correct path environment.
Antony Jones
  Antony Jones
03 Mar 2011 13:52
14 months ago
It can still occur if you have an old version of Compiz. You can either:

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.