Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JetBrains IDE's "Find in Files" dialog will disappear immediately after opening #96

Open
hadimostafapour opened this issue Apr 25, 2021 · 38 comments
Labels
bug Something isn't working window-management Window management issue

Comments

@hadimostafapour
Copy link

hadimostafapour commented Apr 25, 2021

Environment

Windows build number: Microsoft Windows [Version 10.0.21364.1000]
Your Distribution version: Ubuntu 20.04
Your WSLg version: 1.0.17.1

Steps to reproduce

  1. Install PHPstorm
  2. Open Project
  3. Try Find in Files... (CTRL+SHIFT+F)

WSL logs:

  • weston.log
[14:45:51.548] shell_blend_overlay_icon: app 120x120; overlay 128x128; scale 1.87x1.87
[14:45:51.548] rdp_rail_set_window_icon: original icon width:120 height:120 format:537036936
[14:45:51.548] rdp_rail_set_window_icon: converted icon width:96 height:96 format:537036936
[14:45:51.548] set_position_from_xwayland: XWM 2632, 135; geometry 32, 32; view 2600, 103
[14:45:51.570] shell_blend_overlay_icon: app 120x120; overlay 128x128; scale 1.87x1.87
[14:45:51.570] rdp_rail_set_window_icon: original icon width:120 height:120 format:537036936
[14:45:51.571] rdp_rail_set_window_icon: converted icon width:96 height:96 format:537036936
[14:45:51.586] Client: ClientGetAppidReq: pid:3134 appId:jetbrains-phpstorm
  • versions.txt
WSLg ( x86_64 ): 1.0.17+3.Branch.master.Sha.a526dfd5ad03d126bb2d8c528f6c3563e86a40da
Mariner: VERSION="1.0.20210224"
FreeRDP: e4a2fc2053bd8c5f99455fcd08ffee7e5591567a
weston: fd961f5cd116c9358d82ce94d139c1578e21bd00
pulseaudio: 2f0f0b8c3872780f15e275fc12899f4564f01bd5
mesa:

Expected behavior

By clicking on Find in Files, a new dialog appear and stay open.

Actual behavior

By clicking on Find in Files, a new dialog appears and disappears immediately.

@hadimostafapour hadimostafapour added the bug Something isn't working label Apr 25, 2021
@spronovo spronovo added the duplicate This issue or pull request already exists label Apr 25, 2021
@spronovo
Copy link
Collaborator

Thanks for your report, this one is known and currently tracked by #10. Closing as duplicate.

spronovo pushed a commit that referenced this issue Apr 26, 2021
* Use safe C, SAL and const as needed

* Change to treat warning as error

Co-authored-by: Hideyuki Nagase <hideyukn@ntdev.microsoft.com>
@spronovo
Copy link
Collaborator

re-activating this one... turned out not to be duplicate of #10.

@spronovo spronovo reopened this May 21, 2021
@spronovo spronovo removed the duplicate This issue or pull request already exists label May 21, 2021
@JYInMyHeart
Copy link

Really hope this to be fixed someday.

@hideyukn88
Copy link
Member

As @nelsonjchen pointed, I confirmed that this issue occurs on Phpstorm running on Ubuntu desktop too, thus it seems this is the issue of application rather than WSLg.

@nelsonjchen
Copy link

As @nelsonjchen pointed, I confirmed that this issue occurs on Phpstorm running on Ubuntu desktop too, thus it seems this is the issue of application rather than WSLg.

But this issue doesn't occur in non-WSLg Ubuntu (at least in VMWare)? It works fine there from both the context menu and the keyboard shortcut. Where and how should this issue have been reported? I mentioned this from #214 because this issue was much more specific to this dialog.

If this is an application issue, any suggestions on resources for debugging this and what area of Window handling differences in WSLg should a IntelliJ platform developer look at to avoid this issue?

@nelsonjchen
Copy link

Anyway, here's the counterpart issue on the Jetbrains tracker:

https://youtrack.jetbrains.com/issue/IDEA-265390

@nelsonjchen
Copy link

https://youtrack.jetbrains.com/issue/IDEA-258990

OTOH, someone has reported that does happen and without mentioning WSLg. Unfortunately, the JetBrains developer could not reproduce it.

It seems there is something that makes this happen on some configurations and not happen on others. It certainly happens with Ubuntu 20.04 WSLg but not my VMWare Ubuntu 20.04.

@nelsonjchen
Copy link

All to say, I guess this does seem to be Jetbrain's issue.

