YATCO tabbed chat & WindowResizeEvent error causing crash?

Post Reply
twixt
Posts: 10
Joined: Sun Aug 23, 2015 8:15 pm

YATCO tabbed chat & WindowResizeEvent error causing crash?

Post by twixt »

Mudlet keeps crashing intermittently, when I check the errors this shows up:

[ERROR:] object:<WindowResizeEvent> function:<handleWindowResizeEvent>
<attempt to call a nil value>
[ERROR:] object:<WindowResizeEvent> function:<handleWindowResizeEvent>
<attempt to call a nil value>

It looks like this is the only issue present. Not sure why or where in the code it's happening. Aside from this everything is working perfectly, but I'd really like the crashes to stop, obviously. I haven't been able to reproduce it on purpose and it's happened 3-4 times. One thing that might just be coincidence is that each time, mudlet was running in the background while I was AFK. Now that I think about it, it's probably not coincidence. But I don't see why it being in the background would result in this error. Any ideas would help!

Nyyrazzilyss
Posts: 334
Joined: Thu Mar 05, 2015 2:53 am

Re: YATCO tabbed chat & WindowResizeEvent error causing cras

Post by Nyyrazzilyss »

From the error message, you're using my script - That's an error that occurs during my code initialization that has no effect that I can see/ though i've never tracked it down. I just took another look at it, it was coming about because that event was getting called on startup before the code being available for it. I made a minor change, and initialize the event inside the script after everything is available. That will prevent the error message from showing.

Unfortunately, this doesn't really provide enough information though to say whether mudlet is even crashing - It's just as likely it's my script itself that's crashing. If would really require being able to successfully reproduce the crash or some sort of new error message from the time of the crash to even start looking.

User avatar
Belgarath
Posts: 232
Joined: Fri Jul 26, 2013 7:19 am
Discord: macjabeth#7149

Re: YATCO tabbed chat & WindowResizeEvent error causing cras

Post by Belgarath »

I think that error shows up due to the event handler and the script name being different from each other. They have to be named the same or it throws an error like that.

Nyyrazzilyss
Posts: 334
Joined: Thu Mar 05, 2015 2:53 am

Re: YATCO tabbed chat & WindowResizeEvent error causing cras

Post by Nyyrazzilyss »

Actually, maybe it's not my script (though I was seeing a similar error on startup)

I fixed it by putting 'registerAnonymousEventHandler("sysWindowResizeEvent", "GUIScripts")' at the end of my initialization code (GUIScripts=the function name), and I removed the associated registered event handler from the gui.

twixt
Posts: 10
Joined: Sun Aug 23, 2015 8:15 pm

Re: YATCO tabbed chat & WindowResizeEvent error causing cras

Post by twixt »

Sorry, total newb to this, initialization code? I'm a total newb, basically just installed this and running it... where do I put it? In the 'scripts' section, under 'configuration options'...?

I'm pretty sure the issue is in resetGUI because it's the only thing I can think of that changes the window size

Nyyrazzilyss
Posts: 334
Joined: Thu Mar 05, 2015 2:53 am

Re: YATCO tabbed chat & WindowResizeEvent error causing cras

Post by Nyyrazzilyss »

Somewhere inside the package will be a script with a registered event handler of 'SysLoadEvent'. This is the main/initializing code for the script - It's where the script starts running. If it is my script (NyyLIB) that you're running, just update to the newest version. I'd seen that particular error for awhile, though never a real problem from it. I did get rid of it though for appearances. If not, you might want to try contacting the person that wrote the package you're using to see if they can update it to clear that error.

Post Reply