xLightsSequencer / xLights

xLights is a sequencer for Lights. xLights has usb and E1.31 drivers. You can create sequences in this object oriented program. You can create playlists, schedule them, test your hardware, convert between different sequencers.
GNU General Public License v3.0
544 stars 205 forks source link

Working with shader effects makes xlights freeze #4254

Open ManiacTwister opened 8 months ago

ManiacTwister commented 8 months ago

Describe the bug For some reason, nearly everytime when i work with shader or shape effects, xlights tends to hang on most actions done in the effect timeline. For example: when cutting (ctrl-x) a shader effect xlights freezes reproducible every time. When moving the a shader effect using the arrow keys there is a 50% percent chance xlights freezes. Most of the time xlights get responsive again after about a minute.

The following line is displayed on the console:

HELP!!!!   Frame #352 render on model Window Frame (18x50) layer 0 effect Shader from 7075ms (#283) to 30675ms (#1226) timed out 10 secs.
DOUBLE HELP!!!!   Frame #352 render on model Window Frame (18x50) layer 0 effect Shader from 7075ms (#283) to 30675ms (#1226) timed out 70 secs.
HELP!!!!   Frame #353 render on model Window Frame (18x50) layer 0 effect Shader from 7075ms (#283) to 30675ms (#1226) timed out 10 secs.
DOUBLE HELP!!!!   Frame #353 render on model Window Frame (18x50) layer 0 effect Shader from 7075ms (#283) to 30675ms (#1226) timed out 70 secs.

The following content is in my clipboard after xlights is responsive again:

CopyFormat1 0   1   1   0   -1  NO_PASTE_BY_CELL
Shader  E_0FILEPICKERCTRL_IFS=/home/maniactwister/testxlights/Shaders/Twin Rays.fs,E_SLIDER_SHADERXYZZY_Count=1813,E_SLIDER_SHADERXYZZY_posX=16,E_SLIDER_SHADERXYZZY_posY=-33,E_SLIDER_SHADERXYZZY_rate=-1,E_SLIDER_SHADERXYZZY_soft=28,E_SLIDER_SHADERXYZZY_width=28,E_SLIDER_Shader_Speed=100,E_TEXTCTRL_Shader_LeadIn=0,E_TEXTCTRL_Shader_Offset_X=0,E_TEXTCTRL_Shader_Offset_Y=0,E_TEXTCTRL_Shader_Zoom=0   C_BUTTON_Palette1=#FFFFFF,C_BUTTON_Palette2=#FF0000,C_BUTTON_Palette3=#00FF00,C_BUTTON_Palette4=#0000FF,C_BUTTON_Palette5=#FFFF00,C_BUTTON_Palette6=#000000,C_BUTTON_Palette7=#00FFFF,C_BUTTON_Palette8=#FF00FF,C_CHECKBOX_Palette1=1,C_CHECKBOX_Palette2=1 7075    30675   1   -1000   NO_PASTE_BY_CELL

To Reproduce Steps to reproduce the behavior:

  1. Create an new show folder
  2. Add one model (i've used an window model)
  3. Create a new musical sequence
  4. Add an shader effect (I've used Twin Rays.fs)
  5. Highlight the effect and press ctrl-x

Expected behavior Editing shader effects should run smoothly, but to be honest i can't imagine that this problem occurs for everyone because i have found no other bug reports/posts..?

Versions (please complete the following information):

Additional context Since this happens on every show folder and in any sequence i've not attached the files, but if you need them i'm happily uploading them

bobreese commented 8 months ago

At the Bottom of the Sequencer click the Box for Suspend Render Every time you Move an effect, it triggers a render.

ManiacTwister commented 8 months ago

Thanks for your reply. This is a good workaround to finish my sequence.

Although i still suspect some bug. After some more testing i noticed the same behaviour when copying(ctrl+c) an shader effect - xlights freezes for 70 seconds. It is not possible to cancel the rendering with escape.

When checking "disable render" it doesn't freeze. Also when enabling render again and selecting the effect it is renedered immediately, so there must something different when rendering the effect automatically after copy/cut/move actions which leads to this 70 second freeze.

AzGilrock commented 8 months ago

It all sounds like expected behavior to me its just that you happen to be touching an effect with a long render time. When you click on an effect it triggers a render of that effect. That's why a render all can produce a different result than what you see when you click on an effect because the single effect render from the click does not try to blend with all the surrounding effects. Its done that way on purpose so you can see that effect.

ManiacTwister commented 8 months ago

@AzGilrock in my test sequence there is only this one shader effect, no other effects. I've attached an video where you can see what is happening:

https://github.com/xLightsSequencer/xLights/assets/893193/c054bf0f-11c2-4f04-aa10-46762d67ba45

AzGilrock commented 8 months ago

Probably works fine if its an On effect right? Only solution I see if we turn off rendering for shaders or try to implement some method of turning off rendering until an effect has stopped moving for some period of time. When you drag an effects edge or try to move an effect its constantly firing off the render engine thousands of times a second and then having to abort when it realizes its still moving. But I'm not the render guy so I won't be fixing it anytime soon.

dkulp commented 8 months ago

This wouldn't occur if you were on a Mac. Just sayin. Also means the Mac developers won't be able to reproduce it in order to fix it.

Seriously, most likely there needs to be some AbortRender calls prior to some of the changes.