JibbSmart / JoyShockMapper

A tool for PC gamers to play games with DualShock 4, DualSense, JoyCon, and Switch Pro Controllers. Gyro aiming, flick stick.
Other
796 stars 68 forks source link

Linux support? #29

Open AkariMarisa opened 4 years ago

JibbSmart commented 4 years ago

While I like this in principle, I'm afraid it's a low priority for me.

sigboe commented 4 years ago

@AkariMarisa

Sorry I don't have much c++ experience and between paternity leave and home improvement I have little time to look into this. But I was wondering if you had tried to make some makefiles for this project? Then if there are any errors building it posting here? If you don't know how to write a makefile, then its not hard to get into, or you could even maybe look into using something like Clion which I believe can either make c++ makefiles for visual studio projects.

If you get any build errors, if you could stub out (comment out, or more helpfully set those section to only compile on windows), if you could get this to compile, even if it doesn't work, depending, that may be a big part of whats needed to get this on linux.

@JibbSmart Does this depend on any microsoft specific libraries? I imagine if not, it might be nearly just that to port it to linux. Also maybe you could tag this issue with help wanted, so its more visible for someone that can help.

Fatih20 commented 4 years ago

@JibbSmart Does this depend on any microsoft specific libraries? I imagine if not, it might be nearly just that to port it to linux. Also maybe you could tag this issue with help wanted, so its more visible for someone that can help.

I'm sure there are many linux gamer that would like to jump on in this. This is not sarcastic.

Krafting commented 4 years ago

I totally agree with this idea, +1 :)

RedBusters commented 4 years ago

i would love to be able to use that, +1

AkariMarisa commented 4 years ago

@AkariMarisa

Sorry I don't have much c++ experience and between paternity leave and home improvement I have little time to look into this. But I was wondering if you had tried to make some makefiles for this project? Then if there are any errors building it posting here? If you don't know how to write a makefile, then its not hard to get into, or you could even maybe look into using something like Clion which I believe can either make c++ makefiles for visual studio projects.

If you get any build errors, if you could stub out (comment out, or more helpfully set those section to only compile on windows), if you could get this to compile, even if it doesn't work, depending, that may be a big part of whats needed to get this on linux.

Thanks for reply. I never used C++ so I know nothing with, but I'll try.

JibbSmart commented 4 years ago

@sigboe The Windows-specific stuff is put in its own file and should be easy to modify for Linux (and other platforms). The only other library it depends on is JoyShockLibrary, which I've only compiled for Windows, but one should be able to compile it for Linux without too much trouble. I'm pretty sure someone in the gyro gaming community has done this with JoyShockLibrary before, actually :)

kachapman commented 4 years ago

I'd like to just add that I would also love this support as well

NicholasShatokhin commented 4 years ago

I need this support too. There are a lot of games in Linux Steam and I want to use gyroaim of my Nintendo Pro Controller instead of mouse in it.

cowlingj commented 4 years ago

Rather than post "I'd like this too" comments, it might be more constructive to just thumbs up the original comment (or if a comment has something you agree with react to it with thumbs up); that way comments on this issue can be more focused on tackling this issue, people following this won't be notified, and the number of thumbs up acts as a clear indication of how popular the issue is.

I'm sure the comments in support of the issue were made with the best intentions, but it can make issues get quite cluttered.

kicsyromy commented 4 years ago

Linux support is now available. Make sure to check the README for compilation instructions. Binary packages are in the works.

JibbSmart commented 4 years ago

Yeah, @kicsyromy has done awesome work making JSL and JSM both work on Linux -- huge thanks!

Linux builds will be released alongside Windows builds soon, I just need to figure out my workflow for doing that.

sigboe commented 4 years ago

@kicsyromy Do you plan to post a package to AUR?

You write in the readme.

adding your user to the input group, and restarting the computer for the changes to take effect.

But you just need to log out and in again for group changes to take effect.

If you make an AUR package, the best practice is adding udev rules, since that can be removed during package removal.

Here is info about posting https://wiki.archlinux.org/index.php/Arch_User_Repository#Submitting_packages And here is AUR submission guidelines https://wiki.archlinux.org/index.php/AUR_submission_guidelines

kicsyromy commented 4 years ago

@sigboe Thanks for the feedback. Yes, I already have a PKGBUILD, I just haven't gotten around to publishing it yet. The udev rule is commited already. I'll try and get it into the AUR this weekend.

sigboe commented 4 years ago

@kicsyromy Thats great. I'll just wait until then :) Love when my packages can be updated via the package managers ^_^

sigboe commented 4 years ago

@JibbSmart @kicsyromy I don't know if you know this already, but the beta for steam yesterday implemented FlickStick support as well!

Not to say this project is not valid, especially on the Linux side many don't like to use steam, or don't want to fiddle with getting steam up and running for non-steam games. I'm happy running steam, but looking forward to testing joyshockmapper too.

Hope to see a critique of Steam's implementation on your youtube @JibbSmart , And hope that instructions to get 1:1 mapping will using SCAPI/Steam will be added to the wiki.

snakedye commented 4 years ago

@JibbSmart @kicsyromy you guys are my heroes

kicsyromy commented 4 years ago

Package now available on the AUR: https://aur.archlinux.org/packages/joyshockmapper-git/ There are also, for now unofficial, packages for Ubuntu 20.04: https://download.opensuse.org/repositories/home:/kicsyromy/xUbuntu_20.04/, though keep in mind that standard disclaimers apply here, we are still working on setting everything up to offer supported packages for major disributions

JibbSmart commented 4 years ago

@sigboe I'm hoping to have the time to have a look at it soon :) I do wonder if it's a little early for a critique video on my end, as a lot of people are giving feedback and it may change a fair bit by the time it's out of beta. My turnaround time on videos is pretty long, so I'm hesitant to make a video on something I expect will change pretty quickly. However, I've been thinking about doing a video on their gyro controls (which haven't changed in a very long time), and it might make sense to include a look at the current state of their flick stick in that.

sigboe commented 4 years ago

@kicsyromy Where do I put Linux Issues? In their own tickets or wait until Linux is "out of beta" and put them here in the meanwhile?

The contents of JoyShockMapper/dist/GyroConfigs/ are not copied over to .config/GyroConfigs though they are on windows. May I maybe suggest having an /etc/JoyShockMapper/ with system wide configs? Since we cant put things in the users directory during make install, and /etc is used for system wide configs already.

sigboe commented 4 years ago

Also I don't know if this is Linux related, But Im using a PS4 controller over USB, and the gyro becomes unusable after about 20 seconds (didn't time it). It starts drifting and I need to re-calibrate the gyro again. I don't think this happened with the same controller using SCAPI

kicsyromy commented 4 years ago

@kicsyromy Where do I put Linux Issues? In their own tickets or wait until Linux is "out of beta" and put them here in the meanwhile?

The contents of JoyShockMapper/dist/GyroConfigs/ are not copied over to .config/GyroConfigs though they are on windows. May I maybe suggest having an /etc/JoyShockMapper/ with system wide configs? Since we cant put things in the users directory during make install, and /etc is used for system wide configs already.

I've been meaning to do just that, copy them over to /etc, just haven't gotten around to it. As for issues, seeing as Linux support is now in (beta as it may be), I would think that Linux specific issues can be created, since it's easier to keep track of what problems users are facing. @JibbSmart What do you think?

kicsyromy commented 4 years ago

@sigboe The latest packages now deploy the default configurations to /etc and on first start will copy them to ~/.config, without overwriting if they are already present. This change is available on all OBS builds as well as the AUR package.

sigboe commented 4 years ago

@kicsyromy I'll still post here until Jibb decides to open the flood gates on the issues to the issue tracker.

I had this problem originally, but I forgot to write it. I dont know if it has to do with anything linux specific or not. Maybe @JibbSmart will know when he sees this.

Game: DOOM Eternal Controller: DS4 Connection: USB OS: Arch Linux Display server: Xorg Resolution: 1440p Window Manager: I3wm Game window setting: Fullscreen borderless xorg settings: https://termbin.com/j0msg

