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

Program falsely detects crash after reboot as well as SIGHUP/SIGKILL/SIGTERM. #1246

Open
xgpt opened this issue May 18, 2023 · 5 comments
Open
Labels

Comments

@xgpt
Copy link

xgpt commented May 18, 2023

I would appreciate a switch to disable the crash detected pop up, this gets in the way of some automation software I'm writing for a disabled user who needs to be able to recover after a power outage or normal reboot without someone clicking the 'crash detected' window.

He cannot see the window and is probably going to do poorly with the introduction of a screen reader program so those aren't options either.

Regardless, I believe this software should be able to start up cleanly after a reboot while running. Is there a way to correct this behavior? Or can someone guide me on how to correctly close the program without using the GUI from CLI in linux?

@vladisslav2011
Copy link
Contributor

vladisslav2011 commented May 18, 2023

Hello.
Are you using X11?
If so, xte "keydown Control_L" "key Q" "keyup Control_L" from a background shell may close foreground Gqrx window correctly without leaving "dirty shutdown" flag in a config file.
Or you may add a new command to shutdown Gqrx to the remote interface (add a new branch here https://github.com/gqrx-sdr/gqrx/blob/master/src/applications/gqrx/remote_control.cpp#L214-L263)

@xgpt
Copy link
Author

xgpt commented May 18, 2023

It appears as though "xte" is not installed by default on my arch linux installation (arch has gqrx 2.16, Debian is stuck on 2.15.something for now)

Although I think I'm just going to script copying a known-good config over top of the last default config to remove the crash flag! I didn't realize that would be so simple to remove the crash flag.

It would still be good for the program to handle a reboot without thinking it crashed though, it should be able to accept those signals gracefully without thinking it crashed. like if I start it from cli and then ctrl-c it, that's not a crash...

@xgpt
Copy link
Author

xgpt commented May 18, 2023

Right now I'm going to just

echo "[General]" >> /home/username/.config/gqrx/default.conf
echo "configversion=3" >>  /home/username/.config/gqrx/default.conf
echo "crashed=false" >>  /home/username/.config/gqrx/default.conf

to brute force a fix for myself...but I feel like sighup/sigterm/ a regular reboot should not generate a crash...

Ideas?

I'd prefer to stay with mainline code and not run a custom branch that has unique shutdown remote commands, would you all be open to a remote control shutdown command? What command would you like? "Q PROGRAM" or something?

Edit I mean would you be open to a pull request for the exit shutdown command?

@xgpt
Copy link
Author

xgpt commented May 18, 2023

I would recommend


0x87 set_powerstat 0 

Per https://www.mankier.com/1/rigctl to maintain compatibility with rigctld

@argilo
Copy link
Member

argilo commented Jun 18, 2023

It looks like it's possible (although not simple) to handle Unix signals in a Qt application: https://doc.qt.io/qt-6/unix-signals.html

However, I'd prefer to avoid platform-specific code like that if possible.

The set_powerstat idea sounds reasonable.

@argilo argilo added the feature label Jun 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants