Page 1 of 1

Assertion in r14425 on MacOS

Posted: 01 Oct 2008 22:17
by Zutty
Hi all,

Sorry to bombard the forum with posts! Think of it as me keeping you guys on your toes. :wink:

I've tried the NoAI universal Mac binary from the website (well done on getting that working by the way! :D ) on Mac OS X 10.5.5. When I call start_ai there I see the following error and the game locks up...

Code: Select all

dbg: [ai] [squirrel] Loading script '%aitar%pathzilla/info.nut' for AI handling
dbg: [ai] [squirrel] Loading script '/Applications/openttd-noai/ai/wrightai/info.nut' for AI handling
dbg: [ai] [squirrel] Loading script '/Applications/openttd-noai/ai/library/graph/aystar/library.nut' for Squirrel library
dbg: [ai] [squirrel] Loading script '/Applications/openttd-noai/ai/library/pathfinder/rail/library.nut' for Squirrel library
dbg: [ai] [squirrel] Loading script '/Applications/openttd-noai/ai/library/pathfinder/road/library.nut' for Squirrel library
dbg: [ai] [squirrel] Loading script '/Applications/openttd-noai/ai/library/queue/binary_heap/library.nut' for Squirrel library
dbg: [ai] [squirrel] Loading script '/Applications/openttd-noai/ai/library/queue/fibonacci_heap/library.nut' for Squirrel library
dbg: [ai] [squirrel] Loading script '/Applications/openttd-noai/ai/library/queue/priority_queue/library.nut' for Squirrel library
dbg: [ai] AI_StartPlayer(1) from thr -1606586464
/usr/src/OpenTTD/compile/src/ai/ai_threads.cpp:55: failed assertion `this->fiber->IsRunning()'
Abort trap
Is this enough information?

Thanks again.

Edit: This is on a basic Macbook with a Core 2 Duo processor, if it helps.

Re: Assertion in r14425 on MacOS

Posted: 01 Oct 2008 22:23
by Yexo
Morloth has experienced the same problem (also on Mac OS X) and wrote a patch for it. You can try to get in contact with him for the patch.

There are still several thread problems in noai, that is a known problem and will be fixed as soon as squirrel is replaced by NAIL. TrueBrain is making good progress on that, but I have no idea on an ETA.

Re: Assertion in r14425 on MacOS

Posted: 01 Oct 2008 22:47
by Zutty
Thanks for the reply Yexo.

If TrueBrain is working on it thats good enough for me! :)

A patch sounds good but I don't have anything setup to compile on the mac. I know that sounds lazy, but I'd rather spend the time I have working on my AI.

I'll wait for an official solution. I can stick to developing on Windows for now.

Thanks again.

Re: Assertion in r14425 on MacOS

Posted: 02 Oct 2008 23:31
by Morloth
Hi Zutty,

I did write a patch for it but it isn't (yet?) in the main branch. But this does fix the race condition in the code, hope it is of help :).

- Morloth

Re: Assertion in r14425 on MacOS

Posted: 22 Nov 2008 19:19
by El Duderino
Hi All,

This is my first post to the forum. Now that my PhD thesis is done I'd like to start a new time sink. And developing a AI seems a perfect for that. :)

However the bug mentioned in this thread is still not fixed in the current version r14579 and so the MAC OS X binary always crashes as soon as an AI is started. :(

Is the patch in the previous post already commited or did somebody already make their own binaries?

Re: Assertion in r14425 on MacOS

Posted: 23 Nov 2008 01:49
by Morloth
El Duderino wrote:Hi All,

This is my first post to the forum. Now that my PhD thesis is done I'd like to start a new time sink. And developing a AI seems a perfect for that. :)

However the bug mentioned in this thread is still not fixed in the current version r14579 and so the MAC OS X binary always crashes as soon as an AI is started. :(

Is the patch in the previous post already commited or did somebody already make their own binaries?
Congratulations with your PhD! I hope to start my own next year :). To reply to your post: The patch posted here isn't implemented in the current implementation. Basically the OpenTTD team wants to step away from a threaded AI system so this will phase out eventually, but it might take quite a while ;).

The best thing to do is the get the latest SVN version, apply the posted patch and compile it yourself. There are no binaries somewhere on the internet with this fix. However, if you would like to I could post the latest version with this patch on the web.

Best of luck with your AI!
- Bram

Re: Assertion in r14425 on MacOS

Posted: 23 Nov 2008 02:07
by Zutty
Morloth wrote:Congratulations with your PhD! I hope to start my own next year :)
hehe! Me too!

What is it about post-grads and NoAI?! :lol: