Jump to content


Photo

[Fixed 2.8.1] Lua Api: Crash With Dynamically Removed Keybindings


  • This topic is locked This topic is locked
1 reply to this topic

#1 KMaki

KMaki

    Big Super Masta Member

  • Normal Members
  • PipPipPipPipPipPipPipPipPipPip
  • 672 posts
  • Gender:Male
  • Location:Tampere, Finland
  • Interests:Survival (e.g. breathing). Small scale renoise-tool-coding. The Melvins. Absurdity of it all. Zen / Not-zen. Wifey&Kids.

Posted 15 July 2012 - 16:09

Hello, this tool seems to have a history of killing renoise. Sorry about that...

This time something weird is happening with key binds. I was working with a feature to manage tool shortcuts so that one can add or remove key binds for firing scripts. This is how far I got, before weirdness rose its head:

Attached File  com.kmaki.vader_Rns280_V0.1.xrnx   67.93KB   256 downloads

The adding part works, but when I remove, the shortcut won't leave, but sticks around as a ghost, and if that shortcut is called through a key bind, whole renoise crashes.

How my renoise crashes step-by-step:
0.Open renoise, have this tool installed.
1.Create a shortcut bind to bring up the macro prompt. (Global:vader:Open macro prompt...)
2.Bring up the macro prompt
3.Fill up the Title text box with something like "XDUMMY". I'm assuming XDUMMY for these instructions.
4.Click ADD-button.
5.Go to preferences, create a shortcut bind for the created macro (Global:vader:XDUMMY).
(5b. Notice the bind is at the bottom of Global:vader: as it's the alphabetically correct position)
6.Bring up the macro prompt again. It should still contain the title field XDUMMY.
7.Click REMOVE-button.
8.Close the dialog (no auto close yet).
(8b. Go check the key binds again. Notice XDUMMY is still there, has jumped to the top of the list - this is what I mean by "sticks around as ghost")
9.Hit the bind you set at 5.
10.Crash.


-Alternatively you can skip point 5 and do the bind after the "removing" of the shortcut, then "Reload all tools", then hit the bind -> CRASH.
-I don't know how much help this weird mutant lua pile gives when hunting this thing down, because I've not yet got it fully organized, but at least it's a placeholder for "something's wrong" type of situation.
-I briefly tried some very simple key bind adding/removing with a simple example tool, but it managed just fine. Don't know where the problem lies...


My setup is OSX Lion, Renoise 2.8.1.(beta) (32bit).

Oh man. Just realized this post should go to the Tec-section... Sry. (thanks for moving)

Edited:Fixed step numbering.

Edited by KMaki, 15 July 2012 - 17:05.

Renoise (2.6->) 2.8 / Mac mini 2010 - 2.66GHz Intel Core 2 Duo - 4 Gb 1067 MHz DDR3 / OS X 10.8 / M-Audio Fast Track USB

#2 taktik

taktik

    Renoise Developer

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

Posted 17 July 2012 - 12:33

Thanks for the detailed report KMaki. Can replicate this here and am working on a fix.
A small workaround for now: Those "ghost" keybindings will be removed as soon as you restart Renoise.
  • Djeroek and KMaki like this