I have the default in game sense, and I have real world sense values from Jibbs config. But flicking the stick directly down does not do 180 degree turn. Its more like 170 or 165, which is most noticeable when flicking the stick downwards twice, so I end up turning shy of 360 degrees by one or two hours on the clock.

Dunexus commented 4 years ago

@sigboe Your issue may be related to the one describe in https://github.com/JibbSmart/JoyShockMapper/issues/62

JibbSmart commented 4 years ago

Very happy for Linux-specific issues to be created :)

@sigboe Is this consistent? You'll very rarely hit exactly 180 degrees with your stick. If you're pointing your stick at 170 degrees, a correctly calibrated game should flick 170 degrees (unless you are using one of the snapping options).

sigboe commented 4 years ago

@JibbSmart Yes very consistent. I try to put the controller on a surface, and use two hands to go straight down. I couldn't find anywhere in the settings it says rawinput. I don't think I have mouse acceleration on in the desktop, it doesn't feel like it and there is no mention of it in the xorg config file. But it may have some very slight acceleration in the "mouse" driver by default? But shouldn't it overshoot then?

maxigaz commented 4 years ago

@kicsyromy When I try installing the AUR package joyshockmapper-git now, the compaliation fails with a bunch of error messages.

Click me to reveal ```bash [ 18%] Linking CXX static library libJoyShockLibrary.a [ 18%] Built target JoyShockLibrary Scanning dependencies of target JoyShockMapper [ 36%] Building CXX object JoyShockMapper/CMakeFiles/JoyShockMapper.dir/src/main.cpp.o [ 36%] Building CXX object JoyShockMapper/CMakeFiles/JoyShockMapper.dir/src/operators.cpp.o In file included from /tmp/trizen-maxigaz/joyshockmapper-git/src/JoyShockMapper/JoyShockMapper/src/operators.cpp:1: /tmp/trizen-maxigaz/joyshockmapper-git/src/JoyShockMapper/JoyShockMapper/include/JoyShockMapper.h:196:2: error: unknown type name 'KeyCode' KeyCode pressBind; // Press or tap binding ^ /tmp/trizen-maxigaz/joyshockmapper-git/src/JoyShockMapper/JoyShockMapper/include/JoyShockMapper.h:197:2: error: unknown type name 'KeyCode' KeyCode holdBind; // Hold binding if any. ^ /tmp/trizen-maxigaz/joyshockmapper-git/src/JoyShockMapper/JoyShockMapper/include/JoyShockMapper.h:199:10: error: unknown type name 'KeyCode' Mapping(KeyCode press = KeyCode::EMPTY, KeyCode hold = KeyCode::EMPTY) ^ /tmp/trizen-maxigaz/joyshockmapper-git/src/JoyShockMapper/JoyShockMapper/include/JoyShockMapper.h:199:42: error: unknown type name 'KeyCode' Mapping(KeyCode press = KeyCode::EMPTY, KeyCode hold = KeyCode::EMPTY) ^ /tmp/trizen-maxigaz/joyshockmapper-git/src/JoyShockMapper/JoyShockMapper/include/JoyShockMapper.h:199:26: error: use of undeclared identifier 'KeyCode' Mapping(KeyCode press = KeyCode::EMPTY, KeyCode hold = KeyCode::EMPTY) ^ /tmp/trizen-maxigaz/joyshockmapper-git/src/JoyShockMapper/JoyShockMapper/include/JoyShockMapper.h:199:57: error: use of undeclared identifier 'KeyCode' Mapping(KeyCode press = KeyCode::EMPTY, KeyCode hold = KeyCode::EMPTY) ^ /tmp/trizen-maxigaz/joyshockmapper-git/src/JoyShockMapper/JoyShockMapper/include/JoyShockMapper.h:204:23: error: no matching constructor for initialization of 'Mapping' Mapping(int dummy) : Mapping() {} ^ /tmp/trizen-maxigaz/joyshockmapper-git/src/JoyShockMapper/JoyShockMapper/include/JoyShockMapper.h:204:2: note: candidate constructor not viable: requires single argument 'dummy', but no arguments were provided Mapping(int dummy) : Mapping() {} ^ /tmp/trizen-maxigaz/joyshockmapper-git/src/JoyShockMapper/JoyShockMapper/include/JoyShockMapper.h:194:8: note: candidate constructor (the implicit copy constructor) not viable: requires 1 argument, but 0 were provided struct Mapping ^ /tmp/trizen-maxigaz/joyshockmapper-git/src/JoyShockMapper/JoyShockMapper/include/JoyShockMapper.h:194:8: note: candidate constructor (the implicit move constructor) not viable: requires 1 argument, but 0 were provided /tmp/trizen-maxigaz/joyshockmapper-git/src/JoyShockMapper/JoyShockMapper/src/operators.cpp:2:10: fatal error: 'inputHelpers.h' file not found #include "inputHelpers.h" ^~~~~~~~~~~~~~~~ In file included from /tmp/trizen-maxigaz/joyshockmapper-git/src/JoyShockMapper/JoyShockMapper/src/main.cpp:1: /tmp/trizen-maxigaz/joyshockmapper-git/src/JoyShockMapper/JoyShockMapper/include/JoyShockMapper.h:196:2: error: unknown type name 'KeyCode' KeyCode pressBind; // Press or tap binding ^ /tmp/trizen-maxigaz/joyshockmapper-git/src/JoyShockMapper/JoyShockMapper/include/JoyShockMapper.h:197:2: error: unknown type name 'KeyCode' KeyCode holdBind; // Hold binding if any. ^ /tmp/trizen-maxigaz/joyshockmapper-git/src/JoyShockMapper/JoyShockMapper/include/JoyShockMapper.h:199:10: error: unknown type name 'KeyCode' Mapping(KeyCode press = KeyCode::EMPTY, KeyCode hold = KeyCode::EMPTY) ^ /tmp/trizen-maxigaz/joyshockmapper-git/src/JoyShockMapper/JoyShockMapper/include/JoyShockMapper.h:199:42: error: unknown type name 'KeyCode' Mapping(KeyCode press = KeyCode::EMPTY, KeyCode hold = KeyCode::EMPTY) ^ /tmp/trizen-maxigaz/joyshockmapper-git/src/JoyShockMapper/JoyShockMapper/include/JoyShockMapper.h:199:26: error: use of undeclared identifier 'KeyCode' Mapping(KeyCode press = KeyCode::EMPTY, KeyCode hold = KeyCode::EMPTY) ^ /tmp/trizen-maxigaz/joyshockmapper-git/src/JoyShockMapper/JoyShockMapper/include/JoyShockMapper.h:199:57: error: use of undeclared identifier 'KeyCode' Mapping(KeyCode press = KeyCode::EMPTY, KeyCode hold = KeyCode::EMPTY) ^ /tmp/trizen-maxigaz/joyshockmapper-git/src/JoyShockMapper/JoyShockMapper/include/JoyShockMapper.h:204:23: error: no matching constructor for initialization of 'Mapping' Mapping(int dummy) : Mapping() {} ^ /tmp/trizen-maxigaz/joyshockmapper-git/src/JoyShockMapper/JoyShockMapper/include/JoyShockMapper.h:204:2: note: candidate constructor not viable: requires single argument 'dummy', but no arguments were provided Mapping(int dummy) : Mapping() {} ^ /tmp/trizen-maxigaz/joyshockmapper-git/src/JoyShockMapper/JoyShockMapper/include/JoyShockMapper.h:194:8: note: candidate constructor (the implicit copy constructor) not viable: requires 1 argument, but 0 were provided struct Mapping ^ /tmp/trizen-maxigaz/joyshockmapper-git/src/JoyShockMapper/JoyShockMapper/include/JoyShockMapper.h:194:8: note: candidate constructor (the implicit move constructor) not viable: requires 1 argument, but 0 were provided 8 errors generated. make[2]: *** [JoyShockMapper/CMakeFiles/JoyShockMapper.dir/build.make:96: JoyShockMapper/CMakeFiles/JoyShockMapper.dir/src/operators.cpp.o] Error 1 make[2]: *** Waiting for unfinished jobs.... In file included from /tmp/trizen-maxigaz/joyshockmapper-git/src/JoyShockMapper/JoyShockMapper/src/main.cpp:3: /tmp/trizen-maxigaz/joyshockmapper-git/src/JoyShockMapper/JoyShockMapper/include/InputHelpers.h:17:16: error: unknown type name 'KeyCode' int pressMouse(KeyCode vkKey, bool isPressed); ^ /tmp/trizen-maxigaz/joyshockmapper-git/src/JoyShockMapper/JoyShockMapper/include/InputHelpers.h:20:14: error: unknown type name 'KeyCode' int pressKey(KeyCode vkKey, bool pressed); ^ In file included from /tmp/trizen-maxigaz/joyshockmapper-git/src/JoyShockMapper/JoyShockMapper/src/main.cpp:6: In file included from /tmp/trizen-maxigaz/joyshockmapper-git/src/JoyShockMapper/JoyShockMapper/include/JSMAssignment.hpp:5: /tmp/trizen-maxigaz/joyshockmapper-git/src/JoyShockMapper/JoyShockMapper/include/JSMVariable.hpp:144:5: error: member initializer 'JSMVariable' does not name a non-static data member or base class : JSMVariable(defval) ^~~~~~~~~~~~~~~~~~~ /tmp/trizen-maxigaz/joyshockmapper-git/src/JoyShockMapper/JoyShockMapper/include/JSMVariable.hpp:155:60: error: use of undeclared identifier '_defVal' _chordedVariables.emplace( chord, JSMVariable(*this, _defVal) ); ^ /tmp/trizen-maxigaz/joyshockmapper-git/src/JoyShockMapper/JoyShockMapper/include/JSMVariable.hpp:167:48: error: use of undeclared identifier '_value' return chord != ButtonID::INVALID ? optional(_value) : nullopt; ^ /tmp/trizen-maxigaz/joyshockmapper-git/src/JoyShockMapper/JoyShockMapper/include/JSMVariable.hpp:190:5: error: member initializer 'ChordedVariable' does not name a non-static data member or base class : ChordedVariable(defaultValue) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /tmp/trizen-maxigaz/joyshockmapper-git/src/JoyShockMapper/JoyShockMapper/include/JSMVariable.hpp:209:24: error: use of undeclared identifier '_chordedVariables' auto modeshiftVar = _chordedVariables.find(modeshift); ^ /tmp/trizen-maxigaz/joyshockmapper-git/src/JoyShockMapper/JoyShockMapper/include/JSMVariable.hpp:210:24: error: use of undeclared identifier '_chordedVariables' if (modeshiftVar != _chordedVariables.end()) ^ /tmp/trizen-maxigaz/joyshockmapper-git/src/JoyShockMapper/JoyShockMapper/include/JSMVariable.hpp:212:5: error: use of undeclared identifier '_chordedVariables'; did you mean 'ChordedVariable'? _chordedVariables.erase(modeshiftVar); ^~~~~~~~~~~~~~~~~ ChordedVariable /tmp/trizen-maxigaz/joyshockmapper-git/src/JoyShockMapper/JoyShockMapper/include/JSMVariable.hpp:136:7: note: 'ChordedVariable' declared here class ChordedVariable : public JSMVariable ^ /tmp/trizen-maxigaz/joyshockmapper-git/src/JoyShockMapper/JoyShockMapper/include/JSMVariable.hpp:212:5: error: use of undeclared identifier '_chordedVariables'; did you mean 'ChordedVariable'? _chordedVariables.erase(modeshiftVar); ^~~~~~~~~~~~~~~~~ ChordedVariable /tmp/trizen-maxigaz/joyshockmapper-git/src/JoyShockMapper/JoyShockMapper/include/JSMVariable.hpp:136:7: note: 'ChordedVariable' declared here class ChordedVariable : public JSMVariable ^ /tmp/trizen-maxigaz/joyshockmapper-git/src/JoyShockMapper/JoyShockMapper/include/JSMVariable.hpp:212:5: error: unknown type name '_chordedVariables' _chordedVariables.erase(modeshiftVar); ^ /tmp/trizen-maxigaz/joyshockmapper-git/src/JoyShockMapper/JoyShockMapper/include/JSMVariable.hpp:212:22: error: cannot use dot operator on a type _chordedVariables.erase(modeshiftVar); ^ fatal error: too many errors emitted, stopping now [-ferror-limit=] 20 errors generated. make[2]: *** [JoyShockMapper/CMakeFiles/JoyShockMapper.dir/build.make:83: JoyShockMapper/CMakeFiles/JoyShockMapper.dir/src/main.cpp.o] Error 1 make[1]: *** [CMakeFiles/Makefile2:173: JoyShockMapper/CMakeFiles/JoyShockMapper.dir/all] Error 2 make: *** [Makefile:150: all] Error 2 ==> ERROR: A failure occurred in build(). Aborting... :: Unable to build joyshockmapper-git - makepkg exited with code: 4 =>> Try again? [y/N]: ```
kicsyromy commented 4 years ago

