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

Calibration settings crash on Linux #159

Closed
FolderHyph opened this issue Apr 4, 2021 · 27 comments · Fixed by #283
Closed

Calibration settings crash on Linux #159

FolderHyph opened this issue Apr 4, 2021 · 27 comments · Fixed by #283
Labels
bug Something isn't working waiting for feedback Waiting for feedback from users

Comments

@FolderHyph
Copy link

FolderHyph commented Apr 4, 2021

When I click on Calibration settings, AntimicroX crash.

Configuration
Version of antimicrox: 3.1.5
Used package: flatpak
System version: Linux Parrot with flatpak installed

@FolderHyph FolderHyph added the bug Something isn't working label Apr 4, 2021
@pktiuk pktiuk self-assigned this Apr 4, 2021
@pktiuk
Copy link
Member

pktiuk commented Jul 3, 2021

Hi @FolderHyph

I am unable to reproduce this bug, this doesn't happen in my case.
Do you have any coredumps/logs from this crash?

@pktiuk pktiuk removed their assignment Aug 18, 2021
@BanditSan
Copy link

BanditSan commented Aug 31, 2021

Having same issue. Crash after clicking on Calibration

$ antimicrox --log-file /tmp/antimicrox.log
🐞DEBUG	Importing settings
Segmentation fault (core dumped)

antimicrox.log

Running Archlinux
$ uname -r 5.13.13-arch1-1

@BanditSan
Copy link

BanditSan commented Aug 31, 2021

After changed some setting program now crashes few seconds after start

Additional fun stuff in dmesg:

[ 4344.543334] antimicrox[32489]: segfault at 33 ip 000056011f9da4c4 sp 00007ffc94e7cc28 error 4 in antimicrox[56011f8e1000+1d6000]
[ 4344.543363] Code: 84 00 00 00 00 00 f3 0f 1e fa 8b 47 1c c3 0f 1f 84 00 00 00 00 00 f3 0f 1e fa 8b 47 10 c3 0f 1f 84 00 00 00 00 00 f3 0f 1e fa <0f> b6 47 33 c3 90 66 0f 1f 44 00 00 f3 0f 1e fa 40 88 77 33 c3 90
[ 5378.157062] QThread[33896]: segfault at 18 ip 000055cd21f665a4 sp 00007f456fffe658 error 4 in antimicrox[55cd21e94000+1d6000]
[ 5378.157088] Code: 84 00 00 00 00 00 f3 0f 1e fa 8b 47 30 c3 0f 1f 84 00 00 00 00 00 f3 0f 1e fa 48 8b 47 10 c3 90 66 0f 1f 44 00 00 f3 0f 1e fa <48> 8b 47 18 c3 90 66 0f 1f 44 00 00 f3 0f 1e fa 8b 47 3c c3 0f 1f

@pktiuk
Copy link
Member

pktiuk commented Sep 1, 2021

I think these crashes may be related to #133

@BanditSan

I think you could test whether fixes addressing that issue helped with your case.
Test release link: https://github.com/pktiuk/antimicrox/releases/tag/3.1.6-crash-fixes
(you can try with appimage to avoid reinstalling package)

@BanditSan
Copy link

@pktiuk

Calibration still crashes.
Other then some options not working does not die instantly after changing settings.

@BanditSan
Copy link

BanditSan commented Sep 2, 2021

@pktiuk
Yesterday had not much time to play with test version.
Calibration works with Microsoft X-Box One S controller
With my Saitek X-55 Rhino Stick or X-55 Rhino Throttle or both connected opening calibration crashes program.
Tested with locally compiled and appimage. Same result on my laptop and desktop.
I don't think it's driver issues since jstest-gtk calibration works just fine with X-55

[98056.891782] AppRun.wrapped[379711]: segfault at 33 ip 000055c104155ae6 sp 00007ffe82a3f570 error 4 in antimicrox[55c104000000+362000]
[98056.891794] Code: f4 48 8b 45 f8 89 d6 48 89 c7 e8 f1 4c f0 ff 48 8b 45 f8 48 89 c7 e8 83 4e f0 ff 90 c9 c3 55 48 89 e5 48 89 7d f8 48 8b 45 f8 <0f> b6 40 33 5d c3 55 48 89 e5 48 89 7d f8 89 f0 88 45 f4 48 8b 45
[98139.449504] antimicrox[379937]: segfault at 33 ip 0000558a986274c4 sp 00007fff565716d8 error 4 in antimicrox[558a9852e000+1d6000]
[98139.449518] Code: 84 00 00 00 00 00 f3 0f 1e fa 8b 47 1c c3 0f 1f 84 00 00 00 00 00 f3 0f 1e fa 8b 47 10 c3 0f 1f 84 00 00 00 00 00 f3 0f 1e fa <0f> b6 47 33 c3 90 66 0f 1f 44 00 00 f3 0f 1e fa 40 88 77 33 c3 90```

@pktiuk
Copy link
Member

pktiuk commented Sep 2, 2021

Then the root cause is completely different than in the Issue I mentioned.
This is probably caused by your not typical controller.

I will soon focus on your issue.
For now I tried to get line from address mentioned in dmesg, but addr2line only returned ??:0.
Maybe I will create special debug build for you or something IDK.

Give me some time.

@pktiuk
Copy link
Member

pktiuk commented Sep 2, 2021

@FolderHyph
What is your controller?

@FolderHyph
Copy link
Author

Hello, PS4 controller, 2nd generation

@pktiuk
Copy link
Member

pktiuk commented Sep 10, 2021

This issue is not related with used controller (I have checked it with PS4 controller and it worked fine).

It may be caused by wrong way of destroying objects. Some fixes for this are present in the latest release.
Could you update AntiMicroX and tell me whether it helped?

@pktiuk pktiuk added the waiting for feedback Waiting for feedback from users label Sep 12, 2021
@BanditSan
Copy link

Nope, still our friend seg fault when trying to use calibration

[606541.437667] antimicrox[3902435]: segfault at 33 ip 000056353d4f1334 sp 00007ffcdea85ed8 error 4 in antimicrox[56353d3f8000+1d7000]
[606541.437681] Code: 84 00 00 00 00 00 f3 0f 1e fa 8b 47 1c c3 0f 1f 84 00 00 00 00 00 f3 0f 1e fa 8b 47 10 c3 0f 1f 84 00 00 00 00 00 f3 0f 1e fa <0f> b6 47 33 c3 90 66 0f 1f 44 00 00 f3 0f 1e fa 40 88 77 33 c3 90```

