AI Dlls and threads

AI Dlls and threads

Here is where ideas can be collected for the skirmish AI in development

Moderators: hoijui, Moderators

Post Reply
ivand
Posts: 310
Joined: 27 Jun 2007, 17:05

AI Dlls and threads

Post by ivand »

Hi!

Can anyone tell me why the init() message and subsequent handleEvent() messages (can say for sure for the EVENT_MESSAGE) come from different threads?

This have great side effect to my dotNET interface.

Thanks.
User avatar
hoijui
Former Engine Dev
Posts: 4344
Joined: 22 Sep 2007, 09:51

Re: AI Dlls and threads

Post by hoijui »

i just tested here in gdb, and it seems to always be the same thread. i also can not imagine how it could be different ones.
ivand
Posts: 310
Joined: 27 Jun 2007, 17:05

Re: AI Dlls and threads

Post by ivand »

hoijui wrote:i just tested here in gdb, and it seems to always be the same thread. i also can not imagine how it could be different ones.
Let me just show you some images:
Attachments
handleEvent.jpg
handleEvent
(423.81 KiB) Downloaded 3 times
init.jpg
init();
(413.5 KiB) Downloaded 3 times
Tobi
Spring Developer
Posts: 4598
Joined: 01 Jun 2005, 11:36

Re: AI Dlls and threads

Post by Tobi »

Could you try with a non-GML Spring binary?
ivand
Posts: 310
Joined: 27 Jun 2007, 17:05

Re: AI Dlls and threads

Post by ivand »

Tobi wrote:Could you try with a non-GML Spring binary?
Hi!

Thanks for reply!
Indeed I can perform a test with nonGML spring (later in the evening), but what is wrong with GML one?

P.S. My sources are not very recent, because every time I'm updating the sources from git I have to change lots of code to make it compatible with MSVC. Could I somehow commit these changes to main branch (All of the changes could be done with #ifdefs #endifs)?
P.S.S. Do you have a maintainer for MSVC spring?
P.S.S.2 Have anyone performed comprehensive tests to find out if MSVC and MinGW builds compatible at binary level?
User avatar
hoijui
Former Engine Dev
Posts: 4344
Joined: 22 Sep 2007, 09:51

Re: AI Dlls and threads

Post by hoijui »

yeah, i am using non GML build, so i guess that is making the difference.
btw.. are you using GML only, or also GML_SIM?
anyway.. by current definitions of the AI Interface, and how things currently look to me, this seems like a bug; would need more investigation though, maybe zerver can say something, before we start this.

if you want changes in spring source, you have to fork spring on github, and commit your changes to your fork. then ask one of the devs to have a look at it, and if its fine, he will move it to the main repo of spring.

we have one or two devs that use MSVC too, but it can easily happen that spring does not compile fine for weeks on MSVC.

MSVC and MinGW builds of spring do not sync, but AI Interfaces and Skirmish AI plugins should be binary compatible, and they are not synced. There have been tests by some AI devs, and i have no negative report from them, plus i put a lot of work into this compatibility already. it should work fine by now, though if you want to have extensive test results, you had to collect them yourself.
ivand
Posts: 310
Joined: 27 Jun 2007, 17:05

Re: AI Dlls and threads

Post by ivand »

Hi, guys!

Tobi, thank you very much for your advise. Now my interface seems to work fine. At least it doesn't throw weird error from dotNET internals which I tried to fix for 2 or 3 weeks.

hoijui, I use USE_GML and USE_GML_SIM flags.

P.S. Something inside the GML-flagged binary breaks dotNET, I'm pretty sure it's not only dotNET issue, cause I tried to create simple application which reproduce an error, but none of my efforts were successful. I still don't know what's wrong in GMLed spring.exe
P.S.S. Thanks for the info about MSVC, branch, etc. Will do the fork when i have spare time.
Post Reply

Return to “AI”