[Github-comments] [geany/geany] [Bug] Geany sometimes launches files in a new window, after external monitor disconnected/reconnected (#2555)

alexnerd123 notifications at xxxxx
Wed Jul 22 13:51:35 UTC 2020


When I disconnect/reconnect external monitors, most programs jitter for a second. Thats annoying, but normal. Sometimes (tho not always), geany will crash. Thats annoying (especially if I had unsaved documents), but ya know, stuff happens. 

This is where it gets interesting.

When I relaunch geany, it will have the last-known set of files open (as of the last time I launched geany, which may have been several days earlier, if i've had it running for several days. Any files I've opened since then, are not remembered when I relaunch geany. In other words, when it crashes, it looks like it can't save its known-files, and defaults to the last-known good files). If I try to open another file while geany is open (double click in windows explorer, clicking on the firefox downloads button, or even typing "geany.exe somefile.txt" on the shell, with and without the -i option), geany will launch an entirely new instance, with that same last-known set of files, plus somefile.txt. If I try to launch a 3rd file, again, that original set of files, + 3rdfile.txt. What I want to happen, is that geany uses a single instance, and opens the file in a new tab. 

I suspect that when geany initially crashes, it doesn't clean up properly, and when I relaunch it, it stumbles. No combination of closing, killing, force-killing, taskmanager-ing, ProcessExplorer-ing (3rd party Task Manager replacement), powershelling, etc, seems to resolve it. 
Restarting explorer.exe does not fix it
Logging out and back in to Windows (with or without restarting the OS) DOES fix it, although its a huge hassle.

After the initial crash, after I restart geany, "geany.exe --list-documents" returns no documents, even tho I have an instance open with several documents open. This could be related. I'm happy to look for a straggling socket file (if I know where to look), etc. 

```
PS C:\Program Files (x86)\Geany\bin> ps

Handles  NPM(K)    PM(K)      WS(K)     CPU(s)     Id  SI ProcessName
-------  ------    -----      -----     ------     --  -- -----------
-> omitting irrelevant results <-
    371      28    14324      36092      13.55  48564   6 geany
PS C:\Program Files (x86)\Geany\bin> .\geany.exe --list-documents
PS C:\Program Files (x86)\Geany\bin>
```


I've been a huge fan of geany for over a decade. I'm thrilled to pieces to help troubleshoot, pull logs, run tests, etc.

I'm on windows 10, Geany 1.36. 

"geany.exe -v" (lowercase v) returns this

```
Geany: Failed to connect to IPC socket (127.0.0.1:49876): 10061: No connection could be made because the target machine actively refused it.
Geany: Geany 1.36, English_United States.1252
Geany: GTK 2.24.32, GLib 2.60.6
Geany: System data dir: C:\Program Files (x86)\Geany\data
Geany: User config dir: C:\Users\av185120\AppData\Roaming\geany
Geany: System plugin path: C:\Program Files (x86)\Geany\lib\geany
Geany: Added filetype Arduino (61).
Geany: Added filetype Clojure (62).
Geany: Added filetype CUDA (63).
Geany: Added filetype Cython (64).
Geany: Added filetype Genie (65).
Geany: Added filetype Graphviz (66).
Geany: Added filetype Groovy (67).
Geany: Added filetype JSON (68).
Geany: Added filetype Kotlin (69).
Geany: Added filetype Nim (70).
Geany: Added filetype Scala (71).
Geany: Added filetype Swift (72).
Geany: Added filetype TypeScript (73).
GLib-GIO: _g_io_module_get_default: Found default implementation winhttp (GWinHttpVfs) for â?~gio-vfsâ?T
Geany: IPC socket could not be created, see Help->Debug Messages for details.
Geany: Loaded:   C:\Program Files (x86)\Geany\lib\geany\splitwindow.dll (Split Window)
Geany: C:\Users\av185120\Documents\notes\notes.txt : None (UTF-8)
-> A whole bunch of files I have open -<
```

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany/issues/2555
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.geany.org/pipermail/github-comments/attachments/20200722/7e0ca72c/attachment-0001.htm>


More information about the Github-comments mailing list