Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Crash on "throw" #2942

Closed
DorpsGek opened this issue May 31, 2009 · 8 comments
Closed

Crash on "throw" #2942

DorpsGek opened this issue May 31, 2009 · 8 comments
Labels
component: AI/Game script (squirrel) This issue is related to Squirrel (Scripting language) flyspray This issue is imported from FlySpray (https://bugs.openttd.org/)

Comments

@DorpsGek
Copy link
Member

fanioz opened the ticket and wrote:

R 16470 and 0.7.1 RC-2

calling "throw" (main.nut line 105), give me the crash, the files is listed below.

Attachments

Reported version: 0.7.1-RC2
Operating system: All


This issue was imported from FlySpray: https://bugs.openttd.org/task/2942
@DorpsGek
Copy link
Member Author

Rubidium wrote:

The garbage collector somehow causes the segfault, however the AI dies before on 'resuming a dead generator'.


This comment was imported from FlySpray: https://bugs.openttd.org/task/2942#comment6141

@DorpsGek
Copy link
Member Author

DorpsGek commented Jun 1, 2009

Yexo wrote:

The AI doesn't die on resuming a dead generator. That's indeed an error, but it's caught by a try/catch statement succesfully. The script normally ends (as soon as that throw statement is reached). The error is caught succesfully, the few AILog::Error calls are executed ok, then in the garbage collector it crashed indeed. I'm still now sure why.


This comment was imported from FlySpray: https://bugs.openttd.org/task/2942#comment6143

@DorpsGek
Copy link
Member Author

DorpsGek commented Jun 1, 2009

Yexo wrote:

Do you still know what changes you made before OpenTTD started crashing? Can you narrow down a bit to which code it might be related?


This comment was imported from FlySpray: https://bugs.openttd.org/task/2942#comment6147

@DorpsGek
Copy link
Member Author

DorpsGek commented Jun 2, 2009

fanioz wrote:

First time, i think thats becaused by 'nested throw' . If there are error catched by try-catch, and throw again somewhere out of block, openttd would loose control and give crash. But simplefied code of this,proved no crash there. Thats way i've upload transai completely, I don't know where wrong. Right now im only change my code to avoid calling throw from main.nut


This comment was imported from FlySpray: https://bugs.openttd.org/task/2942#comment6150

@DorpsGek
Copy link
Member Author

DorpsGek commented Jun 2, 2009

fanioz wrote:

Found at line 93. Mark as comment will prevent crash, might be there are triggers on task.generate.service class. I'll try to find it


This comment was imported from FlySpray: https://bugs.openttd.org/task/2942#comment6153

@DorpsGek
Copy link
Member Author

DorpsGek commented Jun 7, 2009

fanioz wrote:

-Another effort to reduce the code
-docs.tar -> contain documentation of current code

Attachments


This comment was imported from FlySpray: https://bugs.openttd.org/task/2942#comment6179

@DorpsGek
Copy link
Member Author

DorpsGek commented Jun 7, 2009

Yexo wrote:

Thanks for narrowing it down fanioz. Thanks to your code I've narrowed it down even more, this AI causes this same crash every time.

Attachments


This comment was imported from FlySpray: https://bugs.openttd.org/task/2942#comment6181

@DorpsGek
Copy link
Member Author

DorpsGek commented Jun 7, 2009

Yexo closed the ticket.

Reason for closing: Fixed

In 16534.


This comment was imported from FlySpray: https://bugs.openttd.org/task/2942

@DorpsGek DorpsGek closed this as completed Jun 7, 2009
@DorpsGek DorpsGek added flyspray This issue is imported from FlySpray (https://bugs.openttd.org/) bug component: AI/Game script (squirrel) This issue is related to Squirrel (Scripting language) labels Apr 6, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: AI/Game script (squirrel) This issue is related to Squirrel (Scripting language) flyspray This issue is imported from FlySpray (https://bugs.openttd.org/)
Projects
None yet
Development

No branches or pull requests

1 participant