@kicsyromy When I try installing the AUR package joyshockmapper-git now, the compaliation fails with a bunch of error messages. Click me to reveal

Hello, I've been away for a few days. Thanks for bringing this to my attention. A large refactor was merged a couple of days ago, and thats why. I will look into this and try to get a fix out this weekend.

sigboe commented 4 years ago

@kicsyromy Would it make sense to change the PKGBUILD to fetch from releases source code archives? This way an update won't break anything. But the AUR will be outdated every time there is an update. Having a few human package managers, or a script to test the build and update AUR could alleviate that issue though.

kicsyromy commented 4 years ago

@sigboe I actually want to set up CI for the project so stuff like this doesn't happen, just need to find the time to actually do it :) Normally if I had been on top of things this wouldn't have been an issue, but alas, life finds a way :P

sigboe commented 4 years ago

Don't worry about it :+1: This isn't production software, It's libre, free open source software, and we are just happy to have it at all. It's cool to get a CI, maybe it can even update the AUR PKGBUILD automatically so AUR helpers know when to rebuild. But no one can hold it against you that it takes time :smile:

kicsyromy commented 4 years ago

Don't worry about it +1 This isn't production software, It's libre, free open source software, and we are just happy to have it at all. It's cool to get a CI, maybe it can even update the AUR PKGBUILD automatically so AUR helpers know when to rebuild. But no one can hold it against you that it takes time smile

