[alsa-devel] ALSA seq Segfault on snd_seq_event_output_direct in 64bit

Clemens Ladisch clemens at ladisch.de
Mon Sep 6 18:43:09 CEST 2010


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


More information about the Alsa-devel mailing list