Renoise Crashes, But Xml Is Technically Ok.

According to the XSD the XML is “valid” but Renoise will crash on any song when the following nodes:

SelectedTrackIndex, SelectedSampleIndex, and probably any root node that starts with Selected*

Contains a number that doesn’t exist.

Example crash:

  
CrashLog: 0 libSystem.B.dylib 0x00007fff81f941ba _sigtramp + 26  
CrashLog: 1 ??? 0x0000000000000000 0x0 + 0  
CrashLog: 2 Renoise 0x0000000100b59d7a 0x0 + 4306869626  
CrashLog: 3 Renoise 0x0000000100b5a91e 0x0 + 4306872606  
CrashLog: 4 Renoise 0x0000000100b77ed9 0x0 + 4306992857  
CrashLog: 5 Renoise 0x00000001001717e0 0x0 + 4296480736  
CrashLog: 6 Renoise 0x000000010004a412 0x0 + 4295271442  
CrashLog: 7 Renoise 0x0000000100a6d003 0x0 + 4305899523  
CrashLog: 8 Renoise 0x0000000100a76021 0x0 + 4305936417  
CrashLog: 9 Renoise 0x0000000100a76c26 0x0 + 4305939494  
CrashLog: 10 Renoise 0x0000000100a895b4 0x0 + 4306015668  
CrashLog: 11 Renoise 0x000000010004ca12 0x0 + 4295281170  
CrashLog: 12 Renoise 0x000000010050777f 0x0 + 4300240767  
CrashLog: 13 Renoise 0x000000010044e63d 0x0 + 4299482685  
CrashLog: 14 Renoise 0x000000010044edee 0x0 + 4299484654  
CrashLog: 15 Renoise 0x000000010054064e 0x0 + 4300473934  
CrashLog: 16 Foundation 0x00007fff87af1bc5 __NSFireTimer + 114  
CrashLog: 17 CoreFoundation 0x00007fff82da5bb8 __CFRunLoopRun + 6488  
CrashLog: 18 CoreFoundation 0x00007fff82da3d8f CFRunLoopRunSpecific + 575  
CrashLog: 19 HIToolbox 0x00007fff839027ee RunCurrentEventLoopInMode + 333  
CrashLog: 20 HIToolbox 0x00007fff839025f3 ReceiveNextEventCommon + 310  
CrashLog: 21 HIToolbox 0x00007fff839024ac BlockUntilNextEventMatchingListInMode + 59  
CrashLog: 22 AppKit 0x00007fff80064eb2 _DPSNextEvent + 708  
CrashLog: 23 AppKit 0x00007fff80064801 -[NSApplication nextEventMatchingMask:untilDate:inMode:dequeue:] + 155  
CrashLog: 24 AppKit 0x00007fff8002a68f -[NSApplication run] + 395  
CrashLog: 25 Renoise 0x00000001005042a4 0x0 + 4300227236  
CrashLog: 26 Renoise 0x000000010004b528 0x0 + 4295275816  
CrashLog: 27 Renoise 0x000000010043e386 0x0 + 4299416454  
CrashLog: 28 Renoise 0x0000000100015f74 0x0 + 4295057268  
CrashLog: 29 ??? 0x0000000000000002 0x0 + 2  
  

It would be nice that Renoise does a sanity check on these, and reset them to zero where appropriate.

Cheers.