Forum ActionScript 3.0 Error in ERROR LOG

Problems and discussions relating to ActionScript 3.0 here.

Error in ERROR LOG

Postby aseemgarg321 » August 3rd, 2016, 6:14 am

Hey,

could anyone please help with following issues.

I am getting following errors in my Error log, At random.
This dosen't look like an error from my code, but i am guessing that this is coming from SDK..

As these are random error, I not able to find it in my testing..

Error - 1
---------------------------------------------------------------------------------------------------------------------
TypeError: Error #1009

in callback handler for Connection.addMessageHandler("SRTNGS_CLOSING_ROOM_PLYR_DATA") //A message type added by me
---------------------------------------------------------------------------------------------------------------------


Error - 2
---------------------------------------------------------------------------------------------------------------------
ArgumentError: Error #2025
at Function/<anonymous>()
at playerio::Connection/handleMessage()
at flash.events::EventDispatcher/dispatchEvent()
at playerio.utils::BinarySerializer/onMessage()
at flash.events::EventDispatcher/dispatchEvent()
at MessageBuilder/AddValue()
at playerio.utils::BinarySerializer/onValue()
at flash.events::EventDispatcher/dispatchEvent()
at TokenBuilder/AddByte()
at playerio.utils::BinarySerializer/AddByte()
at Function/<anonymous>()
in callback handler for Connection.connect
---------------------------------------------------------------------------------------------------------------------
aseemgarg321
 
Posts: 104
Joined: March 28th, 2015, 9:54 am

Re: Error in ERROR LOG

Postby aseemgarg321 » August 4th, 2016, 5:09 am

HI,

Any input on these, Main problem is they dont look like error in my Code.
I am sure that there must be something wrong in my code, which is triggering these error in playerio modules, But still if someone can help me understand what these errors are, It will be great.

Thanks,
Aseem
aseemgarg321
 
Posts: 104
Joined: March 28th, 2015, 9:54 am

Re: Error in ERROR LOG

Postby aseemgarg321 » August 7th, 2016, 2:17 am

bump..
aseemgarg321
 
Posts: 104
Joined: March 28th, 2015, 9:54 am

Re: Error in ERROR LOG

Postby aseemgarg321 » August 9th, 2016, 8:31 pm

Could someone please help me out here?

Thanks,
Aseem
aseemgarg321
 
Posts: 104
Joined: March 28th, 2015, 9:54 am

Re: Error in ERROR LOG

Postby robscherer123 » August 10th, 2016, 5:16 pm

Maybe I'm stating what you already know, but error 1 would seem that you have an error in the callback function for "SRTNGS_CLOSING_ROOM_PLYR_DATA". Whenever that function is called, there must be a bug somewhere in that function. The AS3 error #1009 happens whenever you try to access a property or method on a null object.

So for example:
Code: Select all
var myMC:MovieClip = null;
myMc.play(); //This will throw the 1009 error because your trying to call a method on myMC, which is null.

So somewhere in the function that is called when the message "SRTNGS_CLOSING_ROOM_PLYR_DATA" is received from the server, there you must have a bug.


As for Error 2, I believe error #2025 happens when you try to remove a display object from a parent who does not have that display object as its child.

So for example:
Code: Select all
var enemy:MovieClip = new MovieClip();
var player:MovieClip = new MovieClip();
var area1:MovieClip = new MovieClip();
var area2:MovieClip = new MovieClip();

area2.addChild(enemy);

area1.removeChild(enemy); //This will throw the #2025 error because enemy is not a child of area1, it is a child of area2.
area2.removeChild(player); //This will also throw error #2025 because player has no parent.

Hopefully that helps you. Both of your error sound like they are happening in your callback functions for the messages. If the functions contain a whole ton of code, you can wrap section of them in a try{}catch{} statement and when the catch section fires, you can report the custom error back to PlayerIO using the ErrorLog writeError() method to help you track down what is going wrong.

I hope that helps.
robscherer123
Paid Member
 
Posts: 313
Joined: December 12th, 2012, 8:46 pm

Re: Error in ERROR LOG

Postby aseemgarg321 » August 10th, 2016, 5:29 pm

Thanks again Rob..

What i understood from FE Flash guy(me being Server Guy) is that - his only point is that if this is was somewhere in our code, We should have got some function name from our piece of code. But no function is mentioned from our code.. May be we are missing something..

Let me brainstorm with him again.. :)

Thanks,
Aseem
aseemgarg321
 
