BUG LUA automation writing undo history w/ autom follow

If you write automation using LUA API, it will be split into multiple undo steps. Also undo / redo action will cause crashes / freezes.

Steps to reproduce:

  1. Installffx.tools.GUIAutomationRecorder V1.10

  2. Enable “Automation Following” song option

  3. Load a song with a VSTi. Play a pattern in loop and right click on an instrument which is playing and select “Record GUI controls”

  4. Move one slider over the whole pattern.

  5. End edit mode. Tool notifiers will be terminated then.

  6. One time press undo. Strange changes in automation appear.

  7. One time press redo. The result is not the same.

  8. Multiple times undo / redo. Should freeze or crash Renoise

  9. Repeat the whole thing this timedisable “Automation Following” song option. Compare results. If the results are the same, repeat again.

Results:

With"Automation Following" enabled, the undo history will be fucked up, and the start values will be filled in randomly.

Without"Automation Following", the undo history will be correct. But still it will crash on undo/redo action.

EDIT: regarding the"Automation Following" + automation write problem: test it with the above tool, only with playing disabled. The problem will be obvious then with enabled"Automation Following". The just changed point with jump back to the sliders value. This also happens while playing, but then sometimes also not or much less… :blink:

Some art, drawings beyond logic:
Attachment 7940 not found.
Attachment 7941 not found.
Attachment 7942 not found.
Attachment 7943 not found.

Crash log:

Click to view contents
CrashLog: 0 libsystem_platform.dylib 0x00007fff8f376b3a _sigtramp + 26
CrashLog: 1 ??? 0xff80000000001006 0x0 + 18410715276690591750
CrashLog: 2 Renoise 0x0000000100d6ec42 Renoise + 14085186
CrashLog: 3 Renoise 0x0000000100d6c859 Renoise + 14075993
CrashLog: 4 Renoise 0x0000000100d6cabf Renoise + 14076607
CrashLog: 5 Renoise 0x0000000100d70827 Renoise + 14092327
CrashLog: 6 Renoise 0x0000000100d74713 Renoise + 14108435
CrashLog: 7 Renoise 0x0000000100d61ece Renoise + 14032590
CrashLog: 8 Renoise 0x0000000100a922cb Renoise + 11084491
CrashLog: 9 Renoise 0x0000000100a98e9a Renoise + 11112090
CrashLog: 10 Renoise 0x0000000100094d24 Renoise + 609572
CrashLog: 11 Renoise 0x0000000100095b02 Renoise + 613122
CrashLog: 12 Renoise 0x00000001001c973f Renoise + 1873727
CrashLog: 13 Renoise 0x0000000100a652c4 Renoise + 10900164
CrashLog: 14 Renoise 0x0000000100a01a38 Renoise + 10492472
CrashLog: 15 Renoise 0x0000000100a01c73 Renoise + 10493043
CrashLog: 16 Renoise 0x0000000100a68ba4 Renoise + 10914724
CrashLog: 17 Renoise 0x0000000100b1e1d9 Renoise + 11657689
CrashLog: 18 Renoise 0x0000000100a812f4 Renoise + 11014900
CrashLog: 19 Renoise 0x0000000100ada6f8 Renoise + 11380472
CrashLog: 20 Renoise 0x0000000100ab59ab Renoise + 11229611
CrashLog: 21 Renoise 0x0000000100ab1ad4 Renoise + 11213524
CrashLog: 22 AppKit 0x00007fff774cd427 -[NSApplication run] + 1002
CrashLog: 23 Renoise 0x0000000100a79002 Renoise + 10981378
CrashLog: 24 Renoise 0x000000010000687c Renoise + 26748
CrashLog: 25 Renoise 0x000000010000623c Renoise + 25148
CrashLog: 26 Renoise 0x0000000100001914 Renoise + 6420
CrashLog: 27 ??? 0x0000000000000001 0x0 + 1
Application: Caught an unhandled fatal exception (Thread: GUI)!
Application: Saving a backup...
Error Message: A fatal error or crash occurred (unhandled exception in thread: GUI).
Error Message: A backup of the current document was saved at
Error Message: '/Users/Ju/Library/Preferences/Renoise/V3.1.1/CrashBackups/3_1_30_2018__15_15_crash.xrns'...
Error Message: This either happened because of a bug in Renoise, or because of a bug in one of its loaded components (plugins). Please contact and report this problem, so that it can be fixed.
Error Message: Note: It's very important that we know exactly what has happened (what you were doing before this message popped up), or the problem cannot be replicated/analyzed. Please include a description of what you were doing and which components were being used...
Application: Terminating...

Hi FFX

I’m trying to understand why this happens. Can you get a similar error without using tools?It is possible for the tool to do several operations in one step, and then to make and break go crazy.

But I understand that this should not happen. If a step is 8 hit operations, when undoing, you should undo the 8 operations.Renoise 3.1.1 has a problem with undo/redo related to the index of the tracks and the selection. I do not know if it also happens with the index of the sequence or the patterns.Maybe all this is related.

Undo and redo should return the exact previous or subsequent status, including any index, and that requires an exact previous registry.I think that in the subject of indexes and selection is not polished and it requires a deep revision.With the issue of points in automation, I do not know what it could be. Perhaps if the tool were written differently, these errors would be avoided.

It is not the first time that a tool closes Renoise. Many times it seems to be due to wanting to access something that does not exist, and that scenario is relatively simple to provoke with undo / redo.

I’m just thinking out loud.But I also say that I do not like to report errors and then be ignored for many months. There is no support!

I think this actually is multiple bugs in one:

  • The corruption of automation data and drawing obviously is a(or two) bug inside Renoise

  • Crash of Renoise. Seems to be the GUI of the target VST? It was MPS here, I assume it is quite solid and never crashes in different situations. Also I closed the GUI before! So maybe Renoise floods the plugin with way too much values on redo (while restoring a whole automation graph) or sends corrupted values (beyond 0…1) or similar

  • Sometimes freeze of Renoise. Could be related to vst parameter feedback.

-“Automation Following” option is definitely buggy. It should be carefully overhauled and also being available in the API.

In any case - just as danoise stated in the other post - the API should never be able to crash Renoise.

With the issue of points in automation, I do not know what it could be.Perhaps if the tool were written differently, these errors would be avoided.

No, as I wrote, it happens while using UNDO/REDO, while the tool is offline, not having any notifiers active. The tool also writes the automation correctly as you can see. It has nothing to do with the way the tool is written.

.