The -git package should now build and run, and I have a PR ready for CI as well. The CI should minimize the chance for Linux builds failing. I'm also thinking of having a -git and a release package so that breakages, at least, won't happen to people using the stable packages

sigboe commented 4 years ago

@JibbSmart Just ran yay -Suy joyshockmapper-git and it builds fine. But when I launch the program I get a segmentation fault.

sigurdb@zig-pc-01 ~ % JoyShockMapper 
Welcome to JoyShockMapper version v1.6.1-54!
0 devices connected

AutoLoad is enabled. Configurations in "/home/sigurdb/.config/JoyShockMapper/AutoLoad/" folder will get loaded when matching application is in focus.
[AUTOLOAD] "sigurdb@zig-pc-01: JoyShockMapper" in focus: create "AutoLoad\kitty.txt" to autoload for this application.
[1]    2717192 segmentation fault (core dumped)  JoyShockMapper
139 sigurdb@zig-pc-01 ~ %                                                                              :(
kicsyromy commented 4 years ago

Any chance you could run it through gdb/lldb and give me a stack trace?

sigboe commented 4 years ago

@kicsyromy Of course.

sigurdb@zig-pc-01 ~ % gdb JoyShockMapper
GNU gdb (GDB) 9.2
Copyright (C) 2020 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "x86_64-pc-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
    <http://www.gnu.org/software/gdb/documentation/>.

For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from JoyShockMapper...
(No debugging symbols found in JoyShockMapper)
(gdb) run
Starting program: /usr/bin/JoyShockMapper 
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/usr/lib/libthread_db.so.1".
[New Thread 0x7ffff5fb3700 (LWP 2842656)]
Welcome to JoyShockMapper version v1.6.1-54!
0 devices connected

[New Thread 0x7ffff50d2700 (LWP 2842659)]
AutoLoad is enabled. Configurations in "/home/sigurdb/.config/JoyShockMapper/AutoLoad/" folder will get loaded when matching application is in focus.
[AUTOLOAD] "sigurdb@zig-pc-01: gdb JoyShockMapper" in focus: create "AutoLoad\kitty.txt" to autoload for this application.
[New Thread 0x7ffff486f700 (LWP 2842660)]
[New Thread 0x7fffe7fff700 (LWP 2842661)]
[New Thread 0x7fffe77fe700 (LWP 2842662)]
[New Thread 0x7fffe6ffd700 (LWP 2842663)]
[New Thread 0x7fffe67fc700 (LWP 2842664)]

Thread 2 "JoyShockMapper" received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7ffff5fb3700 (LWP 2842656)]
0x00007ffff7610578 in vtable for std::__cxx11::basic_stringbuf<char, std::char_traits<char>, std::allocator<char> > () from /usr/lib/libstdc++.so.6
kicsyromy commented 4 years ago