@pktiuk pktiuk removed the waiting for feedback Waiting for feedback from users label Sep 14, 2021
@pktiuk
Copy link
Member

pktiuk commented Sep 28, 2021

Could you collect logs from debug build here and upload log file here?
Instruction for collecting logs https://github.com/AntiMicroX/antimicrox/wiki/Collecting-Logs

chmod +x ./AntiMicroX-debug-x86_64.AppImage
./AntiMicroX-debug-x86_64.AppImage --log-level debug --log-file /my/path/to/amtimicrox.log

@pktiuk pktiuk added the waiting for feedback Waiting for feedback from users label Oct 27, 2021
@Duke-Jones
Copy link

Hi, I'm new with AntiMicroX but I have the same problem:
When I click Options->Calibration the app crashes.
My system is Manjaro.
I would like to help, so, please, tell what you need to know or what I should test..

@pktiuk
Copy link
Member

pktiuk commented Nov 7, 2021

Hi @Duke-Jones
Could you collect debug logs from debug build https://github.com/AntiMicroX/antimicrox/releases (AppImage debug, so you don't need to change your already installed instance)?

@pktiuk
Copy link
Member

pktiuk commented Nov 7, 2021

It would be good to collect also core dump (if there is any)

@Duke-Jones
Copy link

Duke-Jones commented Nov 7, 2021

@pktiuk
Is this a special release ?
I ask because i already have installed the 3.2.0:

grafik

edit: ahh, forget it.Now I read : "Could you collect debug logs from debug build"

@Duke-Jones
Copy link

Duke-Jones commented Nov 7, 2021

@pktiuk : I started the debug-appimage (with the appimagelauncher) and it crashed as expected.
But where can I find the logs ?

grafik

@Duke-Jones
Copy link

Ok, I think I did it :

AntiMicroX.log

@pktiuk
Copy link
Member

pktiuk commented Nov 7, 2021

Sorry, I forgot to paste link to instruction: https://github.com/AntiMicroX/antimicrox/wiki/Collecting-Logs

@pktiuk
Copy link
Member

pktiuk commented Nov 7, 2021

Now I know where app crashes.

JoyControlStickEditDialogHelper::JoyControlStickEditDialogHelper(JoyControlStick *stick, QObject *parent)
    : QObject(parent)
{
    Q_ASSERT(stick);//Here

    this->stick = stick;
}

Null was somehow passed to this function.

Could you provide any core dumps from this crash?
You can use coredumpctl for checking dump

coredumpctl
TIME                            PID   UID   GID SIG COREFILE  EXE
Sun 2021-11-07 19:37:01 CET  114310  1000  1000   3 present   /usr/bin/sleep

@Duke-Jones
Copy link

Duke-Jones commented Nov 7, 2021

is it this what you need ?
(i used this command :
coredumpctl dump /tmp/.mount_AntiMi3dTiey/usr/bin/antimicrox -o /home/duke/Apps_AppImage/dump.dmp)

dump.tar.gz

@pktiuk
Copy link
Member

pktiuk commented Nov 7, 2021

Seems to be good.

@Duke-Jones
Copy link

@pktiuk If you need more infos: I have installed QTCreator and can run AntiMicroX as a Debug configuration.
I have no experience with this tool or C++, but If you tell me, where you want me to set a breakpoint I can tell you values of variables an so on at this moment...

@Duke-Jones
Copy link

Another hint:
I'm not sure but maybe it has to do with the "sticks".
As I saw here there are "sticks" and the call
helper(currentJoystick->getActiveSetJoystick()->getJoyStick(0)
seems to need these "sticks".

As you can see, I have no sticks but "DPads" and "Buttons". The DPad is my CoolieHat and my three
axis are recognized in the first places in the buttons-section. Both, the the Fighterstick and the Throttle have 3 axis and multiple buttons.

I hope this helps -if not ignore me ;-)
image

image

@pktiuk
Copy link
Member

pktiuk commented Nov 8, 2021

Wow! Thanks.

I hope this helps -if not ignore me ;-)

You not only helped, you did the hardest part of fixing this bug. You found the reason.

Code does not expect any joypad without joysticks and simply crashes.

@Duke-Jones
Copy link

Duke-Jones commented Nov 8, 2021

you're welcome :-)

A few more informations about my hardware could also help:

CH Fighterstick:
"Axis 1" is the main left/right analog axis of the big controller stick
"Axis 2" is the main forward/backward analog axis of the big controller stick
"Axis 3" is a amaller analog throttle wheel on the side (on the left side, looks like a trimming wheel, buts it's not)

CH Throttle :
"Axis 1" is the left/right analog axis of a small controller stick on the throttle (it's the small, most right one)
"Axis 2" is the forward/backward analog axis of a small controller stick on the throttle (also ^)
"Axis 3" is the main throttle function of this controller (forward backward)

@pktiuk
Copy link
Member

pktiuk commented Nov 9, 2021

Once more thank for your help :D

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working waiting for feedback Waiting for feedback from users
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants