Just tried this out on Linux Mint x64 with a brand new cart. After reading the ROM to a file, the program crashes due to a double free error, seemingly. Recompiled with -g
and tried to trace it in GDB - here's the resulting log
» gdb --args ./GBxQT 2004ms Tue 19 Jan 2021 08:13:17 PM CST
GNU gdb (Ubuntu 9.2-0ubuntu1~20.04) 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-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 ./GBxQT...
(gdb) run
Starting program: /media/grayson/4ea9c2fa-455c-480d-adbd-b533afd47647/home/grayson/Packages/GBxQT/GBxQT
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
[New Thread 0x7ffff2f59700 (LWP 5010)]
qt5ct: using qt5ct plugin
[New Thread 0x7ffff15e6700 (LWP 5011)]
QObject::connect: No such signal QGroupBox::refresh_ram_buttons (void)
[New Thread 0x7fffe9c6b700 (LWP 5012)]
[New Thread 0x7fffe946a700 (LWP 5013)]
[New Thread 0x7fffe8c69700 (LWP 5014)]
[Thread 0x7fffe9c6b700 (LWP 5012) exited]
[New Thread 0x7fffe9c6b700 (LWP 5015)]
free(): double free detected in tcache 2
Thread 7 "ReadFlashThread" received signal SIGABRT, Aborted.
[Switching to Thread 0x7fffe9c6b700 (LWP 5015)]
__GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
50 ../sysdeps/unix/sysv/linux/raise.c: No such file or directory.
(gdb) bt
#0 __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
#1 0x00007ffff69e9859 in __GI_abort () at abort.c:79
#2 0x00007ffff6a543ee in __libc_message (action=action@entry=do_abort, fmt=fmt@entry=0x7ffff6b7e285 "%s\n") at ../sysdeps/posix/libc_fatal.c:155
#3 0x00007ffff6a5c47c in malloc_printerr (str=str@entry=0x7ffff6b805d0 "free(): double free detected in tcache 2") at malloc.c:5347
#4 0x00007ffff6a5e0ed in _int_free (av=0x7fffe0000020, p=0x7fffe0003df0, have_lock=0) at malloc.c:4201
#5 0x00007ffff6a49043 in _IO_deallocate_file (fp=0x7fffe0003e00) at libioP.h:863
#6 _IO_new_fclose (fp=0x7fffe0003e00) at iofclose.c:74
#7 0x00005555555678b6 in ReadFlashThread::run() (this=0x555555967750) at src/ReadFlashThread.cpp:98
#8 0x00007ffff6e959d2 in () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#9 0x00007ffff6dbd609 in start_thread (arg=<optimized out>) at pthread_create.c:477
#10 0x00007ffff6ae6293 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95