Graal Forums  

Go Back   Graal Forums > Graal V6 forums > Bug Report
FAQ Members List Calendar Today's Posts

Reply
 
Thread Tools Search this Thread Rate Thread Display Modes
  #1  
Old 03-10-2012, 11:12 AM
cbk1994 cbk1994 is offline
the fake one
cbk1994's Avatar
Join Date: Mar 2003
Location: San Francisco
Posts: 10,718
cbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond repute
Send a message via AIM to cbk1994
New NPCServer Bug: return in switch statements

This started happening after Era was restarted earlier today.

PHP Code:
function onCreated() {
  
temp.key "abc";
  
  switch (
temp.key) {
    case 
"foo":
      echo(
"key=foo");
      return; 
// this line is problematic
    
break;
    
    case 
"abc":
      echo(
"key=abc");
    break;
  }

If you run the following code, nothing will echo. If you comment out the return statement, then it will echo "key=abc" as expected.

It appears that a return statement in a switch causes everything below it to be ignored, even if that case shouldn't have been executed. This is new functionality which is breaking a few things on Era. It did not happen before the server restart today.

This bug also appears to exist clientside on both v5 and v6.
__________________
Reply With Quote
  #2  
Old 03-10-2012, 11:30 AM
fowlplay4 fowlplay4 is offline
team canada
fowlplay4's Avatar
Join Date: Jul 2004
Location: Canada
Posts: 5,200
fowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond repute
Zodiac's (npcserver) is ****ed and won't even start up without crashing now.
__________________
Quote:
Reply With Quote
  #3  
Old 03-10-2012, 11:59 AM
Admins Admins is offline
Graal Administration
Join Date: Jan 2000
Location: Admins
Posts: 11,693
Admins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud of
Zodiac: needed to restart the gserver.
Switch statement: seems to be an optimization bug, if you correctly put case "123": { blabla } then it will not happen, didn't had any problem on era and classic iphone will fix it today though
Reply With Quote
  #4  
Old 03-10-2012, 08:57 PM
fowlplay4 fowlplay4 is offline
team canada
fowlplay4's Avatar
Join Date: Jul 2004
Location: Canada
Posts: 5,200
fowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond repute
This bug pretty much broke everything on Zodiac.
__________________
Quote:
Reply With Quote
  #5  
Old 03-10-2012, 09:08 PM
cbk1994 cbk1994 is offline
the fake one
cbk1994's Avatar
Join Date: Mar 2003
Location: San Francisco
Posts: 10,718
cbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond repute
Send a message via AIM to cbk1994
Quote:
Originally Posted by Stefan View Post
if you correctly put case "123": { blabla } then it will not happen
Why is this the "correct" syntax? C++/C#/Java/Groovy/PHP/JavaScript all prefer to do it without braces, and they're misleading to new scripters (and reduce readability for all scripters) because they give you the false impression that execution stops at the end of the braces, which may not be true if you're falling through.
__________________
Reply With Quote
  #6  
Old 03-10-2012, 09:32 PM
Admins Admins is offline
Graal Administration
Join Date: Jan 2000
Location: Admins
Posts: 11,693
Admins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud of
Ok fixed the problem and uploaded a new npcserver, may be should restart all servers sometime soon.
Reply With Quote
  #7  
Old 03-10-2012, 11:06 PM
cbk1994 cbk1994 is offline
the fake one
cbk1994's Avatar
Join Date: Mar 2003
Location: San Francisco
Posts: 10,718
cbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond repute
Send a message via AIM to cbk1994
Quote:
Originally Posted by Stefan View Post
Ok fixed the problem and uploaded a new npcserver, may be should restart all servers sometime soon.
Our NPC-server is crashing every 20 minutes or so since the new NPCserver.

edit: era is offline until you can fix this!
edit 2: restarting the gserver seems to have fixed it...for now...
__________________

Last edited by cbk1994; 03-10-2012 at 11:23 PM..
Reply With Quote
  #8  
Old 03-11-2012, 11:10 PM
fowlplay4 fowlplay4 is offline
team canada
fowlplay4's Avatar
Join Date: Jul 2004
Location: Canada
Posts: 5,200
fowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond repute
Having issues with the NPC-Server again, whenever we update:

levels/icons/icons.txt

It causes the NPC-Server to crash. I've also caused it to crash by uploading a large text file and deleting it. Attached it.
Attached Files
File Type: txt test.txt (252.1 KB, 649 views)
__________________
Quote:
Reply With Quote
  #9  
Old 03-12-2012, 01:05 AM
Admins Admins is offline
Graal Administration
Join Date: Jan 2000
Location: Admins
Posts: 11,693
Admins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud of
Is it possible that some script is catching the onLevelFileUpdated event and then doing nasty things? I can check the problem sometime soon.
Reply With Quote
  #10  
Old 03-12-2012, 01:14 AM
fowlplay4 fowlplay4 is offline
team canada
fowlplay4's Avatar
Join Date: Jul 2004
Location: Canada
Posts: 5,200
fowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond repute
Quote:
Originally Posted by Stefan View Post
Is it possible that some script is catching the onLevelFileUpdated event and then doing nasty things? I can check the problem sometime soon.
I placed echos in the onLevelFileUpdated functions and they don't even appear. It seems like right after the file is saved or deleted it crashes the (npcserver).
__________________
Quote:
Reply With Quote
  #11  
Old 03-13-2012, 04:53 PM
Admins Admins is offline
Graal Administration
Join Date: Jan 2000
Location: Admins
Posts: 11,693
Admins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud of
Ok the problem was not the file size, it was the problem that there were at least 3 versions of the same file (same filename) on the server. I'm fixing it in this moment.

Update: fixed on Zodiac and uploaded a new version.

Last edited by Admins; 03-13-2012 at 05:04 PM..
Reply With Quote
  #12  
Old 03-16-2012, 05:54 AM
fowlplay4 fowlplay4 is offline
team canada
fowlplay4's Avatar
Join Date: Jul 2004
Location: Canada
Posts: 5,200
fowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond repute
NPC is crashing every 30 minutes to an hour again, getting very tired of backups slowing down the playerworlds servers and the lack of stability as of late.
__________________
Quote:
Reply With Quote
  #13  
Old 03-18-2012, 01:07 AM
Admins Admins is offline
Graal Administration
Join Date: Jan 2000
Location: Admins
Posts: 11,693
Admins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud of
It shows in the logs that it got disconnected, and didn't crash. I will try to debug the npcserver tomorrow.
Reply With Quote
  #14  
Old 03-21-2012, 08:31 PM
ffcmike ffcmike is offline
Banned
Join Date: Jul 2004
Location: London
Posts: 2,029
ffcmike has a reputation beyond reputeffcmike has a reputation beyond reputeffcmike has a reputation beyond reputeffcmike has a reputation beyond reputeffcmike has a reputation beyond reputeffcmike has a reputation beyond reputeffcmike has a reputation beyond reputeffcmike has a reputation beyond repute
Send a message via AIM to ffcmike Send a message via MSN to ffcmike
Quote:
Originally Posted by fowlplay4 View Post
Zodiac's (npcserver) is ****ed and won't even start up without crashing now.
Same now for Classic. (presumably might happen for other servers whenever they restart their NPC-Server)

Last edited by ffcmike; 03-21-2012 at 10:28 PM..
Reply With Quote
  #15  
Old 03-22-2012, 01:16 AM
Admins Admins is offline
Graal Administration
Join Date: Jan 2000
Location: Admins
Posts: 11,693
Admins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud of
Restart your gserver. The new problem on Zodiac was related to a script adding tons of array members to a client. variable, might need to add limit of array length at least for client and clientr variables.
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 09:18 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.