extensionHandler related nullPointerException

Post here your questions about Actionscript and Java server side extensions development.

Moderators: Lapo, Bax

Post Reply
aMUSiC
Posts: 48
Joined: 15 Dec 2007, 17:15

extensionHandler related nullPointerException

Post by aMUSiC »

At random points, I'm getting this kind of exception in my logs:

Code: Select all

INFO   | jvm 1    | 2009/02/09 11:58:17 | 10:58:17.017 - [ WARNING ] > Exception in ExtensionHandler: java.lang.NullPointerException
INFO   | jvm 1    | 2009/02/09 11:58:17 | Exception type: java.lang.NullPointerException
INFO   | jvm 1    | 2009/02/09 11:58:17 | java.lang.NullPointerException
INFO   | jvm 1    | 2009/02/09 11:58:17 |       at it.gotoandplay.smartfoxserver.extensions.JavascriptExtension.logASError(JavascriptExtension.java:665)
INFO   | jvm 1    | 2009/02/09 11:58:17 |       at it.gotoandplay.smartfoxserver.extensions.JavascriptExtension.handleRequest(JavascriptExtension.java:295)
INFO   | jvm 1    | 2009/02/09 11:58:17 |       at it.gotoandplay.smartfoxserver.controllers.ExtensionHandler.processEvent(ExtensionHandler.java:500)
INFO   | jvm 1    | 2009/02/09 11:58:17 |       at it.gotoandplay.smartfoxserver.controllers.ExtensionHandler.run(ExtensionHandler.java:344)
INFO   | jvm 1    | 2009/02/09 11:58:17 |       at java.lang.Thread.run(Unknown Source)
The downside is that the server is running 6 different zones with different extensions, and I don't have an indication as to which script excactly is the one that causes this problem.

So, before I go about searching through all of my extensions line by line, I'd like to ask what does this exception refer to. What kind of error should I be looking for?
User avatar
Lapo
Site Admin
Posts: 23438
Joined: 21 Mar 2005, 09:50
Location: Italy

Post by Lapo »

Never seen this before :(
I would need more infos on how to recreate it.
Lapo
--
gotoAndPlay()
...addicted to flash games
aMUSiC
Posts: 48
Joined: 15 Dec 2007, 17:15

Post by aMUSiC »

I wish I knew where to start.. initially I thought that it had to do with his error I'm getting about 10-20 times a day:

[ WARNING ] > it.gotoandplay.smartfoxserver.exceptions.MissingExtensionException: Unrecognized extension name: [ backgammon ]! Zone: backgammon, Room: 1

however the time frames that this one and the above exception appear are totally different. I also do not understand why this warning occurs since there is a a backgammon.as extension with the "backgammon" name, and it's being used all the time. For that i thought that the flash client might be trying to send an XT message to the extension after its containing room has been destroyed due to some interval gone astray. However I've made sure that all intervals are cleard, but I'm still getting this.

Anyhow, it doesn't seem to affect the operation of the server and/or the games on it, but I'd like my log to have a "clean bill of health"
User avatar
Lapo
Site Admin
Posts: 23438
Joined: 21 Mar 2005, 09:50
Location: Italy

Post by Lapo »

Sounds like you are using lots of AS server side includes, maybe even nested includes. Is this the case?
It seems that error is caused by the parser not able to recognize which portion of the code has generated an error.
Could you give me more details? Maybe privately if you don't want to discuss your code here.

Feel free to drop us an email (From the main menu Support > Contact us)
Lapo
--
gotoAndPlay()
...addicted to flash games
aMUSiC
Posts: 48
Joined: 15 Dec 2007, 17:15

Post by aMUSiC »

Actually there is not a single server side include on any of the extensions (I'm part Italian so I love Spaghetti... code =P)

There are basically 3 games running at all times. Each of those games has a zone level extension, and each room that gets created dynamically gets a room level extension. So basically there are 6 extensions in total with no includes.

The room level extensions send internalRequests back to their parent zone level extensions with information regarding game progress etc.

Frankly, I'm at a loss here as well...
User avatar
Lapo
Site Admin
Posts: 23438
Joined: 21 Mar 2005, 09:50
Location: Italy

Post by Lapo »

Server version?
Lapo
--
gotoAndPlay()
...addicted to flash games
aMUSiC
Posts: 48
Joined: 15 Dec 2007, 17:15

Post by aMUSiC »

1.6.5. Bluebox is also latest version.
User avatar
Lapo
Site Admin
Posts: 23438
Joined: 21 Mar 2005, 09:50
Location: Italy

Post by Lapo »

Please zip your log files and send them to our email (from the main menu > Support > Contact us)
I'd like to take a closer look
Lapo
--
gotoAndPlay()
...addicted to flash games
alamed
Posts: 39
Joined: 16 May 2008, 15:47

Post by alamed »

Hello,
Was a cause found for this problem? we are getting the exact thing in our server.
Server version 1.6.5.01 with Blue box. 1 Game running. Cant not yet be reproduced.

We get the exact error in the wrapper.log.
User avatar
Lapo
Site Admin
Posts: 23438
Joined: 21 Mar 2005, 09:50
Location: Italy

Post by Lapo »

Yes, there's a case in which the error is reported in a cryptic way. We have now fixed the issue so we can send you a patch if you need it urgently (send us an email with a reference to this post).
An official release will be available later this month together with some other fixes.

Hope it helps
Lapo
--
gotoAndPlay()
...addicted to flash games
Post Reply