From: Takashi Iwai Subject: Re: 1.0.10-rc1, envy24control, segfault Date: Fri, 02 Sep 2005 11:48:11 +0200 Message-ID: References: <1125604764.21764.13.camel@cmn3.stanford.edu> Mime-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII Return-path: In-Reply-To: <1125604764.21764.13.camel@cmn3.stanford.edu> Sender: alsa-devel-admin@lists.sourceforge.net Errors-To: alsa-devel-admin@lists.sourceforge.net List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , List-Archive: To: Fernando Lopez-Lezcano Cc: alsa-devel@lists.sourceforge.net List-Id: alsa-devel@alsa-project.org At Thu, 01 Sep 2005 12:59:24 -0700, Fernando Lopez-Lezcano wrote: > > Hi all, I'm getting a segfault on startup of envy24control (alsa-tools > 1.0.10-rc1 - the rest of the packages are 1.0.10-rc1, of course). This > is a backtrace: > > Starting program: /zap/alsa-tools-1.0.10rc1/envy24control/envy24control > Reading symbols from shared object read from target memory...done. > Loaded system supplied DSO at 0xffffe000 > [Thread debugging using libthread_db enabled] > [New Thread -1208341600 (LWP 6320)] > using --- input_channels: 8 > --- output_channels: 8 > --- pcm_output_channels: 8 > --- spdif in/out channels: 2 > > Program received signal SIGSEGV, Segmentation fault. > [Switching to Thread -1208341600 (LWP 6320)] > 0x080542c6 in midi_controller (c=0, v=0) at midi.c:153 > 153 do_controller(c,v2); > (gdb) back > #0 0x080542c6 in midi_controller (c=0, v=0) at midi.c:153 > #1 0x0805492b in mixer_update_stream (stream=1, vol_flag=1, sw_flag=1) > at mixer.c:67 > #2 0x080552a3 in mixer_postinit () at mixer.c:255 > #3 0x08053518 in main (argc=1, argv=0xbfcc2254) at envy24control.c:2185 > (gdb) Try the patch below. Takashi Index: envy24control/midi.c =================================================================== RCS file: /home/iwai/cvs/alsa/alsa-tools/envy24control/midi.c,v retrieving revision 1.4 diff -u -r1.4 midi.c --- envy24control/midi.c 3 Aug 2005 13:49:42 -0000 1.4 +++ envy24control/midi.c 2 Sep 2005 09:47:31 -0000 @@ -142,6 +142,9 @@ int midi_controller(int c, int v) { int v2; + + if(!seq) return; + if(c<0 || c>127) return 0; if(v<0) v=0; ------------------------------------------------------- SF.Net email is Sponsored by the Better Software Conference & EXPO September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf