View Issue Details

IDProjectCategoryView StatusLast Update
0000957AIAIpublic2009-02-21 15:46
Reporterhawk Assigned Tohoijui  
PrioritynormalSeveritycrashReproducibilityalways
Status closedResolutionwon't fix 
Summary0000957: EconmyAI does not find MetalMakerAI dll
DescriptionI can reproduce it on linux:
1) select EconmyAI for any builder unit
2) wait untill it build some power generator
3) Invalid dll message (and game over :-( )

I hacked the attached patch together, since AIs can't access Platform where filesystem and SharedObject live.
Additional InformationI'm using spring_0.76b1, on ubuntu hardy.
The problem is not package specific.
TagsNo tags attached.
Attached Files
EconmyAI.patch (Attachment missing)
EcoAI.patch (Attachment missing)

Relationships

related to 0000491 closed Incorrect AI dll 

Activities

Kloot

2008-06-18 04:23

developer   ~0002342

Thanks, but your patch isn't necessary. You just have to set Spring's data directory so that it looks in /usr/lib/spring on your system, see the setup guide (http://spring.clan-sy.com/wiki/Build_from_source) on how to do that. There are also a few things wrong with the patch itself IMO:

1) it includes two extra headers for no reason
2) it specifies a hardcoded absolute path
3) it breaks the AI on Windows by removing the #ifdef's

Not committing this, but feel free to submit others for any bugs you might find.

hawk

2008-06-18 07:16

reporter   ~0002343

I did not compile from sources: I used the debian package.

Spring's data directory, is set approprately, but the code involved in the patch leads to the string "AI/Helper-libs/MetalMakerAI.so" beeing passed to dlopen without adding the trailing configdir (just follow the function calls and you'll see).

My patch was not meant to "fix", but just to explain:
1) The 2 include files can be included, bu we can't link to the object code (it's inside spring executable)
2) It is not possible to know where the datadir is from inside the AI (correct me if I'm wrong), so I trimmed out the windows friendly code anyway.

The correct way to fix it would be doing the same as in:
void CGroupHandler::FindDlls(void)


Regards
Vincenzo

P.S. thank you for working on this great game & piece of code :-)

vanto

2008-06-27 20:04

reporter   ~0002371

Well what about another patch then ...

hoijui

2009-02-21 15:46

reporter   ~0003298

closed, as GroupAIs are deprecated

Issue History

Date Modified Username Field Change
2008-06-18 03:46 hawk New Issue
2008-06-18 03:46 hawk File Added: EconmyAI.patch
2008-06-18 04:23 Kloot Note Added: 0002342
2008-06-18 04:24 Kloot Status new => closed
2008-06-18 04:24 Kloot Resolution open => no change required
2008-06-18 04:24 Kloot Relationship added related to 0000491
2008-06-18 07:16 hawk Status closed => feedback
2008-06-18 07:16 hawk Resolution no change required => reopened
2008-06-18 07:16 hawk Note Added: 0002343
2008-06-27 20:04 vanto Note Added: 0002371
2008-06-27 20:05 vanto File Added: EcoAI.patch
2009-02-21 09:43 hoijui Status feedback => assigned
2009-02-21 09:43 hoijui Assigned To => hoijui
2009-02-21 15:46 hoijui Note Added: 0003298
2009-02-21 15:46 hoijui Status assigned => closed
2009-02-21 15:46 hoijui Resolution reopened => won't fix