
Josep Andreu wrote:
I run this programs in a lot of 32 bit computers without problems but I received various emails form ppl that has 64bit and the program segfault in:
#0 0x00007f5e6c1cb9a6 in snd_seq_event_output_direct () from /usr/lib/libasound.so.2
Unfortunately I dont have any 64 bit computer to check but I made some checks with some users and the incredible thing is the segfault is produced after the function is called 90 times ... at the 91 segfault. And is not related to the midi event data because previously I send the same data.
This is the function:
void RMGMO::enviocontrol(int canal,int control, int value) {
snd_seq_event_t midievent; snd_seq_ev_clear (&midievent);
snd_seq_ev_set_controller (&midievent, canal, control, value); snd_seq_ev_set_subs (&midievent); snd_seq_ev_set_direct (&midievent); snd_seq_event_output_direct (midi_out, &midievent);
}
This function looks correct.
It's possible that the memory in midi_out got corrupted. Try running stygmorgan with Valgrind.
Regards, Clemens