I would need a "bt full" on Thread 2. From what I can tell it's just a crash in std::thread, but that doesn't help that much. For this particular example, once the crash occurs, run the following: thread 2 #number of thread that received the seg-fault bt full Thanks!

sigboe commented 4 years ago

@kicsyromy Like so? Thanks for teaching me

sigurdb@zig-pc-01 ~ % gdb JoyShockMapper
GNU gdb (GDB) 9.2
Copyright (C) 2020 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "x86_64-pc-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
    <http://www.gnu.org/software/gdb/documentation/>.

For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from JoyShockMapper...
(No debugging symbols found in JoyShockMapper)
(gdb) run
Starting program: /usr/bin/JoyShockMapper 
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/usr/lib/libthread_db.so.1".
[New Thread 0x7ffff5fb3700 (LWP 2885798)]
Welcome to JoyShockMapper version v1.6.1-54!
0 devices connected

[New Thread 0x7ffff50d2700 (LWP 2885801)]
AutoLoad is enabled. Configurations in "/home/sigurdb/.config/JoyShockMapper/AutoLoad/" folder will get loaded when matching application is in focus.
[AUTOLOAD] "sigurdb@zig-pc-01: gdb JoyShockMapper" in focus: create "AutoLoad\kitty.txt" to autoload for this application.
[New Thread 0x7ffff486f700 (LWP 2885802)]
[New Thread 0x7fffe7fff700 (LWP 2885803)]
[New Thread 0x7fffdffff700 (LWP 2885804)]
[New Thread 0x7fffe77fe700 (LWP 2885805)]
[New Thread 0x7fffe6ffd700 (LWP 2885806)]

