On Mon, 2007-09-17 at 19:05 -0500, David Hilvert wrote: > On Mon, 17 Sep 2007 10:23:46 -0700
<cut> > Breakpoint 2, new_fluid_synth (settings=0x81734f0) at fluid_synth.c:555 > 555 synth->reverb = new_fluid_revmodel(); > (gdb) p synth->dither_index > $1 = 0 > (gdb) p sizeof (synth->dither_index) > $2 = 4 > (gdb) b fluid_synth.c:1824 > Breakpoint 3 at 0xb7efcf11: file fluid_synth.c, line 1824. > (gdb) b fluid_synth.c:1846 > Breakpoint 4 at 0xb7efd088: file fluid_synth.c, line 1846. > (gdb) c > Continuing. > [New Thread -1317741680 (LWP 11092)] > [Switching to Thread -1317741680 (LWP 11092)] > > Breakpoint 3, fluid_synth_dither_s16 (synth=0x80eb470, len=940, > lin=0xb0e00468, rin=0xb0e01320, > lout=0xb0e021d8, loff=0, lincr=2, rout=0xb0e021d8, roff=1, rincr=2) at > fluid_synth.c:1824 > 1824 int di = synth->dither_index; > (gdb) n > 1826 for (i = 0, j = loff, k = roff; i < len; i++, j += lincr, k += > rincr) { > (gdb) p synth->dither_index > $3 = -1209428944 > (gdb) p di > $4 = -1209428944 > (gdb) c > Continuing. > So the value of dither_index is getting corrupted between being initialized and being read in fluid_synth_dither_s16(). Normally I would then try adding a memory watch on that field, but in my recent tests it seemed like memory watches weren't working properly in GDB for me. Not sure whats up with that. Normally you would just take the address from the command "p &synth->dither_index" and then do a "awatch *<addr>" for example if the address was 0x80eb670 then you would do "awatch *0x80eb670". If anyone has an idea why that isn't working, I'd appreciate the info. > Program received signal SIGSEGV, Segmentation fault. > 0xb7efcf4b in fluid_synth_dither_s16 (synth=0x80eb470, len=940, > lin=0xb0e00468, rin=0xb0e01320, > lout=0xb0e021d8, loff=0, lincr=2, rout=0xb0e021d8, roff=1, rincr=2) at > fluid_synth.c:1828 > 1828 left_sample = roundi (lin[i] * 32766.0f + rand_table[0][di]); > (gdb) > I think I need to try and find a system which has the same problem. I'll try that Core Duo laptop soon, to see if the same thing happens. Josh _______________________________________________ fluid-dev mailing list fluid-dev@nongnu.org http://lists.nongnu.org/mailman/listinfo/fluid-dev