Page 1 of 1

Pathing Error Since Newest Version

Posted: 07 Jan 2011, 23:08
by Gloryride
Error:

Code: Select all

TypeError: Error #2007: Parameter child must be non-null.
	at flash.display::DisplayObjectContainer/contains()
	at com.smartfoxserver.openspace.engine.control.avatar::AvatarAnimator/moveAvatarToNextTile()[/Users/Paolo/gotoAndPlay/gotoAndPlay/SmartFoxServer/OpenSpace/Client/Classes/src/com/smartfoxserver/openspace/engine/control/avatar/AvatarAnimator.as:120]
	at com.smartfoxserver.openspace.engine.control.avatar::AvatarAnimator/onAvatarAnimationCompleted()[/Users/Paolo/gotoAndPlay/gotoAndPlay/SmartFoxServer/OpenSpace/Client/Classes/src/com/smartfoxserver/openspace/engine/control/avatar/AvatarAnimator.as:473]
	at com.smartfoxserver.openspace.engine.control.avatar::AvatarAnimator/onAvatarAnimationStep()[/Users/Paolo/gotoAndPlay/gotoAndPlay/SmartFoxServer/OpenSpace/Client/Classes/src/com/smartfoxserver/openspace/engine/control/avatar/AvatarAnimator.as:343]
	at Function/http://adobe.com/AS3/2006/builtin::apply()
	at com.greensock::TweenMax/renderTime()[/Users/Paolo/gotoAndPlay/gotoAndPlay/SmartFoxServer/OpenSpace/Client/Classes/src/com/greensock/TweenMax.as:749]
	at com.greensock.core::SimpleTimeline/renderTime()[/Users/Paolo/gotoAndPlay/gotoAndPlay/SmartFoxServer/OpenSpace/Client/Classes/src/com/greensock/core/SimpleTimeline.as:74]
	at com.greensock::TweenLite$/updateAll()[/Users/Paolo/gotoAndPlay/gotoAndPlay/SmartFoxServer/OpenSpace/Client/Classes/src/com/greensock/TweenLite.as:616]

This happens whenever I give the OS avatar multiple path orders. That is, click to move, then click to move while still pathing to the previous goal. The avatar seems to path correctly if I wait for it to stop moving; and consistently will throw an error when clicking while moving. This may also be related in some way to clicking on a walk tile while the camera is moving - if that helps your debugging.

Posted: 10 Jan 2011, 17:36
by Bax
Thank you for reporting. Could you record a video showing the error happening?

Posted: 10 Jan 2011, 20:32
by Gloryride
I'll record a video sometime this week if the error persists. If it mysteriously fixes itself - I'll let you know.

Posted: 11 Jan 2011, 07:04
by Bax
I don't think it will fix itself :D
But this is a very difficult bug to catch, so any help in reproducing it will be welcome.

Posted: 28 Mar 2011, 12:44
by DeLo
Actually, path finding got even worse in 2.0.3 for us. The only problem in 2.0.0 was that path was doubled in length if player double clicks.

Now, path is not updated if I click elsewhere while avatar is walking.
After first path is completed, OS starts that new movement, but path is no longer correct for that position.
It happens every time.
You can see our problem in this video I've made:

http://www.youtube.com/watch?v=NqxA0IAPbhA

Our SFS/OS server is installed in Windows Server 2008
Client runs in Windows 7

OS server xml path config:
<PathfinderType>default</PathfinderType>
<PfMaxTimeBeforeWarning>200</PfMaxTimeBeforeWarning>
<PfMaxTimeBeforeQuit>0</PfMaxTimeBeforeQuit>
<DumpPathNodes>1</DumpPathNodes>
If i change PathfindetType to concurrent, Java throws memory exeption (heap size) - I believe this shouldn't happen too. I haven't found any other potentially important properties to customize.

