antimicrox
antimicrox copied to clipboard
Can't load profile with terminal
When i try to load a specific profile with: flatpak run io.github.antimicrox.antimicrox --tray --profile /PATHtoPROFILE/profile.gamecontroller.amgp
antimicrox starts in tray as expected but no profile is selected.
In the terminal there is also this after I execute the above command:
Gtk-Message: Failed to load module "canberra-gtk-module
I also tried it with the .deb version with the same result (except there is no Gtk-Message)
Am I doing something wrong or is this a bug?
Configuration Version of antimicrox: 3.1.5 Used package: flatpak System version: Ubuntu 20.04
Upvote & Fund
- If you find this issue important, mark it with 👍. It lets us see which fixes and features are demanded by the most users.
- We're using Polar.sh so you can upvote and help fund this issue. It may incentivize some developers to contribute to this project and fix some bugs.
- Funded developer receives the funding once the issue is completed & confirmed by you.
- Thank you in advance for helping prioritize & fund our backlog.
Hi @tardigrada123,
Thanks for your report
I tried to reproduce this issue, but I was unable to do it.
Could you upload profile file you used?
Does this problem occur only with flag --trace
?
Hello @pktiuk , I tried it with many different profiles - in my last test i created a profile where only the Y Button is mapped to "y" and none of them worked. If you think it could help trace down the problem i can upload one of the profiles. I also tried the loading command with the original antimicro and everything works as expected.
Does this problem occur only with flag --trace?
I don't know the flag --trace and antimicrox on my desktop doesn't know it either - if this is just a typo and you meant --tray - I also tried it without the --tray flag and the profile still doesn't load. I copied the terminal output from my last test with --log-level debug flag and I attach the file with the log here, perhaps it gives a clue... antimicroxlog.txt Thank you for your effort here
I don't know the flag --trace and antimicrox on my desktop doesn't know it eithe
Sorry my bad, it was just a type, I meant --tray
@tardigrada123
Does this issue still happen for you?
Could you update version to 3.1.6 and provide new logs for me?
(I have rewritten big parts of logging system and added some specific logs which may be useful with this one)
Collecting logs may be easier for you if you would just enable logging to file in settings (settings->advanced-> select level debug and specify a file)
error.txt
@pktiuk Yes, still the same issue. I uploaded the new log. There is one interesting warning in line 4303 :
WARN QLocalSocket::waitForDisconnected() is not allowed in UnconnectedState (file :0)
Thank you for your effort here
Please update AntiMicroX to version 3.1.7
If problem still occurs then try using the same command with other package format (for example AppImage
) - this issue may be caused by sandboxing used by flatpak
Hello and sorry for the late response, I've been very busy. I updated to the latest .deb package and it still doesn't load the profile (same if I try the latest appimage). In he log there are the following warnings:
[14:10:22.393] ❗WARN QCommandLineParser: option not defined: "next" (file :0)
[14:10:22.393] ❗WARN QCommandLineParser: option not defined: "map" (file :0)
[14:10:22.393] ❗WARN QCommandLineParser: option not defined: "display" (file :0)
[14:10:22.393] 🐞DEBUG Socket connected (file :0)
[14:10:22.393] 🟢INFO Printed stdout message📓: AntiMicroX is already running.
(file unner/work/antimicrox/antimicrox/src/main.cpp:246)
If I close antimicrox and then load a profile from terminal there is this terminal output:
[14:19:54.104] ❗WARN QCommandLineParser: option not defined: "next" (file :0) double free or corruption (!prev) Abgebrochen (Speicherabzug geschrieben)
This is very interesting, because when I tested this feature, everything worked as expected.
[14:10:22.393] ❗WARN QCommandLineParser: option not defined: "next" (file :0) [14:10:22.393] ❗WARN QCommandLineParser: option not defined: "map" (file :0) [14:10:22.393] ❗WARN QCommandLineParser: option not defined: "display" (file :0) [14:10:22.393] 🐞DEBUG Socket connected (file :0) [14:10:22.393] 🟢INFO Printed stdout message📓: AntiMicroX is already running. (file unner/work/antimicrox/antimicrox/src/main.cpp:246)
Is that all?
In case of passing new profile via argument you should get something like Update selected profile
PRINT_STDOUT() << "AntiMicroX is already running.\n";
QPointer<InputDaemon> joypad_worker = new InputDaemon(joysticks, &settings, false);
MainWindow mainWindow(joysticks, &cmdutility, &settings, false);
mainWindow.fillButtons();
mainWindow.alterConfigFromSettings();
if (cmdutility.hasProfile() || cmdutility.hasProfileInOptions())
{
PRINT_STDOUT() << "Update selected profile\n";
mainWindow.saveAppConfig();
} else if (cmdutility.isUnloadRequested())
{
mainWindow.saveAppConfig();
}
If I close antimicrox and then load a profile from terminal there is this terminal output:
[14:19:54.104] ❗WARN QCommandLineParser: option not defined: "next" (file :0) double free or corruption (!prev) Abgebrochen (Speicherabzug geschrieben)
This piece is also interesting, because in other cases you get 3 warnings, in this case you got only one, this means that app could crash during parsing.
Could you paste full command you used? (maybe something is wrong with path, or there are some special characters idk).
Does this profile work well when you launch it using GUI?
I did a new test and upload 3 logs (one started from terminal while program was already running, one started from terminal while program was closed, and one where I load the profile from GUI). When loading the profile from GUI everything works as expected (its a simple test profile where the Y Button is mapped to y).
The command I use:
antimicrox --profile /home/lx/RetroPie/testtest.gamecontroller.amgp
From a quick view in the logs i didn't see warnings but in the terminal output when antimicrox was already running:
antimicrox --profile /home/lx/RetroPie/testtest.gamecontroller.amgp [12:57:02.423] ❗WARN QCommandLineParser: option not defined: "next" (file :0) [12:57:02.423] ❗WARN QCommandLineParser: option not defined: "map" (file :0) [12:57:02.423] ❗WARN QCommandLineParser: option not defined: "display" (file :0) AntiMicroX is already running. Update selected profile
and if it was closed:
❗WARN QCommandLineParser: option not defined: "next"
antimicroxlog_already running.txt
antimicroxlog_wasclosed.txt
antimicroxlog_withGUI.txt
There is a small difference between logs with fault and logs without it.
In file ./antimicroxlog_withGUI.txt
app is closed peacefully (logs are closed, windows removed etc.)
[12:54:41.542] 🐞DEBUG Display have local data (file :0)
[12:54:41.543] 🐞DEBUG removing main window (file :0)
[12:54:41.547] 🐞DEBUG Closing logger (file :0)
In others logs end in the middle of job.
This seems to be caused by some kind of crash, but you don't get any information about segfault or anything similar.
I am not able to reproduce it in any way on my setup and currrent logs are not enough.
I have created special debug build informing about crashes https://github.com/AntiMicroX/antimicrox/issues/218 and added some new logs related with loading profiles https://github.com/AntiMicroX/antimicrox/pull/249
You can download debug build here https://github.com/pktiuk/antimicrox/releases/download/3.1.7-debug2/AntiMicroX-debug-x86_64.AppImage
This is AppImage package, co you don't need to install it, you can just run downloaded file.
chmod +x AntiMicroX-debug-x86_64.AppImage
./AntiMicroX-debug-x86_64.AppImage --log-leve debug --log-filel /tmp/antimicrox.log --profile /home/lx/RetroPie/testtest.gamecontroller.amgp
In case of crash you should get a nice stack trace showing what went wrong.
Could you collect for me another log using this build?
And send me your profile file?
Hello again, here is the terminal output with the command:
./AntiMicroX-debug-x86_64.AppImage --log-level debug --log-file /tmp/antimicrox.log --profile /home/lx/RetroPie/testtest.gamecontroller.amgp
❗WARN QCommandLineParser: option not defined: "next"
[12:17:45.687] ❗WARN QCommandLineParser: option not defined: "map"
[12:17:45.687] ❗WARN QCommandLineParser: option not defined: "display"
[12:17:45.687] ❗WARN QCommandLineParser: option not defined: "next"
And here is the logfile: antimicrox.txt and the profile file: testtest.gamecontroller.txt
Thank you for your effort
According to logs everything should work fine.
There was no crash and your profile was loaded correctly (was it?)
Profile you selected was loaded
[12:17:46.194] 🟢INFO Change joystick "X360 Wireless Controller" profile to: "/home/lx/RetroPie/testtest.gamecontroller.amgp" (file unner/work/antimicrox/antimicrox/src/joytabwidget.cpp:897)
And after some time you closed it and there was no crash.
[12:18:12.945] 🟢INFO "Beende Programm" (file unner/work/antimicrox/antimicrox/src/main.cpp:791)
...
[12:18:12.992] 🐞DEBUG Display have local data (file unner/work/antimicrox/antimicrox/src/x11extras.cpp:84)
[12:18:12.992] 🐞DEBUG removing main window (file unner/work/antimicrox/antimicrox/src/mainwindow.cpp:214)
[12:18:12.996] 🐞DEBUG Closing logger (file unner/work/antimicrox/antimicrox/src/logger.cpp:57)
Although the logs say it works it doesn't... Checked it again with a different profile (the joystick should move the mouse cursor) and it does nothing. If I left click on the AntimicroX symbol in the taskbar there is no checkmark in the profile list as it would be when a profile is selected. As I said before the same command and profiles work with the original Antimicro.