Freelancer Community Network
Reminder: Internet Explorer 6 or below are NOT supported.
HomeHome
ForumForum
WikiWiki
DownloadsDownloads
ForgeForge
Multiplayer Connection Tutorial
Collapse/Expand Random Image
Collapse/Expand Login
Username:

Password:

Remember me



Lost Password?

Register now!
Collapse/Expand Chat
Collapse/Expand Who's Online
80 user(s) are online (49 user(s) are browsing Forum)

Members: 0
Guests: 80

more...
Collapse/Expand Donations
Monthly costs: -30€
Income (ads): +5€
Donations (last month): +10€

Current balance: -300€
(last updated 11/2017)

Please make a donation if you want to help keeping The-Starport online:

Bitcoin address:
Thanks!
Collapse/Expand Links
Collapse/Expand Advertisement
There are currently 98 users playing Freelancer on 34 servers.
November. 22, 2017

Browsing this Thread:   1 Anonymous Users



 Bottom   Previous Topic   Next Topic  Register To Post



Crash on System Change
Starport Admin
Joined:
2009/2/21 21:42
Group:
Webmasters
Registered Users
Posts: 3457
Offline
So I'm wrestling with a particularly nasty bug which is extremely hard to track down. Our hyperspace system completely replaces regular jump gates and holes and relies on forced system switching to work.

In the majority of the cases, the entire thing works fine, but for certain players the game crashes when the system is switched. I've tried tracking it down, but couldn't find anything conclusive.

The only thing I have is a bunch of dumps from after the actual problem which arise on every frame render. The error is:

Unhandled exception at 0x063456F8 (common.dll) in fwtow_06.01.2016_21.32.59-1.dmp: 0xC0000005: Access violation reading location 0x000000FC.

Tracing that down, I find a pretty short piece of code which seems to be involved in getting the ship's center of mass. Since the only ship in hyperspace is the player's, I'm assuming that that is the ship being handled. Looking at the particular line, edx is 0 and it's set as ecx + 0x18.

I don't know what ecx is though (it probably is the CObject?) and I have no information as to what's at 0x18 since the dump doesn't include that memory.

This sounds like information is being corrupted, but the fact it's a null pointer instead of, say, an invalid floating point value, makes me puzzled.

Any ideas?

Posted on: 2016/1/9 20:59
"Cynicism is not realistic and tough. It's unrealistic and kind of cowardly because it means you don't have to try."
-Peggy Noonan
Top
Re: Crash on System Change
Just can't stay away
Joined:
2008/2/17 19:44
From Virginia
Group:
Registered Users
FLServer Admins
Senior Members
Posts: 364
Offline
Sounds like the beam bug. About 1 out of 8 times I beam someone and they F1, an undock causes them to crash out of the server. Totally random.

But if they beam and sit for a minute, then F1 and sit another minute, no crash. The server seems to check player positions and will auto-update given time.

Posted on: 2016/1/10 1:03
http://UnderVerse.us
http://FreelancerCommunity.net
Top
Re: Crash on System Change
Just can't stay away
Joined:
2008/6/16 20:41
Group:
Registered Users
FLServer Admins
Trusted Speciality Developers
Posts: 311
Offline
Hm the exception offset seems to be:

Code:

 0 e 063456f8     0001 (0001)  0:**** Common!BaseWatcher::set_pointer+0x40e8


There are various stack traces when i set this breakpoint. But most are related to:

Code:

 #   Memory  ChildEBP RetAddr  Args to Child              
WARNING: Stack unwind information not available. Following frames may be wrong.
00           054ac6b8 06284585 054ac6f0 0d195500 00000001 Common!BaseWatcher::set_pointer+0x40e8
01        38 054ac6f0 06284555 00957118 0d2a7e88 00000001 Common!PhySys::GetCenterOfMass+0x15
02        28 054ac718 06284585 47015706 c42058fa 06284466 Common!PhySys::GetRadiusR+0x1e5
03           00000000 00000000 00000000 00000000 00000000 Common!PhySys::GetCenterOfMass+0x15


As usual the BaseWatcher::set_pointer
The set_pointer takes a Watchable struct pointer which could be everything. However when i try to get the symbol for that pointer then it is

Code:

054ac6f0 062844a5 Common!PhySys::GetRadiusR+0x135


As GetRadious takes an CObject pointer and a reference to a Vector (and a bool which doesnt play a role i guess) one of both seems to be null. As a reference cannot be null i assume its the CObject.

I am not sure whether this is of any useful information. I would assume its a timing issue, where for some players something is not yet constructed or destroyed or something like this.

Posted on: 2016/1/10 12:25
Open in new window
Top
Re: Crash on System Change
Starport Admin
Joined:
2009/2/21 21:42
Group:
Webmasters
Registered Users
Posts: 3457
Offline
Once the teleport has happened the game seems unable to recover. Since other teleports work fine, I have doubts it's a timing issue.

Also, the code is definitely in GetCenterOfMass, not in any of those other functions. Look at the offsets, BaseWatcher::set_pointer not 0x40e8 bytes long. The call stack I get works its way back up through various updating functions, starting in CShip::update.

The only oddity is that if you go even before CShip::update, there are calls to readfile.dll. I'm not sure why file reads would happen there (maybe it's loading the system and failing?) or why a file read would call the ship's update function.

Posted on: 2016/1/10 15:41
"Cynicism is not realistic and tough. It's unrealistic and kind of cowardly because it means you don't have to try."
-Peggy Noonan
Top