Something odd seems to be occuring with ViewBuilder on 2.7 Beta 6 (Win32).
I’m having a look at porting Rubberband timestretch to 2.7 as I have some free time.
The good news is the actual stretching/pitch shifting works fine. The bad news is that all the gui functions crash Renoise
This is the code used for the pitch shift dialog (the simplist)
[luabox]
local vb = renoise.ViewBuilder()
local semitone_selector = vb:valuebox { min = -48, max = 48, value = 0 }
local cent_selector = vb:valuebox { min = -100, max = 100, value = 0 }
local crisp_selector = vb:popup {
items = {‘1’, ‘2’, ‘3’, ‘4’, ‘5’, ‘6’},
value = 5
}
local formant_selector = vb:checkbox {}
local view =
vb:vertical_aligner {
margin = 10,
vb:horizontal_aligner{
spacing = 10,
vb:vertical_aligner{
vb:text{text = ‘Semitones:’ },
semitone_selector,
},
vb:vertical_aligner{
vb:text{text = ‘Cents:’ },
cent_selector,
},
vb:vertical_aligner{
vb:text{text = ‘Crispness:’ },
crisp_selector
},
},
vb:horizontal_aligner{
margin = 10,
spacing = 5,
formant_selector,
vb:text{text = ‘Preserve formant’ },
}
}
local res = renoise.app():show_custom_prompt (
“Pitch Shift”,
view,
{‘Shift’, ‘Cancel’}
);
[/luabox]
The dialog appears, but as soon as it is acknowledged/cancelled it crashes Renoise.
I’ve compared the code to the documentation and everything appears to be fine. I noticed a few superfluous semicolons but removing these didn’t make any difference.
So then I tried commenting out various parts of the above code to identify the crash but the only way I could get it to be stable without crashing was to comment everything out in the main vertical aligner!
Here is the crash log:
[luabox]CrashLog: Handling Exception! Code : C0000005
CrashLog: 57BB8000: ??? +00000
CrashLog: 00A16914: xmlUCSIsCat +395FB5
CrashLog: 00A16ED1: xmlUCSIsCat +396572
CrashLog: 00A17214: xmlUCSIsCat +3968B5
CrashLog: 00A2FD20: xmlUCSIsCat +3AF3C1
CrashLog: 00A345EA: xmlUCSIsCat +3B3C8B
CrashLog: 00A43C6F: xmlUCSIsCat +3C3310
CrashLog: 00A483B1: xmlUCSIsCat +3C7A52
CrashLog: 00CFF67C: xmlUCSIsCat +67ED1D
CrashLog: 00B5900B: xmlUCSIsCat +4D86AC
CrashLog: 00B590BB: xmlUCSIsCat +4D875C
CrashLog: 005DD774: ??? +00000
CrashLog: 7C817067: RegisterWaitForInputIdle +00049
Application: Caught an unhandled exception (Thread: GUI)!
Application: Saving a backup…[/luabox]
Is this an actual bad script or a bug in Renoise?
edit:
Further information appears to indicate a Renoise bug?
All the examples from com.renoise.ExampleToolGui.xrnx also crash the GUI thread (e.g. the very simple ‘hello_world’ example).
Also, Renoise will ask to recover the file when reloading. However, due to the ‘beta’ popup this dialog is delayed. If the script is small (and thus quick to run?) it will reload in the background and cause the same behaviour (crash shutdown). Hence, endless loop - I had to manually remove crashbackup.log to reload Renoise. Ugly.
edit2:
More information.
This is interesting, as my AlphaTrack tool (2.7 dev version) doesn’t have the same behaviour. The main difference that I can see is that in my AlphaTrack tool the ViewBuilder, dialog content and instance are all global variables rather than locals. I’ll look into this some more…
edit3:
Something is very wrong here. Hung scripts dialog (i.e. “do you want to terminate y/n”) acknowledgement also crashes the Renoise Gui thread.