Jump to content


Photo

[Fixed 2.8.1] Lua Api: Crash When Moving Monodelay Tool


  • This topic is locked This topic is locked
4 replies to this topic

#1 Cas

Cas

    Guruh Motha Fakka is Levitating and Knows Everything About Renoise Member

  • Normal Members
  • PipPipPipPipPipPipPipPipPipPipPipPipPip
  • 1719 posts
  • Gender:Male

Posted 18 July 2012 - 23:20

So I've written my dream tool :P, MonoDelay (it's a "version 2", whole new package name because the first was alphalpha and utter crap) and it works quite alright, but.. when I turn it on and then move the device, renoise crashes. Does save a backup of the song luckily.

steps:
install monodelay2
open new song
add native delay
change selected device from and then to the delay
right-click it, select 'set mono'
move around some sliders / line sync numbers
go to mixer view (e.g. F3)
move the device now called 'MonoDelay' to another track

expected:
no crash, continued working of monodelay

in fact:
renoise crash

music: SoundCloud drumkits: WizzKit no. 01 (thread), 02 (thread), 03 (thread), 04
tutorials: Beat Creators, Drum Synthesis examples
tools: download@box, info@blog, fork@git, discuss@forum
___________

BCF2000, LP S, MPK, nPad2, nKtrl2, NI KA6, Vortex, SP-404SX

Renoise, NI Reaktor


#2 taktik

taktik

    Renoise Developer

  • Admins
  • PipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPip
  • 15040 posts
  • Gender:Male
  • Location:Berlin, Germany
  • Interests:füße waschen

Posted 19 July 2012 - 11:02

Hello Cas,

could you give us access to this MonoDelay too, so that we can test this here?

#3 Cas

Cas

    Guruh Motha Fakka is Levitating and Knows Everything About Renoise Member

  • Normal Members
  • PipPipPipPipPipPipPipPipPipPipPipPipPip
  • 1719 posts
  • Gender:Male

Posted 19 July 2012 - 11:20

sorry about that, i forgot, it's here

music: SoundCloud drumkits: WizzKit no. 01 (thread), 02 (thread), 03 (thread), 04
tutorials: Beat Creators, Drum Synthesis examples
tools: download@box, info@blog, fork@git, discuss@forum
___________

BCF2000, LP S, MPK, nPad2, nKtrl2, NI KA6, Vortex, SP-404SX

Renoise, NI Reaktor


#4 taktik

taktik

    Renoise Developer

  • Admins
  • PipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPip
  • 15040 posts
  • Gender:Male
  • Location:Berlin, Germany
  • Interests:füße waschen

Posted 27 July 2012 - 16:34

Sorry for the late reply. Found and fixed the problem: The crash happens in "rawequal" in function "__is_mono".

When moving a device, the device actually gets deleted and then inserted as a new object with the same settings at the new place. So "md.__device" contains an object which is no longer exists. This usually fires an Lua error. Within rawequal it caused a crash, which we've fixed now.

So after the fix you'll not get a crash, but a Lua error, and thus have to deal with this in your tool somehow. Working around this may be a bit awkward. Probably it could instead of memorizing the mono'ed devices, simply check it it's called "MonoDevice"?

#5 Cas

Cas

    Guruh Motha Fakka is Levitating and Knows Everything About Renoise Member

  • Normal Members
  • PipPipPipPipPipPipPipPipPipPipPipPipPip
  • 1719 posts
  • Gender:Male

Posted 27 July 2012 - 18:24

That would do for the check, but it's not guaranteed then that it actually has the correct hooks on 6 parameters. So, yeah the tool does need a different implementation anyway, cause loaded songs are also not recognized the monodelays.. A one-fire shortcut to "set left to same as right" and vice versa would be the (simple and) api-compatible approach, but it's not the way I wanna go with it. I'll think up something :)
thanks as always taktik

music: SoundCloud drumkits: WizzKit no. 01 (thread), 02 (thread), 03 (thread), 04
tutorials: Beat Creators, Drum Synthesis examples
tools: download@box, info@blog, fork@git, discuss@forum
___________

BCF2000, LP S, MPK, nPad2, nKtrl2, NI KA6, Vortex, SP-404SX

Renoise, NI Reaktor