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
54 user(s) are online (19 user(s) are browsing Forum)

Members: 0
Guests: 54

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

Current balance: -65€
(last updated 10/2019)

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 46 users playing Freelancer on 43 servers.
November. 20, 2019

Browsing this Thread:   1 Anonymous Users



 Bottom   Previous Topic   Next Topic  Register To Post



Crash @ 0x6341616 (Common.dll)
Just can't stay away
Joined:
2008/5/9 17:27
Group:
Registered Users
FLServer Admins
Trusted Speciality Developers
Senior Members
Posts: 240
Offline
Hey,

we've got a crash @ 0x6341616 in Common.dll.

Does anyone has a clue what could cause this crash?

It's part of the function at 0x6341610: protected: void __thiscall BaseWatcher::set_pointer(struct Watchable const *)
?[email protected]@@[email protected]@@Z

which seems to be called from a lot different positions.

The Disassembly at 0x6341616 is:
mov edx, [eax]

edx = 0
eax = 4

Any hint would be much appreciated.

Cheers,
Crazy

Posted on: 2015/7/13 8:57
Top
Re: Crash @ 0x6341616 (Common.dll)
Home away from home
Joined:
2009/8/16 2:58
From Qld, Aus.
Group:
Registered Users
FLServer Admins
Trusted Speciality Developers
Senior Members
Posts: 1909
Offline
Need to know where it's coming from to properly analyze, but this might work: common.dll, 0E1620, C0->D2. That checks edx is 0, rather than eax (which is edx+4, so not likely to happen). Whether that's sufficient remains to be seen...

Posted on: 2015/7/13 15:19
Top
Re: Crash @ 0x6341616 (Common.dll)
Starport Admin
Joined:
2008/2/26 20:36
From Germany
Group:
Webmasters
Registered Users
Posts: 1776
Offline

Posted on: 2015/7/13 15:40
aka chaosgrid
https://www.freelancerserver.de
https://www.moddb.com/mods/fwtow
Top
Re: Crash @ 0x6341616 (Common.dll)
Just can't stay away
Joined:
2008/5/9 17:27
Group:
Registered Users
FLServer Admins
Trusted Speciality Developers
Senior Members
Posts: 240
Offline
Hm, the MiniDump doesn't seem to contain a valid StackTrace.. or Visual Studio isn't able to reconstruct it.

Anyway I've implemented your patch @Adoxa. Thanks a lot.

I'll report whether we still get BaseWatcher crashes or not.

Posted on: 2015/7/13 22:52
Top
Re: Crash @ 0x6341616 (Common.dll)
Just can't stay away
Joined:
2008/5/9 17:27
Group:
Registered Users
FLServer Admins
Trusted Speciality Developers
Senior Members
Posts: 240
Offline
We hadn't a BaseWatcher crash till this morning.
So it's actually working. But now I get the following crash:

Unhandled exception at 0x06341616 (Common.dll) in flserver_16.07.2015_08.16.dmp-1.dmp: 0xC0000005: Access violation reading location 0x6F6C5F6B.

Same offset but this time with invalid data > 0 I guess:
EAX 0x6f6c5f6b
EBX 0x00000000
ECX 0x0c6df1b4
EDX 0x6f6c5f67
ESI 0x0ddd9c30
EDI 0x0c6df1b4
EBP 0x08926a50
EIP 0x06341616
ESP 0x038190f0

In this case the return adress is: 0x062c28ee so it was called from 0x62C28E9 which is part of ScanList::add_in_range(class Vector const &,float,struct IObjDB *,unsigned int,struct Filter *);

Any idea how to fix the crash or how to find out what is causing it?

Posted on: 2015/7/16 9:57
Top
Re: Crash @ 0x6341616 (Common.dll)
Home away from home
Joined:
2009/8/16 2:58
From Qld, Aus.
Group:
Registered Users
FLServer Admins
Trusted Speciality Developers
Senior Members
Posts: 1909
Offline
I don't know how you can say it's working, when it didn't work...

As far as add_in_range is concerned, there's an array of 256 watchables, so I thought it might be overflowing; but it does detect the limit and that crash is at the first one, anyway (EDI == ECX).

EDX contains ASCII for 'g_lo' (probably some engine or wing LOD), which suggests something else is overwriting the linked list (since EAX == EDX+4, it's occurring after the first link), which means logging set_pointer wouldn't help much (and I think it would log too much to be practical, anyway).

Don't really know what to suggest.

Posted on: 2015/7/17 4:27
Top
Re: Crash @ 0x6341616 (Common.dll)
Just can't stay away
Joined:
2008/5/9 17:27
Group:
Registered Users
FLServer Admins
Trusted Speciality Developers
Senior Members
Posts: 240
Offline
I'd say the crashes aren't that frequent as before after applying your patch (could have been luck ).

I could try to add this function into Cannons CrashCatcher which would add a try/catch around every function call and hope for no side effects. I'd only need to patch over 200 adresses

Posted on: 2015/7/17 7:23
Top
Re: Crash @ 0x6341616 (Common.dll)
Home away from home
Joined:
2009/8/16 2:58
From Qld, Aus.
Group:
Registered Users
FLServer Admins
Trusted Speciality Developers
Senior Members
Posts: 1909
Offline
You'd also have to catch unwatch, as that runs through the list, too. Even then, that only catches those two functions, not anything that actually uses the list directly. (set_pointer has 221 calls in common, 114 in freelancer and 15 in server.)

I did try removing the function altogether, but that crashed immediately on entering space; exiting early crashed on setting a target. It's just used so often, I don't even know where to begin.

Posted on: 2015/7/17 13:59
Top
Re: Crash @ 0x6341616 (Common.dll)
Just can't stay away
Joined:
2008/5/9 17:27
Group:
Registered Users
FLServer Admins
Trusted Speciality Developers
Senior Members
Posts: 240
Offline
Would a full memory dump during the crash help?

I only got a MiniDump of the MINIDUMP_TYPE MiniDumpNormal right now but I could extend it if that could help.

Posted on: 2015/7/17 14:47
Top
Re: Crash @ 0x6341616 (Common.dll)
Home away from home
Joined:
2009/8/16 2:58
From Qld, Aus.
Group:
Registered Users
FLServer Admins
Trusted Speciality Developers
Senior Members
Posts: 1909
Offline
Possibly, but unless it compresses to under 50MB, I wouldn't want to download it.

Posted on: 2015/7/19 11:34
Top
Re: Crash @ 0x6341616 (Common.dll)
Just can't stay away
Joined:
2008/5/9 17:27
Group:
Registered Users
FLServer Admins
Trusted Speciality Developers
Senior Members
Posts: 240
Offline
I fixed this crash by moving some calculations (including IObjectInspect stuff etc.) from an extra thread into the ServerImpl:Update method.

I think some function calls were overriding internal stuff (as adoxa already guesed).

Seems FLServer doesn't like multihreading when you do any internal stuff.

Sorry for wasting your time

Posted on: 2015/7/27 14:15
Top
Re: Crash @ 0x6341616 (Common.dll)
Just can't stay away
Joined:
2008/6/16 20:41
Group:
Registered Users
FLServer Admins
Trusted Speciality Developers
Posts: 312
Offline
I just can confirm that. I also used to run own functions in different threads, not connected to the serverimpl namespace. This didnt worked and first after including them again resolved it

Further multithreading isnt really worth

Posted on: 2015/7/27 18:21
Open in new window
Top