Reminder: Internet Explorer 6 or below are NOT supported.





There are currently 84 users playing Freelancer on
40 servers. | April. 19, 2021 |
The Starport Forum Index
>
The Shipyard
>
Speciality Modding
>
Freelancer-related Programming
>
Crash on System Change
Browsing this Thread:
1 Anonymous Users
Crash on System Change |
||||
---|---|---|---|---|
Starport Admin
![]() ![]() Joined:
2009/2/21 21:42 Group:
Webmasters Registered Users
Posts:
3520
![]() |
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 |
||||
|
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:
369
![]() |
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 |
||||
|
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:
312
![]() |
Hm the exception offset seems to be:
Code:
There are various stack traces when i set this breakpoint. But most are related to: Code:
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:
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
|
|||
![]() |
||||
|
Re: Crash on System Change |
||||
---|---|---|---|---|
Starport Admin
![]() ![]() Joined:
2009/2/21 21:42 Group:
Webmasters Registered Users
Posts:
3520
![]() |
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 |
||||
|