It seems that renoise does not have the renoise.song() function/object ready at startup, while tools that could access it are already being loaded. Executing that function before the startup/template song is loaded results in an error.
If a tool uses the function in it’s startup code the tool will fail loading, breaking the tool. However once renoise has successfully loaded, and tools are reloaded manually, the function works as expected, even when used in the startup code of the tool.
Expected behavior: either tools to be loaded once the renoise.song() function is ready for use, or the function passing a value like nil to indicate that the system is not ready yet.
I have created a little testing tool to demonstrate the error. Install the xrnx - it will print a message dialog stating success while being installed. Now shut down renoise. Start renoise again - the tool will execute renoise.song() and trigger the error message, the tool will not be loaded. Reloading the tools once renoise has finished startup will not trigger the error, but successfully load the tool and print the success message.
Tested with Renoise 3.3.2 on Linux.
song_object_bug.xrnx (602 Bytes)