Posts: 104
Joined: March 28th, 2015, 9:54 am

Re: Error in ERROR LOG

Postby robscherer123 » August 10th, 2016, 6:27 pm

Sure thing, I've been doing flash for years now and it's my main expertise, so if you have any questions maybe I can help.

This is what I believe is essentially happening for you (error 1 as your described):

Code: Select all
myConnection.addMessageHandler("SRTNGS_CLOSING_ROOM_PLYR_DATA", closeRoomPlayerData);

function closeRoomPlayerData(_m:Message):void {
     var mc:MovieClip;
     mc.nextFrame(); //This will throw the #1009 error you are receiving in your error log.
}


For the above error, it would appear something like this in the error log:

TypeError: Error #1009
at GameMain/closeRoomPlayerData()
at playerio::Connection/handleMessage()
at flash.events::EventDispatcher/dispatchEvent()
at playerio.utils::BinarySerializer/onMessage()
at flash.events::EventDispatcher/dispatchEvent()
at MessageBuilder/AddValue()
at playerio.utils::BinarySerializer/onValue()
at flash.events::EventDispatcher/dispatchEvent()
at TokenBuilder/AddByte()
at playerio.utils::BinarySerializer/AddByte()
at MethodInfo-116()
in callback handler for Connection.addMessageHandler("SRTNGS_CLOSING_ROOM_PLYR_DATA")


To be even more specific, for you I think you may be declaring your function inline so it is reporting as "Function/<anonymous>()" as you described in your first post. So that's probably why it's not saying a specific function name for you. So this is probably what your code looks like I'm going to assume?:

Code: Select all
myConnection.addMessageHandler("SRTNGS_CLOSING_ROOM_PLYR_DATA", function():void {
   //Do stuff here when the message is received.  This code is throwing the #1009 error.
});
robscherer123
Paid Member
 
Posts: 313
Joined: December 12th, 2012, 8:46 pm

Re: Error in ERROR LOG

Postby aseemgarg321 » August 10th, 2016, 7:17 pm

hey Rob,

No we dont have any Inline Functions.. All message handlers point to some of other functions..
I Guess First issue must have been something, Which hasn't comeback for few days in our testing..
Will keep a watch on this, and if something comes back again, will surely go deeper..

But 2nd issue is Consistent, and very Weird that I am not getting any Function or Object name here..
Which makes me wonder what exactly might be issue :(..

Thanks,
Aseem
aseemgarg321
 
Posts: 104
Joined: March 28th, 2015, 9:54 am

Re: Error in ERROR LOG

Postby ChristianD » August 12th, 2016, 4:09 am

Hi Aseem,

Are you trying to deserialize a piece of a message that's of the wrong type? Or are you missing to send in an argument that you're expecting to deserialize on the AS3 side?
Christian
ChristianD
.IO
 
Posts: 63
Joined: May 13th, 2016, 4:44 am

Re: Error in ERROR LOG

Postby aseemgarg321 » August 12th, 2016, 4:33 pm

hey Chris,

Could not make out what you mean by - "trying to deserialize a piece of a message".
Could you please elaborate with an example?

Thanks,
Aseem
aseemgarg321
 
Posts: 104
Joined: March 28th, 2015, 9:54 am

Re: Error in ERROR LOG

Postby ChristianD » August 13th, 2016, 4:12 am

Say that you on the serverside send a message with no arguments, but on the client side you expect there to be an argument, and when you try to read it from the message, there's nothing there, and you'll get an error message.

Or, if you send a message from the serverside with an argument of one type, for example DateTime, and then you try to read it as another type on the client, for exampel a string, you'll probably get an error message as well.

(If you try to do this with a .Net client you are guaranteed an error message, AS3 is a bit less type-strict, so some conversions might work anyway)
Christian
ChristianD
.IO
 
Posts: 63
Joined: May 13th, 2016, 4:44 am

Re: Error in ERROR LOG

Postby aseemgarg321 » August 13th, 2016, 6:32 am

Hi Chris,

I dont think any such Case is happening, As this error is not Permanent one, This is Randomly occurring.. If any such Code issue must have been there then this should had been a permanent issue.

Also If this was an error while reading the Message at client side. we should have got the function name atleast.. My problem is it is not even mentioning function name..

Thanks,
Aseem
aseemgarg321
 
Posts: 104
Joined: March 28th, 2015, 9:54 am


Return to ActionScript 3.0



cron