0

I've been using jedit for a few years. I installed it (not recently) with server mode so that jedit-server starts each time my OS starts.

I'm using windows 7 and java 1.8.0_111 and I recently noticed the random lack of jedit system tray icon. By random I mean from time to time (maybe one out of ten times, no obvious periodicity), after windows starts, the system tray icon is not visible.

I usually click on the system tray icon to open a new jedit window. As the system tray icon was missing I tried to launch it manually: programs > jedit > jedit and no window was displayed.

I checked processes and found that the jvm is actually launched but no window is displayed, very odd.

Is there someone with the same issue, a fix or a workaround?

FYI, I did not change jedit or java version recently.

yohann.martineau
  • 1,523
  • 1
  • 17
  • 24

2 Answers2

4

If jEdit does not come up you maybe have a stale server file in your settings directory that points to a port that some process listens on but does not respond how jEdit expects. Unfortunatley up-to-now this situation is not handled too nice by jEdit, as it can end in waiting for an answer forever. So if you find jEdit not coming up, have a look at activity.log in the settings directory to see whether some error is logged, and try deleting the server file from the settings directory after killing the jEdit process and before restarting it.

Vampire
  • 35,631
  • 4
  • 76
  • 102
  • thanks a lot! you are right. FYI I checked the activity.log and nothing was written in this file when I launched it with the issue (even with parameter -log=9). I deleted %APPDATA%\jedit\server and it worked. I checked the port number, it seems to be 49163, I have my vpn client (checkpoint endpoint) using port 49157 to 49160 and another IT service process using ports 49161, 49162, 49165 and 49166. I guess there was something wrong when the jedit service tried to start. I just find it odd that it mixes with other sockets. Thanks a lot anyway! – yohann.martineau Dec 11 '16 at 21:59
  • Well, when jEdit starts, it opens a random port that is free and writes the port to the `server` file for subsequent processes to be able to connect to the running instance. Now if jEdit crashes or you kill it, or your Windows crashes while jEdit is running or something like that, you may have a stale `server` file. If now another process listens on this port accidentally and does not respond on the connection, jEdit sits there and waits. Some timeout or similar should be implemented, it just was not done yet. If connection fails on the port, the stale file is recognized and ignored. – Vampire Dec 12 '16 at 00:21
0

Actually, I found a workaround, if you start jedit manually from command line using the "noserver" option, the jedit window is displayed as expected:

C:\Program Files\jEdit>java -jar jedit.jar -noserver

It probably means there is something wrong with jedit-server start process or at least with the communication between jedit client and server. I did not found what yet, but at least it gives a workaround!

yohann.martineau
  • 1,523
  • 1
  • 17
  • 24
  • You should NOT do that actually. This allows to run jEdit two times on the same settings directory which it up-to-now does not handle very nicely, but can result in strange behaviour and not saved settings changes, but in an unobvious way. – Vampire Dec 11 '16 at 19:37