@hideyukn88
Copy link
Member

@nelsonjchen , thanks for checking. As it's shown in above video, the "find in files" window does appear momentary but the window destruction is requested by application immediately after. This issues happen across multiple IDEs from JetBbrains (such as PyCharm and Android Studio, too). While there could be issues in WSLg triggering this behavior, but at this point, I haven't found anything yet. If you notice any Jetbrains developer is pointing the possible causes for this behavior (with WSLg or not), please share with us. This is very important features in those IDEs, we would like to have it function correctly. thanks!

image

@hideyukn88
Copy link
Member

After trying several times for investigation, it works on Ubuntu 20.04 on WSLg (and it does find the keyword), but it's not clear what is the factor. We will continue to investigate this if anything in WSLg cause this, thanks!

PhpStorm.find.in.files.mp4

@hideyukn88 hideyukn88 changed the title Some dialogs will disappear immediately after opening JetBrains IDE's "Find in Files" dialog will disappear immediately after opening Jun 2, 2021
@rmarfil3
Copy link

For anyone who's looking for a temporary fix, I just hold CTRL + SHIFT + F until it stays open.

Do you guys have alternative temp fix?

@nelsonjchen
Copy link

For anyone who's looking for a temporary fix, I just hold CTRL + SHIFT + F until it stays open.

Do you guys have alternative temp fix?

I do this but make sure to pin with the pin in the top right corner of the box once it stays open once with this key combination. With the pin set, I explicitly press ESC to dismiss instead of focusing elsewhere. Holding down the CTRL SHIFT F key combination is unreliable by itself.

@rmarfil3
Copy link

For anyone who's looking for a temporary fix, I just hold CTRL + SHIFT + F until it stays open.
Do you guys have alternative temp fix?

I do this but make sure to pin with the pin in the top right corner of the box once it stays open once with this key combination. With the pin set, I explicitly press ESC to dismiss instead of focusing elsewhere. Holding down the CTRL SHIFT F key combination is unreliable by itself.

Very interesting. After I pinned it and pressed ESC, when I CTRL+SHIFT+F again, it no longer disappears immediately. This is a lifesaver, thank you!

@jonstelly
Copy link

jonstelly commented Jul 25, 2021

This could definitely be a JetBrains issue but I never had this issue with WSL and X410, get it constantly with WSLg. If I switch my display server from WSLg to x410 and back and forth, Rider always has this issue in WSLg and never has it with X410.

I'm not an expert on X/wayland, Is there any sort of diagnostic logging we could capture to help track down what needs to be fixed?

EDIT: After holding down ctrl+shift+f and pinning the find in files dialog, it now opens more reliably, which is a reasonable workaround, but having to escape to close the dialog is (ever so slightly) annoying.

@lelabo-m
Copy link

lelabo-m commented Aug 12, 2021

Why is this issue and all others referencing this problem closed?
They were originally closed because the issue was associated with #10.
But the problem still persists in WSLg 1.0.26 and #10 is closed.
Should at least this issue stay open, as it is the one with more activity on it?

@hideyukn88 hideyukn88 reopened this Aug 12, 2021
@hideyukn88
Copy link
Member

@lelabo-marc, thanks for pointing out. This issue is still outstanding and should not be close, thanks!

@rabbit-aaron
Copy link

if you press CTRL+SHIFT+F, then lock the screen by "WIN+L" then unlock, it'll appear LOL

@hideyukn88 hideyukn88 added the window-management Window management issue label Sep 15, 2021
@hideyukn88
Copy link
Member

@rabbit-aaron, thanks for tips. Currently I'm in doubt that there is some window focusing issue in WSLg. When there is focus change, "closeIfPossible()" method is executed (from JetBrains's "find" source code written in Java), and unless the dialog is in "pinned", the dialog's cancel action is executed and dialog to be closed. I'm not yet find the root cause, but I guess there might be some incompatibility in the way WSLg opens popup dialog window and that might be causing this misbehave, I will continue to look into this issue based on priority among other issues. Thank you very much for trying out WSLg!

private void closeIfPossible() {
  if (canBeClosed() && !myIsPinned.get()) {
    myDialog.doCancelAction();
  }
}

@mikecirioli
Copy link

if you press CTRL+SHIFT+F, then lock the screen by "WIN+L" then unlock, it'll appear LOL

thanks for that workaround, i was going crazy trying to get the window to stay open long enough to pin it!

@jukibom
Copy link

jukibom commented Oct 11, 2021

Just dropping in to say that the exact same WSL2 ubuntu vhdx image exhibits this problem with WSLg but not Xming.

(@nelsonjchen the pin workaround is genius, thank you!)

@goblinbr
Copy link

Same problem here with windows 11

@w93163red
Copy link

w93163red commented Oct 15, 2021

same problem in 1.0.29-preview build

@ferstar
Copy link

ferstar commented Oct 18, 2021

Same problem here with windows 11/wslg 1.0.28-preview build

(@nelsonjchen the pin workaround is genius, thank you!)

@idanz
Copy link

idanz commented Oct 30, 2021

Still happens

@emrahkaya
Copy link

Same here. It just pops up and then disappears. If I press Ctrl+shift+F and manage to click to text field in the Find window (pressing all several times:) ) the windows stays.
The behaviour is similar to clicking the main window after the pop-up window appears.

@emrahkaya
Copy link

The current workaround is to first stop the Find window from disappearing (as I mentioned above), then pin the window using the pin button. Now the window will stay, and when you are done with the search, just press Esc, and it will go away.

@rsegeda
Copy link

rsegeda commented Nov 9, 2021

Very annoying issue. Same for all pop-up windows from within JetBrains. (Win 11). For me, it sometimes works, and sometimes I can't open it all. Besides, the entire RDP connection seems to disappear occasionally. So it looks like a connection stability problem and the lack of handling the issues/ glitches. It's often when my WSLg becomes unresponsive at all. Killing the WSL is what helps, but you can't work like that.

@dangaogit
Copy link

I found a temporary solution in this problem issue/IDEA-265390

Maarten Vliegenthart commented 18 Oct 2021 12:06
After a lot of tries the window will stay open. What I did is just hold the control + shift + f keys for a couple of seconds, till the windows stays open. Then pin the window in the upper right corner, and now the problem is gone!

@rabbit-aaron
Copy link

Seems like there's still not a great resolution.

I've resorted to using vcxsrv instead of the WSLg

@Gabrola
Copy link

Gabrola commented Feb 4, 2022

Looks like pop OS had a similar issue and fixed it

pop-os/shell#1312
pop-os/shell#1322
pop-os/shell#1314

@fr-an-k
Copy link

fr-an-k commented Feb 8, 2022

The workarounds didn't work for me. With the Windows lock workaround a different kind of search dialog appears, not "find in files". With "view -> tool windows -> Find" you just get a tab that says "Nothing to show".
I'll have to find another program because my whole job has completely stalled.

@flashflexpro
Copy link

please please fix this one!

@matt-carr
Copy link

https://youtrack.jetbrains.com/issue/IDEA-265390 -- Issue appears to be fixed in IntelliJ EAP 2022.1

@sascha-andres
Copy link

https://youtrack.jetbrains.com/issue/IDEA-265390 -- Issue appears to be fixed in IntelliJ EAP 2022.1

I have tested with the EAP and it seems to work for me

@ferstar
Copy link

ferstar commented Feb 24, 2022

https://youtrack.jetbrains.com/issue/IDEA-265390 -- Issue appears to be fixed in IntelliJ EAP 2022.1

I have tested with the EAP and it seems to work for me

Works fine for me too

@epiciskandar
Copy link

https://youtrack.jetbrains.com/issue/IDEA-265390 -- Issue appears to be fixed in IntelliJ EAP 2022.1

Does anybody know when this would merged to Android Studio? I don't know where to find this information(yes, after googleing).

@speller
Copy link

speller commented Jan 8, 2024

https://youtrack.jetbrains.com/issue/IDEA-265390 -- Issue appears to be fixed in IntelliJ EAP 2022.1

I'm still facing this issue in PHPStorm 2023.3.1 It has been never fixed for me. Any dialog may be not visible. I usually press Esc and try the dialog again. Max 3 tries and it appears on the screen. The dialog window is actually there and I can click on its controls. If I can trigger some UI changes in the window like resizing, it gets rendered. I always can click on the dialog window to ensure it's in focus and press Esc to close the dialog and try again.

Popup menus are also sometimes not rendered.

@eric-gitta-moore
Copy link

Seems like there's still not a great resolution.

I've resorted to using vcxsrv instead of the WSLg

Sorry to interrupt. I tried vcxsrv as reviewed, and yes, it works well, but the browser doesn't seem to have hardware video decoding (chrome://gpu).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working window-management Window management issue
Projects
None yet
Development

No branches or pull requests