Windows: Crash when using the mouse wheel after Renoise idled for some time, probably only happens with some tools

R3.2.0, W10

The log.txt:

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: ‘C:\Users\DF-85\AppData\Roaming\Renoise\V3.2.0\CrashBackups\DemoSong - DBlue - Tension_10_26_2019__13_39_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 bug@renoise.com 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…

CrashLog: Handling Exception! Code : C0000005
CrashLog: 0000000140B39336: l9_ippsLn_32f_A21 +76BD86
CrashLog: 0000000140B1106E: l9_ippsLn_32f_A21 +743ABE
CrashLog: 0000000140960094: l9_ippsLn_32f_A21 +592AE4
CrashLog: 000000014077BCB5: l9_ippsLn_32f_A21 +3AE705
CrashLog: 000000014077BCD9: l9_ippsLn_32f_A21 +3AE729
CrashLog: 000000014077BCD9: l9_ippsLn_32f_A21 +3AE729
CrashLog: 000000014077BCD9: l9_ippsLn_32f_A21 +3AE729
CrashLog: 000000014077BCD9: l9_ippsLn_32f_A21 +3AE729
CrashLog: 000000014077BCD9: l9_ippsLn_32f_A21 +3AE729
CrashLog: 000000014077BCD9: l9_ippsLn_32f_A21 +3AE729
CrashLog: 000000014077BCD9: l9_ippsLn_32f_A21 +3AE729
CrashLog: 000000014077BCD9: l9_ippsLn_32f_A21 +3AE729
CrashLog: 000000014077BCD9: l9_ippsLn_32f_A21 +3AE729
CrashLog: 000000014077BCD9: l9_ippsLn_32f_A21 +3AE729
CrashLog: 000000014077BCD9: l9_ippsLn_32f_A21 +3AE729
CrashLog: 000000014077BCD9: l9_ippsLn_32f_A21 +3AE729
CrashLog: 000000014077BCD9: l9_ippsLn_32f_A21 +3AE729
CrashLog: 000000014077BCD9: l9_ippsLn_32f_A21 +3AE729
CrashLog: 000000014077BCD9: l9_ippsLn_32f_A21 +3AE729
CrashLog: 000000014077BCD9: l9_ippsLn_32f_A21 +3AE729
CrashLog: 000000014077E013: l9_ippsLn_32f_A21 +3B0A63
CrashLog: 00000001406DD3B9: l9_ippsLn_32f_A21 +30FE09
CrashLog: 00000001406DC7D1: l9_ippsLn_32f_A21 +30F221
CrashLog: 00000001406DC459: l9_ippsLn_32f_A21 +30EEA9
CrashLog: 000000014077D73E: l9_ippsLn_32f_A21 +3B018E
CrashLog: 000000014077EC51: l9_ippsLn_32f_A21 +3B16A1
CrashLog: 000000014077F5D4: l9_ippsLn_32f_A21 +3B2024
CrashLog: 00000001407826A0: l9_ippsLn_32f_A21 +3B50F0
CrashLog: 000000014067828C: l9_ippsLn_32f_A21 +2AACDC
CrashLog: 00000001406D79BA: l9_ippsLn_32f_A21 +30A40A
CrashLog: 00000001406860E2: l9_ippsLn_32f_A21 +2B8B32
CrashLog: 00000001406ECFE4: l9_ippsLn_32f_A21 +31FA34
CrashLog: 00000001406F1CED: l9_ippsLn_32f_A21 +32473D
CrashLog: 00000001403FC443: l9_ippsLn_32f_A21 +2EE93
CrashLog: 00000001403F74CD: l9_ippsLn_32f_A21 +29F1D
CrashLog: 00000001403FCD36: l9_ippsLn_32f_A21 +2F786
CrashLog: 0000000140D62963: l9_ippsLn_32f_A21 +9953B3
CrashLog: 00007FFB1B387BD4: BaseThreadInitThunk +00014
CrashLog: 00007FFB1BAACED1: RtlUserThreadStart +00021

I have not thoroughly tested it in R3.2.1 b1. So I don’t know if it will affect too. I use a 150% scaling. This error occurs when turning the mouse wheel on the surface of the Renoise window. Simply, the main window closes without showing anything else.

I am using window tools, with several notifiers. Maybe they influence the mistake. But it shouldn’t happen that way. It is a critical error.

Edit 1:

This also happens with an empty song.

Just a suspicion. It seems to happen when you leave Renoise for a few minutes without doing anything. When you return to it and play with the mouse wheel, the error happens (on the instrument box, on matrix …). It seems that when moving something graphically, it hangs.

Is it possible that “the sleeping state” of any notifier (_observable) in the use of a window tool causes this?

I am using notifiers related to the phrases of the instruments. When changing instruments, the tool window automatically resizes, because it shows other data (another quantity of phrases), also I use negative spacing of the viewbuilder. Maybe it has a relationship? To my knowledge, no tool should hang Renoise this way abruptly…

I can not replicate this bug on Win10 R2.3.1b1.

Tested: Mouse wheel on pattern matrix, track scopes, effects list, instrument list
Tested: after returning to Renoise
Tested: 150% scaling
Tested: after returning to Renoise on 150% scaling

No crashes.

@EatMe, I suspect that this is the cause of the use of the API for tools. But it is a rare case to find. My suspicions are that, when using certain notifiers (_observables) that influence the graphical interface by rebuilding the GUI of the tool window, they cause a GUI error. The notifiers serve to coordinate both ways Renoise with the tool. Something seems to cause this failure.

But this is my suspicion. Really, I have no idea what the cause is. It is not normal that you are programming a tool, using it for many minutes in a row and there are no problems (continuous trial and error, performance tests, and all good). And after leaving the PC for a few minutes and returning, some of the GUI seems to fail, according to the log file.

@taktik I think I found the cause…

This error is related to:

  1. Use of the API (tools).
  2. .window.active_middle_frame. Change view (pattern editor --> phrase editor).
  3. Instruments with phrases and instruments without phrases.

See the following function, especially between both marked lines:

local rna=renoise.app()

local function phm_pop_ins_list(value)
  if (PHM_ON_OFF) then
    local song=renoise.song()
    if (value<=#song.instruments and song.selected_instrument_index~=value) then
      song.selected_instrument_index=value
    end
    ----------------------------------------------------------------------------------
    if (PHM_PHRASE_EDITOR) then
      local phr_edt=renoise.ApplicationWindow.MIDDLE_FRAME_INSTRUMENT_PHRASE_EDITOR
      if (rna.window.active_middle_frame~=phr_edt) then
        rna.window.active_middle_frame=phr_edt
      end
    end
    ----------------------------------------------------------------------------------
  end
end 
  • This function forces Renoise to switch to the phrase editor view if you change the instrument (select another).
  • This function can be executed using a notifier of selected_instrument _observable (every time you change the selected instrument inside of Renoise, this function will be executed inside of the tool).

So, if you are alone with the main Renoise window open and with the view of the pattern editor, and you change from an instrument that has no phrases to an instrument that has phrases or vice versa, this function will check and force Renoise to switch to the phrase editor view (value 3). In this case the error will be generated.

It is a somewhat troubled situation.

Earlier the mouse wheel was mentioned, because with the wheel you can change the selected instrument in the instrument box.

This does not happen if you do not use tools (the API). I have not tried it in version 3.2.1 b1, but I suspect the same will happen.

And another detail. If I change the code:

if (rna.window.active_middle_frame ~= phr_edt) then

for this:

if (rna.window.active_middle_frame > phr_edt) then

The error will not happen.

My conclusion is that, changing the view of the pattern editor to the phrase editor can generate error in certain cases, using the API for tools (.window.active_middle_frame) and instruments with and without phrases.

Edit: Another detail. The window tool also changes in size and shows other elements when activated, working with notifiers (_observables) and when changing the selected instrument. It shows a joint list of several characteristics of all the phrases of the instrument. That is, the tool window also resizes in this case. But if the Sampler tab is always marked in the main Renoise window (Phrases - Keyzones - Waveform - Modulation - Effects) it never fails.

The error only occurs when changing the view of the pattern editor to the phrase editor, also contemplating this auto-resizable window tool scenario.

I have continued to have problems here, even when using:

if (rna.window.active_middle_frame > phr_edt) then

That is, even if the window is always inside the Sampler tab, it may have display problems.

I believe that what happens is that, when executing the function, Renoise does not have time to load certain elements of the GUI. It’s like trying to load something that doesn’t exist yet, and that’s why the error. I’m just speculating.

I have performed the same function with a delay timer of about 200 ms. Then it seems that the error is controlled.

The function finally used is this:

local function phm_pop_ins_list(value)
  if (PHM_ON_OFF) then
    if (value<=#song.instruments and song.selected_instrument_index~=value) then
      song.selected_instrument_index=value
    end
    ------------
    local function tab_timer()
      if (PHM_PHRASE_EDITOR) then
        --if (rna.window.active_middle_frame~=phr_edt) then  --not use, return crash error in host!!!
        local win=rna.window
        if (win.active_middle_frame>PHM_FRAME_PHR) then
          win.active_middle_frame=PHM_FRAME_PHR
        end
      end
      if rnt:has_timer(tab_timer) then
        rnt:remove_timer(tab_timer)
      end
    end
    ------------
    if not rnt:has_timer(tab_timer) then
      rnt:add_timer(tab_timer,200)  -- the delay time
    end
  end
end

But I still think it has to do with the representation of the phrases. If there are no phrases in the instruments, the error does not occur.

I can confirm that this error also happens in R3.2.1b1, with W10.

At this point, the modified title of this thread is not accurate as to what really happens. I am almost certain that it has to do with graphic representation when displaying the phrases of the instruments.

Updating the window.active_middle_frame seems to be faster than the actual load of the Renoise GUI, specifically when displaying the phrase editor on an instrument with phrases.

Maybe some small error or check in the code causes this and is always the same…

Another error, probably related (R3.2.0, W10, API6). On this occasion I have used the API with things related to the phrases of the current instrument.

CrashLog: Handling Exception! Code : C0000005
CrashLog: 000000014077C076: l9_ippsLn_32f_A21 +3AEAC6
CrashLog: 000000014077C097: l9_ippsLn_32f_A21 +3AEAE7
CrashLog: 000000014077C097: l9_ippsLn_32f_A21 +3AEAE7
CrashLog: 000000014077C097: l9_ippsLn_32f_A21 +3AEAE7
CrashLog: 000000014077C097: l9_ippsLn_32f_A21 +3AEAE7
CrashLog: 000000014077C097: l9_ippsLn_32f_A21 +3AEAE7
CrashLog: 000000014077C097: l9_ippsLn_32f_A21 +3AEAE7
CrashLog: 000000014077C097: l9_ippsLn_32f_A21 +3AEAE7
CrashLog: 00000001407B0360: l9_ippsLn_32f_A21 +3E2DB0
CrashLog: 00000001408481A9: l9_ippsLn_32f_A21 +47ABF9
CrashLog: 00000001408491E2: l9_ippsLn_32f_A21 +47BC32
CrashLog: 000000014077E2A9: l9_ippsLn_32f_A21 +3B0CF9
CrashLog: 00000001406DDFF3: l9_ippsLn_32f_A21 +310A43
CrashLog: 00000001406FE682: l9_ippsLn_32f_A21 +3310D2
CrashLog: 00000001406E66C6: l9_ippsLn_32f_A21 +319116
CrashLog: 00007FFB161563ED: CallWindowProcW +003BD
CrashLog: 00000000361E6E40: ??? +00000
CrashLog: 00007FFB00000201: ??? +00000
CrashLog: 0000000000000001: ??? +00000
CrashLog: 00000000007D04FC: ??? +00000
CrashLog: 00000000005FFAB8: ??? +00000
CrashLog: 0000000000000001: ??? +00000

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).

Maybe this helps? CallWindowProcW + 003BD