Server console log during recorded actions (1st part):
14:27:22.087 - [ INFO ] > [OpenSpace] User 100000322652456 [0] requested path fr
om (11, 6, 0) to (6, 17, 0) on map '03#Chinease'
14:27:22.096 - [ INFO ] > [OpenSpace] Path processing requested by user 10000032
2652456 [0] completed:
PATH NODES: [(11,6,0), (11,7,0), (11,8,0), (11,9,0), (11,10,0), (11,11,0), (11,1
2,0), (11,13,0), (11,14,0), (11,15,0), (10,16,0), (9,16,0), (8,16,0), (7,16,0),
(6,17,0)]
PATH DIRECTIONS: (11,6,0) --> [6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 0, 0, 0, 7] --> (6,
17,0)
14:27:22.098 - [ INFO ] > [OpenSpace] Path to (6,17,0) target coordinates found
and sent to all users in the same room
14:27:23.596 - [ INFO ] > [OpenSpace] User 100000322652456 [0] requested path fr
om (11, 10, 0) to (18, 10, 0) on map '03#Chinease'
14:27:23.599 - [ INFO ] > [OpenSpace] Path processing requested by user 10000032
2652456 [0] completed:
PATH NODES: [(11,10,0), (12,10,0), (13,10,0), (14,10,0), (15,10,0), (16,10,0), (
17,10,0), (18,10,0)]
PATH DIRECTIONS: (11,10,0) --> [4, 4, 4, 4, 4, 4, 4] --> (18,10,0)
14:27:23.601 - [ INFO ] > [OpenSpace] Path to (18,10,0) target coordinates found
and sent to all users in the same room

Flash trace during recorded actions:
[INFO] Avatar '0' created in (11,0,0)
[INFO] Path to (11,6,0) coordinates received for avatar 0 // this movement done BEFORE recording
[INFO] Path to (6,17,0) coordinates received for avatar 0
[INFO] Path to (18,10,0) coordinates received for avatar 0
TypeError: Error #1009: Cannot access a property or method of a null object reference.
at com.smartfoxserver.openspace.shared.control.map::MapManager/getTileByShift()
at com.smartfoxserver.openspace.shared.control.map::MapManager/getTileByDirection()
at com.smartfoxserver.openspace.engine.control::IsoEngineController/http://www.smartfoxserver.com/openspace ... irection()
at com.smartfoxserver.openspace.engine.control.avatar::AvatarAnimator/moveAvatarToNextTile()
at com.smartfoxserver.openspace.engine.control.avatar::AvatarAnimator/onAvatarAnimationCompleted()
at com.smartfoxserver.openspace.engine.control.avatar::AvatarAnimator/onAvatarAnimationStep()
at Function/http://adobe.com/AS3/2006/builtin::apply()
at com.greensock::TweenMax/renderTime()
at com.greensock.core::SimpleTimeline/renderTime()
at com.greensock::TweenLite$/updateAll()

I don't know if this info will do any help, but just in case:
- We use full licensed version of OpenSpace
- Map is not scrollable, CustomLimits are set instead (exact size of the map)
- Avatar tag looks like this
<AvatarTypes use8Directions="1">
<AvatarType mainClass="CustomAvatarMovieClip" ghostClass="DemoGhost" stature="55">demo2</AvatarType>
</AvatarTypes>
Also I set avatar speed in clientside (.animationTime = 300)
- SFS exentionResponseHandler gets SFSEvent with _cmd = "_os_move" every time avatar starts to move, but I do nothing with it. I also do not understand why this event needs to be dispatched separately from OS updates, it seems to be redundant.


This bug is a severe one, so we hope You are able to find it and fix it soon!

Posted: 28 Mar 2011, 22:27
by Bax
This is very strange, because as soon as you click on a new tile, OpenSpace dismisses the previous path and makes the avatar walk to the new destination. In fact we can't reproduce this issue at all, and no other customer has reported this.
First of all, are you sure you updated both the client and the server when upgrading to 2.0.3? If yes, are you sure your server-side extension (which extends the OpenSpace one) can "see" the latest version when compiling?
Also, do you use the default OpenSpace system to make the avatars move, or do you use the server-side method?