the museseq sequencer emerges fine on both mu x86 and amd64 machines, but when executed on my amd64 machine it hangs. Reproducible: Always Steps to Reproduce: 1. muse 2. <hangs...> 3. ps -C muse -l -F F S UID PID PPID C PRI NI ADDR SZ WCHAN RSS PSR STIME TTY TIME CMD 4 D frank 24144 30831 0 77 0 - 13594 down_w 9596 0 Jun20 ? 00:00:00 muse 4 D frank 21678 24974 0 77 0 - 12792 down_w 9448 0 00:31 pts/15 00:00:00 muse kill -9 fails are killing those processes :-( Expected Results: working application (as it does on x86) Portage 2.0.51_pre10 (default-amd64-2004.0, gcc-3.3.3, glibc-2.3.4.20040605-r0, 2.6.5-gentoo) ================================================================= System uname: 2.6.5-gentoo x86_64 4 Gentoo Base System version 1.4.16 ccache version 2.3 [enabled] Autoconf: sys-devel/autoconf-2.59-r4 Automake: sys-devel/automake-1.8.5-r1 Binutils: sys-devel/binutils-2.15.90.0.1.1-r3 ACCEPT_KEYWORDS="amd64 ~amd64" AUTOCLEAN="yes" CFLAGS="-pipe -O2" CHOST="x86_64-pc-linux-gnu" COMPILER="gcc3" CONFIG_PROTECT="/etc /usr/X11R6/lib/X11/xkb /usr/kde/2/share/config /usr/kde/3.2/share/config /usr/kde/3/share/config /usr/share/config /usr/share/texmf/dvipdfm/config/ /usr/share/texmf/dvips/config/ /usr/share/texmf/tex/generic/config/ /usr/share/texmf/tex/platex/config/ /usr/share/texmf/xdvi/ /var/qmail/control" CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d" CXXFLAGS="-pipe -O2" DISTDIR="/usr/portage/distfiles" FEATURES="autoaddcvs ccache cvs digest noauto noclean sandbox usersandbox" GENTOO_MIRRORS="http://ftp.easynet.nl/mirror/gentoo/ ftp://ftp.snt.utwente.nl/pub/os/linux/gentoo ftp://ftp.tiscali.nl/pub/mirror/gentoo" MAKEOPTS="-j2" PKGDIR="/usr/portage/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="/usr/local/portage" SYNC="rsync://rsync.nl.gentoo.org/gentoo-portage" USE="X aalib alsa amd64 apm arts audiofile avi berkdb caps cdr crypt cups doc dvd dvdr encode esd foomaticdb gd gdbm gif gnome gpm gtk gtk2 guile imlib jack jack-tmpfs java jpeg kde ladcca libg++ libwww mbox mikmod motif mpeg mysql ncurses nls nogcj oggvorbis opengl oss pam pdflib perl png ppds python qt quicktime readline sdl slang slp spell ssl tcltk tcpd tetex truetype xml2 xmms xv zlib"
can you try this ebuild: dev.gentoo.org/~morfic/museseq-0.6.2.ebuild with gcc-3.4.0? it builds and executes on x86 compiled with gcc-3.4.0, im not sure i have a mididevice to play with it (ok, no /dev/sequencer, just verified) i can edit, save, import, export, but dont know enough about it let me know how this works in amd64 and the more feedback you can provide the better thank you in advance for your efforts
Created attachment 34367 [details, diff] general int->void* patch Just hacked my way through the sources That patch changes that int usage to store pointers weirdness into proper void*. I hope that helps your problems. I haven't sent that file upstream.
You can use the patch for 0.63 too. The only difference between these two source codes is that this part of the patch has been applied by the developers. diff -Nur muse-0.6.2/synti/synth.cpp muse-0.6.2-patched/synti/synth.cpp --- muse-0.6.2/synti/synth.cpp 2003-10-29 10:06:00.000000000 +0000 +++ muse-0.6.2-patched/synti/synth.cpp 2004-06-28 23:26:35.000000000 +0000 @@ -334,7 +334,7 @@ nsynthis = list->count(); if (debugMsg) printf("%d soft synth found\n", nsynthis); - synthis = new (Synth*)[nsynthis]; + synthis = new Synth*[nsynthis]; QFileInfoListIterator it(*list); QFileInfo* fi; int i = 0; So remove that one from the patch and you will be fine on that version too
Oh I seem to have missed some parts of the museseq source code.. by forgetting to add some of its flags. It is a starting point at least :). Have fun.
it builds, and segfaults right away... instead of waiting for me to press play now. ^_^ #0 0x0000002f3113f8b8 in _int_free () from /lib/libc.so.6 #1 0x0000002f3113e3fa in free () from /lib/libc.so.6 #2 0x0000002f30d84a9e in operator delete(void*) (ptr=0x736000) at ../../../../gcc-3.4.1-20040625/libstdc++-v3/libsupc++/del_op.cc:40 #3 0x0000000000471631 in ~Pool (this=0x736000) at memory.cpp:37 #4 0x0000002f31106a15 in exit () from /lib/libc.so.6 #5 0x000000000046ea1a in MidiThread::start() (this=0xa4d350) at midithread.cpp:421 #6 0x000000000045f855 in Sequencer::start() (this=0xa4d2e0) at seq.cpp:155 #7 0x0000000000448a4c in MusE::loadProjectFile(QString const&) ( this=0x8eb310, name=@0x75597fc950) at app.cpp:724 #8 0x000000000044d473 in MusE (this=0x8eb310, argc=1, argv=0x75597fcdc0) at app.cpp:641 #9 0x0000000000452e85 in main (argc=1, argv=0x75597fcdb8) at app.cpp:1815
also, i cant test museseq 0.6.3 without first fixing the fact that it doesnt compile. :/ this dude needs an amd64 box. :) g++ -DHAVE_CONFIG_H -I. -I. -I.. -g -fno-exceptions -Wall -W -D_GNU_SOURCE -D_REENTRANT -DQT_CLEAN_NAMESPACE -DQT_NO_COMPAT -I.. -I../widgets -I/usr/qt/3/include -O2 -march=athlon64 -g3 -pipe -MT libdriver_la-mididev.lo -MD -MP -MF .deps/libdriver_la-mididev.Tpo -c mididev.cpp -o libdriver_la-mididev.o >/dev/null 2>&1 alsaaudio.cpp: In function `void setParams(snd_pcm_t*, bool)': alsaaudio.cpp:104: error: invalid conversion from `unsigned int*' to `unsigned int' alsaaudio.cpp:104: error: initializing argument 3 of `unsigned int snd_pcm_hw_params_set_rate_near(snd_pcm_t*, snd_pcm_hw_params_t*, unsigned int, int*)' alsaaudio.cpp:120: error: invalid conversion from `snd_pcm_uframes_t*' to `snd_pcm_uframes_t' alsaaudio.cpp:120: error: initializing argument 3 of `snd_pcm_uframes_t snd_pcm_hw_params_set_buffer_size_near(snd_pcm_t*, snd_pcm_hw_params_t*, snd_pcm_uframes_t)' alsaaudio.cpp:126: warning: int format, different type arg (arg 3) alsaaudio.cpp:131: error: invalid conversion from `snd_pcm_uframes_t*' to `snd_pcm_uframes_t' alsaaudio.cpp:131: error: initializing argument 3 of `snd_pcm_uframes_t snd_pcm_hw_params_set_period_size_near(snd_pcm_t*, snd_pcm_hw_params_t*, snd_pcm_uframes_t, int*)' alsaaudio.cpp:137: warning: int format, different type arg (arg 3) alsaaudio.cpp: In member function `virtual void AlsaAudioDevice::write(int, long unsigned int, float**)': alsaaudio.cpp:290: warning: cast from pointer to integer of different size alsaaudio.cpp:290: warning: cast from pointer to integer of different size make[3]: *** [libdriver_la-alsaaudio.lo] Error 1 make[3]: *** Waiting for unfinished jobs.... mv -f .libs/libdriver_la-mididev.lo libdriver_la-mididev.lo make[3]: Leaving directory `/var/tmp/portage/museseq-0.6.3/work/muse-0.6.3/driver' make[2]: *** [all] Error 2 make[2]: Leaving directory `/var/tmp/portage/museseq-0.6.3/work/muse-0.6.3/driver' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory `/var/tmp/portage/museseq-0.6.3/work/muse-0.6.3' make: *** [all] Error 2 !!! ERROR: media-sound/museseq-0.6.3 failed. !!! Function src_compile, Line 65, Exitcode 2 !!! (no error message) *sigh*... pointers and ints :/
I get this one: #0 0x0000002a97ca38b8 in _int_free () from /lib/libc.so.6 #1 0x0000002a97ca23fa in free () from /lib/libc.so.6 #2 0x0000002a978e8b5e in operator delete(void*) () from /usr/lib/gcc-lib/x86_64-pc-linux-gnu/3.4.0/libstdc++.so.6 #3 0x0000000000470681 in ~Pool (this=0x72f7e0) at memory.cpp:37 #4 0x0000002a97c6aa15 in exit () from /lib/libc.so.6 #5 0x000000000043c9ef in std::_Rb_tree<int, std::pair<int const, MidiPlayEvent>, std::_Select1st<std::pair<int const, MidiPlayEvent> >, std::less<int>, RTalloc<MidiPlayEvent> >::_M_insert(std::_Rb_tree_node_base*, std::_Rb_tree_node_base*, std::pair<int const, MidiPlayEvent> const&) (this=0x72f7e0, __x=0x72f7f0, __p=0x0, __v=@0x1010) at memory.h:54 #6 0x000000000043ca27 in std::_Rb_tree<int, std::pair<int const, MidiPlayEvent>, std::_Select1st<std::pair<int const, MidiPlayEvent> >, std::less<int>, RTalloc<MidiPlayEvent> >::insert_equal(std::pair<int const, MidiPlayEvent> const&) (this=0x72f7e0, __v=@0x1010) at stl_tree.h:808 #7 0x000000000046f8f3 in MidiThread::nextEvents(int, int) (this=0x940220, stick=0, etick=38) at stl_multimap.h:349 #8 0x000000000046ffb0 in MidiThread::processTimerTick() (this=0x940220) at midithread.cpp:1172 #9 0x0000000000428516 in Thread::loop() (this=0x940270) at stl_list.h:134 #10 0x0000000000428599 in loop (mops=0x72f7e0) at thread.cpp:34 #11 0x0000002a97582e12 in pthread_start_thread () from /lib/libpthread.so.0 #12 0x0000002a97582eb3 in pthread_start_thread_event () from /lib/libpthread.so.0 #13 0x0000002a97cef793 in thread_start () from /lib/libc.so.6
Created attachment 34440 [details, diff] Memory patch Fixes the pool alocator in memory.cpp memory.h
It plays midi-files with both patches applied..
yaaaay! no more segfaults. =D eradicator/fvdpol - i'd suggest rolling these into two patches. the "synthis = new Synth*[nsynthis];" part should be applied unconditionally, and everything else when on 64bit. plus this allows us to not apply the synthis part for 0.6.3, which apparently already has this. should this bug be closed or kept open for fixing the further issues present in 0.6.3 with alsa? Andreas - you rock :)
Created attachment 34448 [details, diff] new int->void* patch i accidently used long in the signal name. this patch uses correct SIGNAL expressions. should fix a lot of badness (hopefully) *compiling*
Andreas, thanks for your big help here! I found another bug in the event routing for tracks that were using the drummap. The applications seems to be working now, both on ~x86 and ~amd64; I did some extensive testing with playback and recording using hardware MIDI i/o (USB Midisport 4x4 + some gear) and alsaseq/jack softsynths. Travis, can you confirm if it now works for you too?
good to go. :)
Thanks for testing