| Why is this occuring ?? I am try to load presets, and it loads the
first value but then segfaults. It works fine in it's own orchestra.
Is it a user error in the way of not initializing values correctly ???
Date/Time: 2005-11-17 12:23:48 -0500
OS Version: 10.3.9 (Build 7W98)
Report Version: 2
Command: csound
Path: ./csound
Version: ??? (???)
PID: 847
Thread: 0
Exception: EXC_BAD_ACCESS (0x0001)
Codes: KERN_INVALID_ADDRESS (0x0001) at 0xfffffffc
Thread 0 Crashed:
0 libwidgets.dylib 0x0101ce84 std::basic_string, std::allocator
>::basic_string[unified](std::basic_string, std::allocator > const&) + 0x28
1 libwidgets.dylib 0x0100e7f4
SNAPSHOT::get(std::vector >&) + 0xa4
2 libwidgets.dylib 0x0100f22c get_snap + 0x90
3 csound 0x00035114 insert + 0x4a4
4 csound 0x000162b8 process_score_event +
0x418
5 csound 0x00016414 process_rt_event + 0x74
6 csound 0x00014aa0 sensevents + 0x4bc
7 csound 0x00003b8c csoundPerform + 0x70
8 csound 0x00002440 main + 0x20c
9 csound 0x00001f64 _start + 0x188
(crt.c:267)
10 csound 0x00001dd8 start + 0x30
Here's the standalone version that works fine:
sr = 44100
kr = 441
ksmps = 100
nchnls = 2
giport OSCinit 47110
#include "_presetUI.h"
#include "_udo.h"
#define SNAPSHOTSFILE # "presetTest.txt" #
/*--- ---*/
instr 1
knum, kval footarray
if (knum == 0 && kval == 1) kgoto pres0
if (knum == 1 && kval == 1) kgoto pres0
if (knum == 2 && kval == 1) kgoto pres0
if (knum == 3 && kval == 1) kgoto pres0
if (knum == 4 && kval == 1) kgoto pres0
if (knum == 5 && kval == 1) kgoto pres0
if (knum == 6 && kval == 1) kgoto pres0
if (knum == 7 && kval == 1) kgoto pres0
if (knum == 8 && kval == 1) kgoto pres0
if (knum == 9 && kval == 1) kgoto pres0
kgoto ex
pres0:
gknum = knum
event "i", 104, 0, 0.01
kgoto exe
ex:
endin
/*--- ---*/
instr 101 ;Save snapshots into RAM
inumsnap,inumval FLsetsnap i(gkGet)
endin
/*--- ---*/
instr 102 ;Load snapshots
FLloadsnap $SNAPSHOTSFILE
inumsnap FLgetsnap i(gkGet)
FLsetVal 1, gkGet, gidum1
endin
/*--- ---*/
instr 103 ;Save snapshots onto disk
FLsavesnap $SNAPSHOTSFILE
endin
/*--- ---*/
instr 104 ;Load snapshots
FLloadsnap $SNAPSHOTSFILE
inumsnap FLgetsnap i(gknum)
FLsetVal 1, gknum, gidum1
endin
/*--- ---*/
i1 0 1000
e
The interface header file:
/*=== begin "_presetUI.h" ===*/
FLpanel "Preset Test", 800, 600, 100, 100, 7
gkslid1, gid1 FLslider "Ball1", 0, 127, 0, 4, -1, 16, 300, 50, 50
gkslid2, gid2 FLslider "Ballse2", 0, 127, 0, 4, -1, 16, 300, 100, 50
gkslid3, gid3 FLslider "Ballse3", 0, 127, 0, 4, -1, 16, 300, 150, 50
giprendx FLvalue "Preset Index", 80, 32, 200, 150
gkdum1, gidum1 FLslider "dummyslider", 0, 9, 0, 4, giprendx, 2, 2,
804, 604
FLsetVal_i 0, giprendx
gksave,ihSV FLbutton "Save snap", 3, 0, 11, 85, 20, 550, 350,
+105, 101, 0, 0
FLsetTextColor 128, 0, 0, ihSV
gkload,ihload FLbutton "Load snap", 3, 0, 11, 85, 20, 635, 350,
+105, 102, 0, 0.01
gkreset,ihRA FLbutton "Write", 3, 0, 11, 70, 20, 720, 350,
+105, 103, 0, 0
FLsetTextColor 0, 0, 255, ihRA
gkGet,gihsnap FLbutBank 12, 6, 8, 240, 150, 550, 375, -105, 102, 0, 0
FLsetVal_i 0, gihsnap
ihsnap FLbox "Select button and click
Save/Load", 1, 1, 14, 250, 10, 545, 530
FLsetTextColor 192, 0, 0, ihsnap
FLsetTextSize 14, ihsnap
FLsetTextType 5, ihsnap
FLpanelEnd
FLrun
/*=== end "_presetUI.h" ===*/
-David |