Flash throws an Exception fault when leaving a room

Hi,

So we have run into a really strange error with the PhotonCore class. I am not totally convinced it is a bug in photon, but we are running out of ideas.

We are making the following call with Photon V3 in Flash:
PhotonCore.sendOperation(CoreConstants.EV_LEAVE, [])

When the response comes back from the server, the following exception fault is thrown:
Exception fault: TypeError: Error #1123: Filter operator not supported on type class __AS3__.vec.Vector.<int>.
	at de.exitgames.photon_as3::PhotonCore/clearActorNumbers()[F:\exitgames\photon\flash\workspace\PhotonCoreAS3\classes\de\exitgames\photon_as3\PhotonCore.as:971]
	at de.exitgames.photon_as3::PhotonCore/parseResponseData()[F:\exitgames\photon\flash\workspace\PhotonCoreAS3\classes\de\exitgames\photon_as3\PhotonCore.as:994]
	at com.happystudio.net.socket::PhotonGateway/parseResponseData()[(removed)\net\socket\PhotonGateway.as:127]
	at de.exitgames.photon_as3::PhotonCore/evalTypeOfMessage()[F:\exitgames\photon\flash\workspace\PhotonCoreAS3\classes\de\exitgames\photon_as3\PhotonCore.as:877]
	at de.exitgames.photon_as3::PhotonCore/readBytesFromSocket()[F:\exitgames\photon\flash\workspace\PhotonCoreAS3\classes\de\exitgames\photon_as3\PhotonCore.as:805]
	at de.exitgames.photon_as3::PhotonCore/onData()[F:\exitgames\photon\flash\workspace\PhotonCoreAS3\classes\de\exitgames\photon_as3\PhotonCore.as:1344]

The error message is nonsensical. "Filter operator not supported on type class __AS3__.vec.Vector.<int>". I believe the "filter operator" is the period between Vector and <>. This error normally happens when you accidentally type a period after a method name or variable. However, it appears here that flash is telling us that the only class that does support the filter operator - Vector, does not support it! I really can't wrap my head around this error.

But regardless, the error is coming out of PhotonCore, apparently in the method "clearActorNumbers". We have never seen this error before, except when we started using CoreConstants.EV_LEAVE, so it seems like the result of this call is running some special code that is causing the error.

Any ideas?

Thanks,
Dennis Robinson
Fuel Industries

Comments

  • Very interesting.
    I am not a AS3 coder but looked at the lib's code and from what I see it's just fine:
    protected function clearActorNumbers():void
    {
    	_actorNumbers = new Vector.&lt;int&gt;(0, false);
    }
    

    It's called by the leave operation's response and the same code that also initializes the _actorNumbers variable:
    protected var _actorNumbers:Vector.&lt;int&gt; = new Vector.&lt;int&gt;(0, false);
    

    What is: com.happystudio.net.socket::PhotonGateway/parseResponseData()[(removed)\net\socket\PhotonGateway.as:127]?
    And: Which client lib version are you using?
  • Thanks for the response,

    I believe we are using Version 3.0.0.2 RC4 of the Flash client library.

    The PhotonGateway is a class in our code that extends your PhotonCore class. It overrides the method parseResponseData(). Our override executes a callback method, but does not modify the data in any way before passing it up to the super class (PhotonCore). I could try removing our override, but I suspect it wouldn't make any difference.
  • Maybe you can check if your override somehow affects the _actorNumbers?
    Is there even a way how clearActorNumbers() should fail? It only sets a variable with a new object.

    Does it happen all the time or rarely? Did you try new and older players? Does it happen on all and did you seek help in a Flash forum or with Adobe?
  • Tobias wrote:
    Maybe you can check if your override somehow affects the _actorNumbers?
    It certainly doesn't look like it. The override outputs a trace statement, dispatches a signal and calls a callback method.
    Tobias wrote:
    Is there even a way how clearActorNumbers() should fail? It only sets a variable with a new object.
    I wouldn't think so, which probably means that the error is occurring for some other reason, and the Flash runtime is getting confused. Which would explain the bizarre error message.
    Tobias wrote:
    Does it happen all the time or rarely?
    It happens every time we call sendOperation with CoreConstants.EV_LEAVE, but never with any other CoreConstants value. It is very consistent.
    Tobias wrote:
    Did you try new and older players?
    I assume you mean different Flash player versions. I have not tried different versions, but I will.
    Tobias wrote:
    Does it happen on all and did you seek help in a Flash forum or with Adobe?
    We have not contacted Adobe yet, as we thought it was more likely a Photon issue, but it could very well be an issue with Flash itself.
  • I did a few tests and managed to reproduce the error message. Not sure if this helps us at all though.
    new Vector.&lt;int&gt;.(test);
    
    This gives the exact same error at runtime:
    Exception fault: TypeError: Error #1123: Filter operator not supported on type class __AS3__.vec.Vector.<int>.
    I also tried this, which gives nearly the same error, but notice that the word "class" is omitted before __AS3__ in the error message:
    (new Vector.&lt;int&gt;()).(test);
    
    Exception fault: TypeError: Error #1123: Filter operator not supported on type __AS3__.vec.Vector.<int>.
    And also this, which gives a totally different error:
    new Vector.&lt;int&gt;.&lt;String&gt;();
    
    Exception fault: TypeError: Error #1127: Type application attempted on a non-parameterized type.
    This would lead me to believe that the version of Photon we are using was compiled with:
    _actorNumbers = new Vector.&lt;int&gt;(0, false);// This line
    _actorNumbers = new Vector.&lt;int&gt;.(0, false);// Looking like this (note the misplaced "period")
    
    Now certainly, that may not be the case, and from what your saying, it probably is not. But I thought I would point that out, in case it helps us find the root of the problem.
  • Okay, so more testing.

    For this project, we are compiling for Flash player 10.1, with Flex SDK 4.1. I changed it to Flash player 10.2 and Flex SDK 4.5.1, and the error still persisted.

    I have been using the debug version of Flash player 11.1.102.62. I tried installing the debug version of 11.3.300.262, and the error still occurred.
  • I'm sorry for being absent. Adding Photon Control features eats more time than anticipated.

    So, it's not the player and it should work.
    Aside from that, I can only push our flasher (when he's back) to check this and create an update asap.

    Update: I checked the versions and found at least one version which used _actorNumbers inconsistently. In that case, clearActorNumbers is actually using the "correct" dot but the initialization does not use the second dot. That must be the cause for it and my local code is newer than RC4 and has this corrected.

    I will try to build a update for you to try. But I'd prefer if our Flash guy would build a new SDK asap after that.
    I'll mail you.
  • Thanks for the update, I look forward to trying a new build of the Flash client. Hopefully it will resolve our issue.
  • Thank you for sending the updated Flash client. I have tested it, and it appears to resolve the issue completely!

    Thank you for all your assistance,
    Dennis
  • Thanks for the feedback and checking it out!
Sign In or Register to comment.