Closed clayjstanek closed 1 month ago
Hi @clayjstanek thank you for the feedback! Could it be possible for you to check if running Spyder with the --no-web-widgets
helps? Not totally sure what could be happening here but the QGLXContext
message there points to some kind of issue with OpenGL and in the past I think some of those issue have been related with QtWebEngine
based widgets.
Let us know if the info above helps!
I have the exact same problem and no, --no-web-widgets
doesn't help. Only --reset
before each new start helps. I am also running spyder 5.4.3 on Ubunto 22.04 with WSL2.
Thank you for trying the flag @aabdulaal ! Could you then try to run spyder with the --safe-mode
flag? That launches Spyder always with default non-persistent config. Maybe the problem comes from the code that loads the window state saved when closing Spyder? :thinking:
Could it be possible for you to change this part of the Spyder code:
To be something like:
hexstate_valid = False
Let us know if something of the above helps!
@dalthviz I edited plugin.py as you suggested and it appears to have prevented the problem for me. I've started it multiple times since the edit without problems.
@dalthviz, what should we do about this one?
Not sure if there is a way to try the code without it ending in a segmentation fault. Maybe adding an option to prevent saving the hex state or using it could help this specific setup (Spyder + WSL2). Also, not sure why this is happening, maybe is a more general issue/incompatibility between the display system WSL2 uses and Qt? 🤔
Perhaps we can validate if the hex state is valid before trying to load it? I don't know if that's possible though.
I have a similar issue. I am running:
under WSL2:
WSL version: 2.0.9.0 Kernel version: 5.15.133.1-1 WSLg version: 1.0.59 MSRDC version: 1.2.4677 Direct3D version: 1.611.1-81528511 DXCore version: 10.0.25131.1002-220531-1700.rs-onecore-base2-hyp Windows version: 10.0.22631.2715
When I initiate Spyder (Spyder --reset) everything works fine.
On a second start, just calling Spyder, I usually get mouse control but everything is shifted by a couple lines. (I have to click above the line and to the left of anything I want to highlight).
On subsequent startups I lose all mouse control and need to use keyboard shortcuts to function.
I have recently tried calling 'Spyder --no-web-widgets' and this seems to have corrected the issue for me (calling Spyder without qualifiers). However, I do get the warning:
QStandardPaths: wrong permissions on runtime directory /run/user/1000/, 0755 instead of 0700 fromIccProfile: failed minimal tag size sanity
but it does not seem to effect the usage of spyder.
I have recently tried calling 'Spyder --no-web-widgets' and this seems to have corrected the issue for me (calling Spyder without qualifiers).
That's great! Thanks for letting us know about it.
However, I do get the warning:
QStandardPaths: wrong permissions on runtime directory /run/user/1000/, 0755 instead of 0700 fromIccProfile: failed minimal tag size sanity
but it does not seem to effect the usage of spyder.
Don't worry, those are harmless warnings.
Hello,
I am running
under WSL: Versión de WSL: 2.1.5.0 Versión de kernel: 5.15.146.1-2 Versión de WSLg: 1.0.60 Versión de MSRDC: 1.2.5105 Versión de Direct3D: 1.611.1-81528511 Versión DXCore: 10.0.25131.1002-220531-1700.rs-onecore-base2-hyp Versión de Windows: 10.0.22631.3374
And I have the same problem reported by JC-NH: When I initiate Spyder (Spyder --reset) everything works fine. On a second start, just calling Spyder, I usually get mouse control but everything is shifted by a couple lines. (I have to click above the line and to the left of anything I want to highlight). On subsequent startups I lose all mouse control and need to use keyboard shortcuts to function. Only way to close it is Alt-F4
HOWEVER, in my case calling 'spyder --no-web-widgets' does not solve the problem. The only way is --reset (and lose all config)
UPDATE: Now even after doing "spyder --reset", the issue of the shifted cursor behavior appears at first run.
UPDATE2: The issue of the mouse control being shifted more or less two lines, only happens in the main spyder window. If I open another window such as Preferences or 'Open File', inside that one the mouse and cursor behave normally.
I found what seems to be a good workaround. And maybe a clue?
Once Spyder starts correctly (after a 'spyder --reset'; actually, deleting ~/.config/spyder-py3/config/transient.ini
seems to be enough... sometimes) restore the main Spyder window (i.e. 'un-maximize' it). Don't work in a maximized window. Make it as big as you want (or can), but don't maximize it. For me, this prevented the issue. I can close and open again Spyder within WSL, without losing any setting nor file history. I don't have to --reset again.
I hope this is useful.
UPDATE:
Hello,
I have the same issue. Based on the solution of #12367 , I "fixed" it by adding the following alias to my .bashrc
alias spyder="sed -i '/window\/position = (.*)/c\window/position = (0,0)' ~/.config/spyder-py3/config/transient.ini ; spyder "
@Zybulon, thanks for the confirmation. Could you post the value (or values) of window/position
in ~/.config/spyder-py3/config/transient.ini
without that alias?
According to https://github.com/spyder-ide/spyder/issues/12367#issuecomment-1925283032, it seems the problem is we're trying to save negative values for that setting. And that should be an easy fix.
Without that alias the values were exactly the same negative values : (-32, -32). I have the issue on WSL2 with spyder 6.
Thanks for the extra info @Zybulon!
Could you apply the small patch I added in PR #22549 and let us know if it solves the problem for you? Thanks!
It works perfectly, thanks for you reactivity !
That's great! Thanks for your help too.
I'll include that in 6.0.1 then, to be released tomorrow.
Issue Report Checklist
conda update spyder
(orpip
, if not using Anaconda)jupyter qtconsole
(if console-related)spyder --reset
Problem Description
I've just purchased a high end HP Omen with an RTX 4080 GPU and 32 GB RAM and 2 TB SSD with i9 CPU and am having a real problem debugging a Spyder issue when running it on the Ubuntu side of my installation. I am NOT trying to run a spyder kernel from Ubuntu in a Spyder instantiation on Windows, everything is straight-up on Ubuntu side.
Ultimately, the Spyder GUI does not allow me to click anywhere in the display. All the keyboard shortcuts do work and mouse movement works.
What steps reproduce the problem?
What is the expected output? What do you see instead?
I would expect spyder to open where it was closed in step 2 of setting preferences and the mouse clicking to activate on top of the item it is over, not offset by a set number of pixels down and to the right. And I certainly don't expect to lose all mouse clicking functionality when restarting a second time.
Paste Traceback/Error Below (if applicable)
Versions
Dependencies