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

Segmentation Fault when exiting FreeSSM that is compiled in Ubuntu under WSL #54

Open
jmbach opened this issue Oct 9, 2022 · 2 comments

Comments

@jmbach
Copy link

jmbach commented Oct 9, 2022

I have a windows 11 computer with WSL2 that I installed Ubuntu

I have installed qt5-default and qttools5-dev-tools.

Everything compiles fine.

Run sudo ./FreeSSM and loads fine with two warnings.
QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '/tmp/runtime-root'
libpng warning: iCCP: too many profiles

Have not used it with any adapters attached yet. Just starting and exiting the program produces the Segmentation fault.

@jmbach
Copy link
Author

jmbach commented Nov 4, 2022

Additional information. This error does not happen when I run FreeSSM the first time after starting up Ubuntu but occurs the second time I run FreeSSM and every time thereafter.

@Comer352L
Copy link
Owner

I have a windows 11 computer with WSL2 that I installed Ubuntu

Don't do that, WSL is most likely the culprit.
If you are running Windows, why don't you compile/run FreeSSM on Windows directly ?
Alternatively (if you are forced to run Linux on top of Windows), install Linux on a virtual machine.

I have installed qt5-default and qttools5-dev-tools.

Everything compiles fine.

Run sudo ./FreeSSM and loads fine with two warnings.

Why do you run FreeSSM as root ? That's neither required nor recommended.

With some distros, normal users do not have access to serial ports by default.
In that case, just add the user to group "dialout".

QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '/tmp/runtime-root'
libpng warning: iCCP: too many profiles

Nothing to worry about.

Have not used it with any adapters attached yet. Just starting and exiting the program produces the Segmentation fault.

If I had to guess:
FreeSSM uses a shared memory object (QSharedMemory) to avoid running multiple instances of FreeSSM.
I wouldn't be surprised if WSL doesn't handle it correctly.
Try commenting out lines 90 to 102 in src/main.cpp to find out.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants