projectM-visualizer / frontend-sdl2

Standalone application based on SDL2 that turns your desktop audio into awesome visuals. Available on most platforms supported by both libprojectM and libSDL2.
GNU General Public License v3.0
62 stars 33 forks source link

Crashes on Ubuntu 22.04 #38

Open howdood opened 2 years ago

howdood commented 2 years ago

Hi - have built successfully on Ubuntu 22.04 but running from command line with --presetPath set to the projectm 'test' presets (or in fact any preset folder) results in a crash every time.

Running it through gdb gives the below. It's far beyond my level of understanding to figure out what's going on here though - hope it makes sense to someone on the team!

Thread 1 "projectMSDL" received signal SIGSEGV, Segmentation fault. 0x00007ffff48baf43 in ?? () from /usr/lib/x86_64-linux-gnu/dri/radeonsi_dri.so

bitswype commented 2 years ago

I have the same experience. Ubuntu 22.04, instant crash on startup with a message of "aborted (core dumped)".

partofthething commented 2 years ago

I also got a core dump at boot. Recompiled with debug symbols (cmake -DCMAKE_BUILD_TYPE=Debug ..) and got:

[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
[New Thread 0x7fffeb9ff640 (LWP 296982)]
[New Thread 0x7fffe3fff640 (LWP 296983)]
[New Thread 0x7fffeb1fe640 (LWP 296984)]
[New Thread 0x7fffea9fd640 (LWP 296985)]
[New Thread 0x7fffea1fc640 (LWP 296986)]
[New Thread 0x7fffe99fb640 (LWP 296987)]
[New Thread 0x7fffe91fa640 (LWP 296988)]
[New Thread 0x7fffe89f9640 (LWP 296989)]
[Thread 0x7fffe89f9640 (LWP 296989) exited]
[New Thread 0x7fffe89f9640 (LWP 296990)]
[Thread 0x7fffe89f9640 (LWP 296990) exited]
[New Thread 0x7fffe89f9640 (LWP 296992)]
[Thread 0x7fffe89f9640 (LWP 296992) exited]
[New Thread 0x7fffe89f9640 (LWP 296994)]
[New Thread 0x7fffe307e640 (LWP 296995)]

Thread 1 "projectMSDL" received signal SIGSEGV, Segmentation fault.
0x00007ffff3ea2f43 in ?? () from /usr/lib/x86_64-linux-gnu/dri/iris_dri.so
kblaschke commented 2 years ago

Most probable cause of this is supported OpenGL version is less than required, which will cause a nullpointer dereference in the projectM library as of now. If you could compile both libprojectM and projectMSDL in debug mode (use -DCMAKE_BUILD_TYPE=Debug when configuring both), then run it in gdb and let it crash. If gdb stops after the crash, type bt to get a proper backtrace so I can see where in the code it crashes.

kblaschke commented 2 years ago

I've fixed some possible string constructions using nullptr in the audio capture subsystem, which could lead to crashes. Please try again with latest master and see if the crash still happens. If so, please compile in debug mode and create a proper stack trace, so I can at least see where it crashes in the code.

Also note that libprojectM has seen some recent commits that will break the SDL app build, as the API changed. To mitigate this and have all recent fixes before the incompatible changes, check out commit 44f51f9f of the library.

kblaschke commented 1 year ago

While I'm refactoring the core library API, it will receive a callback to report any fatal errors happening while starting or rendering. This will also enable the library to throw an exception in case the shader level isn't high enough or other initializations fail, not crashing immediately. After the changes are done, I'll update the issue here and then you might check again if the above mentioned crashes still happen.

kblaschke commented 5 months ago

Many changes were implemented in libprojectM and the SDL2 app since this bug was opened.

If anyone cares to check again if the issue prevails, that'd be great!