Moderator: OpenTTD Developers
(svn r16502) -Fix [FS#2935]: when an AI was suspended while in a function called (indirectly) via call/acall/pcall OpenTTD crashed. Fix this by disallowing AIs to be suspended while called via call/acall/pcall.
IMPORTANT FOR AI WRITERS: AIs can no longer call any DoCommand functions (change anything, build vehicles, etc.) in a function called (indirectly) via call/acall/pcall. Where possible, please rewrite your code so it doesn't use call/acall/pcall.
This change will also be in 0.7.1-RC3 and later. Please test your AIs using the latest nightly / 0.7.1-RC3 when it comes out and report all crashes. Thanks to fanioz for reporting this problem.
Code: Select all
this = your_this;
However, the program stability should be on the first place.
Thanks to yexo for fixing (and Rubidium - who make me confident to report the bug )
Thanks for the notice though.
Well, you can place debug signs into some array and then put contents of the array on the map once the valuator is finishedZuu wrote:Hmm, so then placing debug signs in valuators will not work anymore.
My patches: Extra large maps (1048576 high, 1048576 wide) (FS#1059), Vehicle + Town + Industry console commands (FS#1060), few minor patches (FS#2820, FS#1521, FS#2837, FS#2843), AI debugging facility
Other: Very large ships NewGRF, Bilbo's multiplayer patch pack v5 (for OpenTTD 0.7.3)
You can write a valuate replacement in squirrel without using call. I've attached the version I use in AdmiralAI.Zuu wrote:Hmm, so then placing debug signs in valuators will not work anymore.
Edit: now I have (.nut files are not allowed as attachment)
- (3.43 KiB) Downloaded 113 times
No, you haven't.Yexo wrote:I've attached the version I use in AdmiralAI.
Maybe not a crash, but it does give problems with suspending the AI. Since there are working replacements for call/acall/List::aluate written in squirrel I see no need to enable it.Dustin wrote:I noticed that the current release disallows commands even in test mode. That seems reasonable since it might be hard to know the difference in a callback. It would be nice to allow valuators to try operations in test mode, though. Unless of course this would also cause a crash...
Users browsing this forum: No registered users and 7 guests