Assertion in r14425 on MacOS

Discuss the new AI features ("NoAI") introduced into OpenTTD 0.7, allowing you to implement custom AIs, and the new Game Scripts available in OpenTTD 1.2 and higher.

Moderator: OpenTTD Developers

Post Reply
User avatar
Zutty
Director
Director
Posts: 565
Joined: 22 Jan 2008 16:33

Assertion in r14425 on MacOS

Post 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.
PathZilla - A networking AI - Now with tram support.
Yexo
Tycoon
Tycoon
Posts: 3663
Joined: 20 Dec 2007 12:49

Re: Assertion in r14425 on MacOS

Post 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.
User avatar
Zutty
Director
Director
Posts: 565
Joined: 22 Jan 2008 16:33

Re: Assertion in r14425 on MacOS

Post 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.
PathZilla - A networking AI - Now with tram support.
Morloth
Transport Coordinator
Transport Coordinator
Posts: 378
Joined: 07 Feb 2008 14:06
Location: Glasgow

Re: Assertion in r14425 on MacOS

Post 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
Attachments
fix_race_condition_14405.patch
Fix for the 14405 build which fixes the race condition which breaks the Mac builds.
(5.84 KiB) Downloaded 158 times
El Duderino
Engineer
Engineer
Posts: 2
Joined: 22 Nov 2008 17:50

Re: Assertion in r14425 on MacOS

Post 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?
Morloth
Transport Coordinator
Transport Coordinator
Posts: 378
Joined: 07 Feb 2008 14:06
Location: Glasgow

Re: Assertion in r14425 on MacOS

Post 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
User avatar
Zutty
Director
Director
Posts: 565
Joined: 22 Jan 2008 16:33

Re: Assertion in r14425 on MacOS

Post 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:
PathZilla - A networking AI - Now with tram support.
Post Reply

Return to “OpenTTD AIs and Game Scripts”

Who is online

Users browsing this forum: No registered users and 1 guest