milkytracker / MilkyTracker

An FT2 compatible music tracker
http://milkytracker.github.io/
Other
1.73k stars 162 forks source link

Milkytracker refuse to start in new updated Ubuntu #333

Closed maranemil closed 11 months ago

maranemil commented 1 year ago

When starting Milkytracker after Ubuntu update from 23.04 to 23.10 version

Available Renderers: opengl opengles2 software 
Vendor     : AMD
Renderer   : AMD Radeon Graphics (renoir, LLVM 15.0.7, DRM 3.54, 6.5.0-10-generic)
Version    : OpenGL ES 3.2 Mesa 23.2.1-1ubuntu3
SDL: Minimum window size set to 1280x800.
SDL: Using accelerated renderer.
SDL: Renderer supports rendering to texture.
0 0
SDL: Using audio driver: pulseaudio
SDL: Buffer size = 2048 samples (requested 2048)
MIDI: scanning input ports:
MIDI:  0. Midi Through:Midi Through Port-0 14:0
free(): double free detected in tcache 2

Crashed with signal 6
Please submit a bug report stating exactly what you were doing at the time of the crash, as well as the above signal number. Also note if it is possible to reproduce this crash.

A backup has been saved to /home/demo/BACKUP05.XM

Abgebrochen (Speicherabzug geschrieben)
maranemil commented 1 year ago

I tried to remove and reinstall it, same result. Fasttracker 2 clone is stil working, so I'll use that or get old Ubuntu version in Virtualbox and use Milkytracker in Ubuntu 23.04 LTS. :D

kspalaiologos commented 1 year ago

Can reproduce:

% milkytracker
Available Renderers: opengl opengles2 software
Vendor     : AMD
Renderer   : AMD Radeon Graphics (renoir, LLVM 16.0.6, DRM 3.54, 6.5.0-4-amd64)
Version    : OpenGL ES 3.2 Mesa 23.2.1-1
SDL: Minimum window size set to 1152x864.
SDL: Using accelerated renderer.
SDL: Renderer supports rendering to texture.
0 0
SDL: Using audio driver: pulseaudio
SDL: Buffer size = 896 samples (requested 896)
MIDI: scanning input ports:
MIDI:  0. Midi Through:Midi Through Port-0 14:0
free(): double free detected in tcache 2

Crashed with signal 6
Please submit a bug report stating exactly what you were doing at the time of the crash, as well as the above signal number. Also note if it is possible to reproduce this crash.

A backup has been saved to /home/palaiologos/BACKUP13.XM

zsh: IOT instruction  milkytracker
kspalaiologos commented 1 year ago

Stacktrace of the binary in Debian repositories:

Thread 1 "milkytracker" received signal SIGABRT, Aborted.
__pthread_kill_implementation (threadid=<optimized out>, signo=signo@entry=6,
    no_tid=no_tid@entry=0) at ./nptl/pthread_kill.c:44
44  ./nptl/pthread_kill.c: No such file or directory.
(gdb) bt
#0  __pthread_kill_implementation (threadid=<optimized out>,
    signo=signo@entry=6, no_tid=no_tid@entry=0) at ./nptl/pthread_kill.c:44
#1  0x00007ffff77a515f in __pthread_kill_internal (signo=6,
    threadid=<optimized out>) at ./nptl/pthread_kill.c:78
#2  0x00007ffff7757472 in __GI_raise (sig=sig@entry=6)
    at ../sysdeps/posix/raise.c:26
#3  0x00007ffff77414b2 in __GI_abort () at ./stdlib/abort.c:79
#4  0x00007ffff77421ed in __libc_message (fmt=fmt@entry=0x7ffff78b478c "%s\n")
    at ../sysdeps/posix/libc_fatal.c:150
#5  0x00007ffff77aea75 in malloc_printerr (
    str=str@entry=0x7ffff78b7598 "free(): double free detected in tcache 2")
    at ./malloc/malloc.c:5658
#6  0x00007ffff77b0cf6 in _int_free (av=0x7ffff78eec80 <main_arena>,
    p=0x5555568067e0, have_lock=have_lock@entry=0) at ./malloc/malloc.c:4466
#7  0x00007ffff77b316f in __GI___libc_free (mem=<optimized out>)
    at ./malloc/malloc.c:3367
#8  0x000055555557c3e6 in ?? ()
#9  0x00005555556a12c4 in ?? ()
#10 0x000055555562004a in ?? ()
#11 0x00005555556200cc in ?? ()
#12 0x000055555562140a in ?? ()
#13 0x000055555557ca76 in main ()

Using the disassembler we learn that 0x000055555557c3e6 actually calls operator delete in the vicinity of a few calls to std::basic_string<...>::_M_dispose(). Further investigation hints on these two functions: image

Deltafire commented 1 year ago

Difficult to tell whether this is a bug in Milkytracker or RTMidi. You could try updating RTMidi to the latest version and see if that fixes things. Also a debug build would generate more useful backtraces.

maranemil commented 1 year ago

I don't how to debug. Installing Milkytracker with cmake from github seems to work, following the Install.md instructions.

sudo apt install cmake -y
sudo apt install git -y
sudo apt-get install build-essential -y
sudo apt-get install libjack-dev liblhasa-dev librtmidi-dev libsdl2-dev libzzip-dev

cd ~
mkdir Git && cd Git
git clone https://github.com/milkytracker/MilkyTracker.git
cd MilkyTracker
mkdir build
cd build
cmake ..
make
~/Git/MilkyTracker/build/src/tracker/milkytracker 

Searching in apt list gives the same version v1.04.00 back

apt search milky
Sortierung… Fertig
Volltextsuche… Fertig
milkytracker/mantic,now 1.04.00+dfsg-1 amd64  [installiert]
  Werkzeug zur Erstellung von Musik, inspiriert von Fast Tracker 2

The one installed by apt does not work. The one installed by cmake works. :D

Ubuntu 23.04 had the v1.03.00 , that's why it worked before upgrade to Ubuntu 23.10.

jcowgill commented 11 months ago

I think this is the same issue as #320. Unfortunately Ubuntu 23.10 shipped the broken version of 1.04 using the git tag instead of the version on the GitHub release page. I uploaded the fixed version a few weeks ago so it will be fixed in 24.04. The called the fixed version "1.04.00.20230830+dfsg-1".

You can get it here if you want: https://launchpad.net/ubuntu/+source/milkytracker Click the arrow next to "Noble" and download the debs.

Fixing it in 23.10 requires going through this: https://wiki.ubuntu.com/StableReleaseUpdates, but I don't have time to do that at the moment.

maranemil commented 11 months ago

at least works after compiled