|
Fang Xianfu GURU
Joined: 26 Jan 2004 Posts: 5155 Location: United Kingdom
|
Posted: Wed Oct 10, 2007 3:53 am
[2.05] 100% CPU Lockup |
Created this trigger:
Code: |
<trigger language="Lua">
<pattern>test: (%w) (%w)</pattern>
<value>print("1:",zs.param(1),"2:",zs.param(2))</value>
</trigger> |
And twice out of three tests, triggering it with something like #say test: omg lol caused a 100% cpu lockup. I couldn't try pressing Esc because the computer became so flaky it was hard to change to the window - screen repainting was super slow. |
|
|
|
Tech GURU
Joined: 18 Oct 2000 Posts: 2733 Location: Atlanta, USA
|
Posted: Wed Oct 10, 2007 1:40 pm |
Confirmed. Nasty little bugger.
(At the rest of contaminating this thread what's the easiest way to get number of parameters passed in to Lua?) |
|
_________________ Asati di tempari! |
|
|
|
Fang Xianfu GURU
Joined: 26 Jan 2004 Posts: 5155 Location: United Kingdom
|
Posted: Wed Oct 10, 2007 2:44 pm |
Do you mean zscript params or params to a Lua function? For params to a zscript function/alias just use zs.numparam. For params to a Lua function - if you have multiple optional arguments, check them individually, but for a variable number of params to a Lua function, you'll need to do some reading. They changed the way it worked recently and I still haven't caught up (not many situations that it's needed anyway).
|
|
|
|
Zugg MASTER
Joined: 25 Sep 2000 Posts: 23379 Location: Colorado, USA
|
Posted: Wed Oct 10, 2007 5:43 pm |
Confirmed. It's actually related to another bug that I found yesterday. Should have it fixed in 2.06.
|
|
|
|
Tech GURU
Joined: 18 Oct 2000 Posts: 2733 Location: Atlanta, USA
|
Posted: Wed Oct 10, 2007 6:43 pm |
I mean the zscript params so thanks for that info. Glad you found and fixed that bug Zugg.
|
|
_________________ Asati di tempari! |
|
|
|
|
|