Thread 2 "JoyShockMapper" received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7ffff5fb3700 (LWP 2885798)]
0x00007ffff7610578 in vtable for std::__cxx11::basic_stringbuf<char, std::char_traits<char>, std::allocator<char> > () from /usr/lib/libstdc++.so.6
(gdb) thread 2
[Switching to thread 2 (Thread 0x7ffff5fb3700 (LWP 2885798))]
#0  0x00007ffff7610578 in vtable for std::__cxx11::basic_stringbuf<char, std::char_traits<char>, std::allocator<char> > () from /usr/lib/libstdc++.so.6
(gdb) bt full
#0  0x00007ffff7610578 in vtable for std::__cxx11::basic_stringbuf<char, std::char_traits<char>, std::allocator<char> > () at /usr/lib/libstdc++.so.6
#1  0x00005555555cf3f0 in  ()
#2  0x00007ffff750bb74 in std::execute_native_thread_routine(void*) (__p=0x555555621510)
    at /build/gcc/src/gcc/libstdc++-v3/src/c++11/thread.cc:80
#3  0x00007ffff7631422 in start_thread () at /usr/lib/libpthread.so.0
#4  0x00007ffff7215bf3 in clone () at /usr/lib/libc.so.6
(gdb)
kicsyromy commented 4 years ago

Great! Thanks. Unfortunately this doesn't tell me much 🙁 I'll try to look into it, I might come back for more info down the line.