+ Reply to Thread
Results 1 to 5 of 5

Thread: AS3 api: EsObject.toString throws an exception for dataType=ByteArray

  1. #1
    Junior Member
    Join Date
    Feb 2011
    Posts
    9
    Thanks
    0
    Thanked 0 Times in 0 Posts

    AS3 api: EsObject.toString throws an exception for dataType=ByteArray

    TypeError: Error #1009: Cannot access a property or method of a null object reference.
    at com.electrotank.electroserver5.api::EsObject/toString()[/Users/jason/Projects/Electrotank/ES/client/as3/src/core/com/electrotank/electroserver5/api/EsObject.as:126]
    at EsClientAPI/onUserVariableUpdateEvent()[D:\projects\mmo\client\core-lib\src\garbuz\mmo\remoting\electroserver\EsClient API.as:134]
    at Function/http://adobe.com/AS3/2006/builtin::apply()
    at garbuz.common.commands::CallFunctionCommand/execute()[D:\projects\mmo\garbuz-lib\common\src\garbuz\common\commands\CallFunction Command.as:18]
    at garbuz.mmo.remoting.electroserver::EsConnection/processCalls()[D:\projects\mmo\client\core-lib\src\garbuz\mmo\remoting\electroserver\EsConnec tion.as:91]


    EsObject.toString() method:
    ByteArray is a special class and it cannot be handled the same way as other arrays.

    Last edited by tcarr; 03-22-2011 at 04:19 PM. Reason: bug will be fixed in version 5.2, so changed prefix

  2. #2
    Administrator tcarr's Avatar
    Join Date
    Dec 2007
    Posts
    7,214
    Thanks
    80
    Thanked 1,086 Times in 1,075 Posts
    Thanks for pointing this out. I knew that toXML and fromXML didn't work with byte arrays, but wasn't aware that toString didn't work.

    Is there a value in tracing an EsObject that contains a byte array? I'm not sure that would be human readable.
    Teresa Carrigan
    Senior Engineer
    Electrotank, Inc.

  3. #3
    Junior Member
    Join Date
    Feb 2011
    Posts
    9
    Thanks
    0
    Thanked 0 Times in 0 Posts
    It doesnt need to be redable, it could be a hex representation for intstance. but at least it shouldnt throw an exception.

  4. #4
    Administrator tcarr's Avatar
    Join Date
    Dec 2007
    Posts
    7,214
    Thanks
    80
    Thanked 1,086 Times in 1,075 Posts
    I'll add a ticket for this to our system.
    Teresa Carrigan
    Senior Engineer
    Electrotank, Inc.

  5. #5
    Administrator tcarr's Avatar
    Join Date
    Dec 2007
    Posts
    7,214
    Thanks
    80
    Thanked 1,086 Times in 1,075 Posts
    I found a fix for it. This will be available in the next release. If you need it sooner, let me know and I'll tell you how to edit EsObject.as or a new swc (although I'm not sure that a new swc would work with ES5.1; I'm running a patched server).
    Teresa Carrigan
    Senior Engineer
    Electrotank, Inc.

+ Reply to Thread

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts