UnitSync :: GetModOptionCount Crash

UnitSync :: GetModOptionCount Crash

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

Moderators: Moderators, Lobby Developers

User avatar
danil_kalina
Posts: 505
Joined: 08 Feb 2010, 22:21

UnitSync :: GetModOptionCount Crash

Post by danil_kalina »

Execute GetModOptionCount, crash in game The Cursed and Evolution RTS

try to execute in separate project, also crash
Last edited by danil_kalina on 13 Jan 2012, 16:21, edited 1 time in total.
User avatar
danil_kalina
Posts: 505
Joined: 08 Feb 2010, 22:21

Re: UnitSync, GetModOptionCount Crash

Post by danil_kalina »

I guess the same issue
abma
Spring Developer
Posts: 3798
Joined: 01 Jun 2009, 00:08

Re: UnitSync, GetModOptionCount Crash

Post by abma »

User avatar
danil_kalina
Posts: 505
Joined: 08 Feb 2010, 22:21

Re: UnitSync, GetModOptionCount Crash

Post by danil_kalina »

unitsync.log is empty
how to turn it on ?
abma
Spring Developer
Posts: 3798
Joined: 01 Jun 2009, 00:08

Re: UnitSync :: GetModOptionCount Crash

Post by abma »

setting
LogSections = ArchiveScanner, VFS
in springsettings.cfg should enable some logging.

can you be more specific what functions you are calling?

this example doesn't crash: http://pastebin.com/R7izPY59

(written in python using the unitsync / ctypes wrapper from upq)
User avatar
danil_kalina
Posts: 505
Joined: 08 Feb 2010, 22:21

Re: UnitSync :: GetModOptionCount Crash

Post by danil_kalina »

we call GetModOptionCount()

games that are 100% crash: The Cursed 1.16, Evoultion RTS 1.9
OS: Windows

we'll try to turn the logging
a1983
Posts: 55
Joined: 02 Dec 2009, 12:01

Re: UnitSync :: GetModOptionCount Crash

Post by a1983 »

UnitSync crashed exactly after getModOptionCount in The Cursed 1.16.
By the way, can I change LOG_LEVEL_INFO?
Attachments
unitsync.log
(1.72 KiB) Downloaded 129 times
User avatar
hoijui
Former Engine Dev
Posts: 4344
Joined: 22 Sep 2007, 09:51

Re: UnitSync :: GetModOptionCount Crash

Post by hoijui »

abma was asking for what functions you are calling.
if you would really be calling only this one function, it would be no wonder that you crash, and i am sure you are not doing that.

i guess we can be somewhat sure that it is a problem that happens on windows only. that could mean it is related to a file-system call, or it has to do with access to non-explicitly initialized memory, or... maybe something else. :D
a1983
Posts: 55
Joined: 02 Dec 2009, 12:01

Re: UnitSync :: GetModOptionCount Crash

Post by a1983 »

That's UnitSync Functions calls sequence that cause crash. Help me!!!
Attachments
NotaLobbyUnitSync.log
(1.61 KiB) Downloaded 45 times
abma
Spring Developer
Posts: 3798
Joined: 01 Jun 2009, 00:08

Re: UnitSync :: GetModOptionCount Crash

Post by abma »

sorry, i don't get a crash here, when i try to call these functions on windows...


can you please run the program with an attached debugger and get a stacktrace?
User avatar
Forboding Angel
Evolution RTS Developer
Posts: 14673
Joined: 17 Nov 2005, 02:43

Re: UnitSync :: GetModOptionCount Crash

Post by Forboding Angel »

Abma, spring must be in isolation mode in order to get the crash
abma
Spring Developer
Posts: 3798
Joined: 01 Jun 2009, 00:08

Re: UnitSync :: GetModOptionCount Crash

Post by abma »

it also doesn't crash for me in isolation-mode... :-/

please do a "bt full" with "gdb"...
a1983
Posts: 55
Joined: 02 Dec 2009, 12:01

Re: UnitSync :: GetModOptionCount Crash

Post by a1983 »

Thx for responce :)
It's really weird crash. I can't catch exception by gdb, stack is not available. May be it's special to windows7 64 or mingw 4.4.0?
User avatar
hoijui
Former Engine Dev
Posts: 4344
Joined: 22 Sep 2007, 09:51

Re: UnitSync :: GetModOptionCount Crash

Post by hoijui »

you need debug symbols for untisync. they can be found here for current latest release:
http://springrts.com/dl/buildbot/defaul ... ync_dbg.7z
extract this archive, and make sure that gdb uses the file. i think you do it with the -s symbol-file cmd-line switch (or some gdb console command).
a1983
Posts: 55
Joined: 02 Dec 2009, 12:01

Re: UnitSync :: GetModOptionCount Crash

Post by a1983 »

It's too hard to me :) I'm not strong in gdb debuging. But I got trace at last.
It looks like exception raised by "throw content_error()" in Option.cpp raise another uncaught exception. Or something else... )))
Attachments
dump.txt
(12.07 KiB) Downloaded 33 times
User avatar
hoijui
Former Engine Dev
Posts: 4344
Joined: 22 Sep 2007, 09:51

Re: UnitSync :: GetModOptionCount Crash

Post by hoijui »

nice! :-)
thanks, and well done! :-)

it looks like this archive contains bad options:
28f1e3632fb713d232c8c75f2373f2bf.sdp
this is a an archive managed by rapid, and as much as i know, you should be able to delete the file by hand, or .. maybe try to do a rapid cleanup first, and see if that removes it already.

edit:
to det/Licho/anyone else who knows... how can we find out the rapid tag that belongs to this archive, so we can test ourselfs?
thanks to jk, i found out that it is thecursed:version:1.16, will now extract mod options...
Last edited by hoijui on 16 Jan 2012, 20:53, edited 1 time in total.
a1983
Posts: 55
Joined: 02 Dec 2009, 12:01

Re: UnitSync :: GetModOptionCount Crash

Post by a1983 »

So why it cause crash? In code content_error created and crash is caused exactly by throw. It's strange, because I think exception must be caught and try to log error.
Of cause I can delete this file but where I can get good mod file. And what to do with broken archive?

P.S. I downloaded that archive just now using rapid_gui (The Cursed 1.16)
User avatar
hoijui
Former Engine Dev
Posts: 4344
Joined: 22 Sep 2007, 09:51

Re: UnitSync :: GetModOptionCount Crash

Post by hoijui »

(i edited my last post)

modoptions.lua from thecursed:version:1.16
---- KING OF THE HILL OPTIONS ----
{
key = 'koth',
name = 'King of the Hill Settings',
desc = 'Settings for King of the Hill mode.',
type = 'section',
},
{
key="KOTH",
name="King Of The Hill",
desc="The one with ...",
type="number",
section= 'koth',
min = 0,
max = 10080,
step = 1,
def = 0,
},
indeed we should catch that error and log it in unitsync (it is a bug).
also the cursed should be fixed of course.

to uninstall:
rapid unpin thecursed:version:1.16
a1983
Posts: 55
Joined: 02 Dec 2009, 12:01

Re: UnitSync :: GetModOptionCount Crash

Post by a1983 »

You are pretty fast :-)
Post Reply

Return to “Lobby Clients & Server”