jpcima / adljack

OPL3/OPN2 synthesizer using ADLMIDI and OPNMIDI, for Jack and cross-platform audio
Boost Software License 1.0
41 stars 3 forks source link

Crash on attempt to resize SDL2 window #13

Closed Wohlstand closed 5 years ago

Wohlstand commented 5 years ago

Trying to resize ADLRt's window, and then I getting a crash... peek 2018-12-29 17-10

Running Linux Mint 19.1 (Ubuntu 18.04 as a base).

Wohlstand commented 5 years ago

Back track:

~ $ gdb adlrt
GNU gdb (Ubuntu 8.1-0ubuntu3) 8.1.0.20180409-git
Copyright (C) 2018 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-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 adlrt...(no debugging symbols found)...done.
(gdb) run
Starting program: /usr/local/bin/adlrt 
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
[New Thread 0x7fffe94d7700 (LWP 9015)]
Desired latency 20,000000 ms = buffer size 960
[New Thread 0x7fffe4ad5700 (LWP 9016)]
[New Thread 0x7fffd3fff700 (LWP 9017)]
[New Thread 0x7fffd37fe700 (LWP 9018)]
RtAudio client "PulseAudio" fs=48000 bs=960 latency=0,020000
ADLMIDI version 1.4.0
Error locking memory.Using emulator "Nuked OPL3 (v 1.8)"
Using default banks.
DC filter @ 5,000000 Hz, LV monitor @ 20,000000 ms
ADLMIDI ready with 2 chips.
[New Thread 0x7fffd2ffd700 (LWP 9020)]
corrupted size vs. prev_size

Thread 1 "adlrt" received signal SIGABRT, Aborted.
__GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:51
51  ../sysdeps/unix/sysv/linux/raise.c: Нет такого файла или каталога.
(gdb) bt
#0  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:51
#1  0x00007ffff6653801 in __GI_abort () at abort.c:79
#2  0x00007ffff669c897 in __libc_message (action=action@entry=do_abort, 
    fmt=fmt@entry=0x7ffff67c9b9a "%s\n") at ../sysdeps/posix/libc_fatal.c:181
#3  0x00007ffff66a390a in malloc_printerr (str=str@entry=0x7ffff67c7c9d "corrupted size vs. prev_size")
    at malloc.c:5350
#4  0x00007ffff66ab15f in _int_free (have_lock=0, p=<optimized out>, av=0x7ffff69fec40 <main_arena>)
    at malloc.c:4295
#5  __GI___libc_free (mem=<optimized out>) at malloc.c:3124
#6  0x00007fffd208b751 in ?? () from /usr/lib/x86_64-linux-gnu/libGLX_nvidia.so.0
#7  0x00007fffcae8ea7d in ?? () from /usr/lib/x86_64-linux-gnu/libnvidia-glcore.so.390.77
#8  0x00007fffcb2ff4d2 in ?? () from /usr/lib/x86_64-linux-gnu/libnvidia-glcore.so.390.77
#9  0x00007fffcaf9ac25 in ?? () from /usr/lib/x86_64-linux-gnu/libnvidia-glcore.so.390.77
#10 0x00007fffcaf59100 in ?? () from /usr/lib/x86_64-linux-gnu/libnvidia-glcore.so.390.77
#11 0x00007ffff71731f0 in ?? () from /usr/lib/x86_64-linux-gnu/libSDL2-2.0.so.0
#12 0x00007ffff7171097 in ?? () from /usr/lib/x86_64-linux-gnu/libSDL2-2.0.so.0
#13 0x00007ffff71c7269 in ?? () from /usr/lib/x86_64-linux-gnu/libSDL2-2.0.so.0
#14 0x00007ffff71c879f in ?? () from /usr/lib/x86_64-linux-gnu/libSDL2-2.0.so.0
#15 0x00005555555d157a in PDC_resize_screen ()
#16 0x00005555555cc0f3 in resize_term ()
#17 0x00005555555654cf in handle_anylevel_key(TUI_context&, int) ()
#18 0x00005555555635b8 in curses_interface_exec(void (*)(void*), void*) ()
#19 0x000055555558ada2 in interface_exec(void (*)(void*), void*) ()
#20 0x0000555555560bff in audio_main() ()
#21 0x0000555555561419 in main ()
(gdb) 
jpcima commented 5 years ago

It's known, I reported this to PDcurses's author. A patch can fix it in PDCurses if you replace code with SDL's safe blitting routines which do bound checking. Otherwise, SDL1 will be fine.

jpcima commented 5 years ago

Got patch for SDL2, use this. pdcurses.patch.gz

jpcima commented 5 years ago

This was fixed in PDCurses by a patch yesterday. I have pulled the latest which sould resolve the crash. Do you confirm?

Wohlstand commented 5 years ago

I'll check this out soon and will say, was this solved or not...

Wohlstand commented 5 years ago

Just now I have updated PDCurses submodule, and yeah, that crash has been gone! Thanks :fox_face: :smile: