UnitSync :: GetModOptionCount Crash - Page 2

UnitSync :: GetModOptionCount Crash

Discuss development of lobby clients, server, autohosts and auto-download software.

Moderators: Moderators, Lobby Developers

User avatar
Forboding Angel
Evolution RTS Developer
Posts: 14673
Joined: 17 Nov 2005, 02:43

Re: UnitSync :: GetModOptionCount Crash

Post by Forboding Angel »

Hoijui, that does not fix anything in Evolution RTS. The crash still happens.

http://code.google.com/p/evolutionrts/s ... ptions.lua

I also noticed this in debuglog:

Code: Select all

UNITSYNC :: Config:		 C:\Users\Forboding Angel\AppData\Local\springsettings.cfg 
UNITSYNC :: Data directory:	 1 dirs 
UNITSYNC :: Data directory:	 D:\Evolution RTS Standalone clone\ 
UNITSYNC :: RW Dir:		 D:\Evolution RTS Standalone clone\ 
Spring is in isolation mode... Why is unitsync returning C:\Users\Forboding Angel\AppData\Local\springsettings.cfg?
User avatar
hoijui
Former Engine Dev
Posts: 4344
Joined: 22 Sep 2007, 09:51

Re: UnitSync :: GetModOptionCount Crash

Post by hoijui »

if you still crash without cursed, then it might be an other mod, or a compleetly other problem, thus we would need a new translated/translatable stack trace.
User avatar
Forboding Angel
Evolution RTS Developer
Posts: 14673
Joined: 17 Nov 2005, 02:43

Re: UnitSync :: GetModOptionCount Crash

Post by Forboding Angel »

D:\Evolution RTS Standalone clone\

Is a clone of my standalone Desura installer (Desura is implementing standalone installs). All it is is Evo + maps.

Can I run the debugger on my end easily without having to have some sort of +5 IDE whatsawhosit compiler hoohaa of brokenness?

If absolutely necessary I can zip of my clone so you can dl it.

Does modoptions have anything to do with maps? Could unitsync be reporting it as modoptions issues when it's actually mapoptions issues?

Unfortunately I'm utterly powerless to test that theory atm. I'll give it a try tomorrow if I can.
User avatar
bibim
Lobby Developer
Posts: 959
Joined: 06 Dec 2007, 11:12

Re: UnitSync :: GetModOptionCount Crash

Post by bibim »

As I said in the post linked here, I identified same crash in getMapOptionCount with certain maps, so yes I would say it can be some of your maps which trigger this crash too.
User avatar
Forboding Angel
Evolution RTS Developer
Posts: 14673
Joined: 17 Nov 2005, 02:43

Re: UnitSync :: GetModOptionCount Crash

Post by Forboding Angel »

It's not a map causing this. Left only evo 196 and small divide remake in and it still crashes.

It's a lobby bug. Confirmed and now I know how to reproduce it.

I left only evo 196 installed and small divide remake in. Deleted .lobby, and ran it. Started up fine and let me join the game correctly (except it was saying that I was unsynced). I closed the lobby, restarted it, tried to join the same game, boom crash.

Easy to reproduce.
a1983
Posts: 55
Joined: 02 Dec 2009, 12:01

Re: UnitSync :: GetModOptionCount Crash

Post by a1983 »

Yes. It's a lobby bug, because first start is incorrect. When you see "unsynced" state it's mean that getModOptionCount not called. In second launch you catch crash. I'll try to launch evo mod (evo:revision:196) and submit backtrace.
a1983
Posts: 55
Joined: 02 Dec 2009, 12:01

Re: UnitSync :: GetModOptionCount Crash

Post by a1983 »

I check option.cpp source and found as in previous crash was caused by thrown exception: throw content_error().
In case of evo:revision:196. It's called in Option.cpp:153

Code: Select all

throw content_error("parseOption: (key=" + opt.key + ") unknown type \"" + opt.type + "\"");
But It must be catched in try...catch block of function
option_parseOptionsInternal
at Option.cpp:187. Instead it cause crash.
Attachments
crash_dump_Evolution RTS - test-196.txt
(10.98 KiB) Downloaded 117 times
User avatar
koshi
Lobby Developer
Posts: 1059
Joined: 14 Aug 2007, 16:15

Re: UnitSync :: GetModOptionCount Crash

Post by koshi »

That's pretty useless to everybody that cannot access your source, isn't it?
a1983
Posts: 55
Joined: 02 Dec 2009, 12:01

Re: UnitSync :: GetModOptionCount Crash

Post by a1983 »

The function above is from Spring git. https://github.com/spring/spring/blob/d ... Option.cpp
I can share my test code, but to compile and run it you should install Qt libraries. I'm use (4.7.4 version).
I think error's reason is different compilers. Notalobby used mingw 4.4.0 and unitsync - 4.4.4. I'll try new compiler version.
User avatar
jK
Spring Developer
Posts: 2299
Joined: 28 Jun 2007, 07:30

Re: UnitSync :: GetModOptionCount Crash

Post by jK »

Finally someone begins to understand the problem ...
It is not a (pure) unitsync issue, unitsync throws an exception _but_ it should get catched _in_ the unitsync. So if this doesn't happen it must be a problem between lobby & unitsync.
So lobby devs need to do a little bit more than saying "it crashes".

Is it perhaps a problem that the unitsync gets build with dwarf2 exception handling and the lobby uses sjlj? and if so does it matter if the unitsync is static or dynamic linked??
a1983
Posts: 55
Joined: 02 Dec 2009, 12:01

Re: UnitSync :: GetModOptionCount Crash

Post by a1983 »

Sorry for noobish troubleshooting )))
Lobby used dwarf2 exception handling and unitsync.dll linked dynamicly. But unitsync and lobby use different libgcc_s_dw2-1.dll due different mingw version.
User avatar
Forboding Angel
Evolution RTS Developer
Posts: 14673
Joined: 17 Nov 2005, 02:43

Re: UnitSync :: GetModOptionCount Crash

Post by Forboding Angel »

I found the solution to this problom. It is cause by games that have an old version of engineoptions.lua which has the option for diminishing mms.

Obviously it returns to unitsync with unknown because that no longer exists, However, unitsync should be smart enough to pass by without throwing an exception. Or maybe throw a soft warning. As it is now, unitsync causes everything to implode.

To fix it, just copy and pasta engineoptions.lua from spring base content into game (actually, it is quite possible that the game doesn't even need engineoptions as it is in base content anyway).
User avatar
danil_kalina
Posts: 505
Joined: 08 Feb 2010, 22:21

Re: UnitSync :: GetModOptionCount Crash

Post by danil_kalina »

Unitsync code is right. It uses exceptions to catch "soft" error (bad options) not checking error status by value like Qt way.

In NotaLobby "try catch" doesn't work in shared library (UnitSync) - mingw problem.
Not confirmed
abma
Spring Developer
Posts: 3798
Joined: 01 Jun 2009, 00:08

Re: UnitSync :: GetModOptionCount Crash

Post by abma »

any news an this issue?
User avatar
danil_kalina
Posts: 505
Joined: 08 Feb 2010, 22:21

Re: UnitSync :: GetModOptionCount Crash

Post by danil_kalina »

we need to fix some little issues.
and then we try to rebuild using microsoft compiler first, then another version of mingw
news will be these weekends or next week
a1983
Posts: 55
Joined: 02 Dec 2009, 12:01

Re: UnitSync :: GetModOptionCount Crash

Post by a1983 »

We compiled Qt libraries using compiler msvc2010, and built NotaLobby using them. The crashes was gone!
Then we used mingw 4.6.1 with sjlj exceptions from TDM bundle to recompile Qt and NotaLobby again. All works fine! Crashes did not appeared.
Post Reply

Return to “Lobby Clients & Server”