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

failed assertion when switching player to AI player #1150

Closed
DorpsGek opened this issue Aug 22, 2007 · 9 comments
Closed

failed assertion when switching player to AI player #1150

DorpsGek opened this issue Aug 22, 2007 · 9 comments
Labels
flyspray This issue is imported from FlySpray (https://bugs.openttd.org/)

Comments

@DorpsGek
Copy link
Member

mallmonkey opened the ticket and wrote:

Tested in r10955. I've also tested 0.5.2 and that doesn't seem to have this bug.

When playing a game with an AI player, the game crashes if "Playing as player: X" (in the cheat menu) is used to change to an AI player. This happens with both the "new AI (alpha)" and the old AI. As soon as you click on the little ">" button before the 'Playing as player: 0' text it asserts:

dbg: [sprite] Tried to load real sprite # 846 as a non sprite. Probable cause: NewGRF interference
/compile_farm/openttd/nightly/compile_dir/src/player.h:241: failed assertion `IS_INSIDE_1D(i, PLAYER_FIRST, lengthof(_players))'
Abort trap

There are no custom NewGRFs loaded.

Reported version: trunk
Operating system: Mac OS X


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

Rubidium wrote:

It doesn't seem to trigger in my OpenTTD nightly, what about the savegame in which you have this?

Furthermore the debug message about the real sprite as non-sprite only happens when at least two NewGRFs are loaded. I therefor conclude that you are using some NewGRFs.


This comment was imported from FlySpray: https://bugs.openttd.org/task/1150#comment1941

@DorpsGek
Copy link
Member Author

mallmonkey wrote:

I suspected you might conclude that, that's why I mentioned there are no custom NewGRFs loaded. Not by me anyway :-)
I've double checked, but even the 'NewGRF settings' windows shows no NewGRFs.

It's also not a specific game, when I start a new game, wait for an AI to join me and then change the player, it asserts every time. I've renamed my ~/Documents/OpenTTD folder to something else so I'd use the default config, but the problems stays.


This comment was imported from FlySpray: https://bugs.openttd.org/task/1150#comment1943

@DorpsGek
Copy link
Member Author

mallmonkey wrote:

I've done another test: I've tried another Mac (with r10438 and r10963), and both builds behave exactly as described above. I've also tried the Windows build of r10963, and that doesn't crash.


This comment was imported from FlySpray: https://bugs.openttd.org/task/1150#comment1944

@DorpsGek
Copy link
Member Author

Rubidium wrote:

Hmm, that starts to sound like an endianness issue. Are you using a PowerPC Mac (G4/G5 or older)?


This comment was imported from FlySpray: https://bugs.openttd.org/task/1150#comment1945

@DorpsGek
Copy link
Member Author

mallmonkey wrote:

PowerPC G5 on both Macs. Unfortunatly I don't have my Macbook here, so I can't test with an Intel build.


This comment was imported from FlySpray: https://bugs.openttd.org/task/1150#comment1946

@DorpsGek
Copy link
Member Author

mallmonkey wrote:

Mac OS X on Intel doesn't crash either.


This comment was imported from FlySpray: https://bugs.openttd.org/task/1150#comment1951

@DorpsGek
Copy link
Member Author

Rubidium wrote:

Can you check whether the attached patch fixes your problem?

Attachments


This comment was imported from FlySpray: https://bugs.openttd.org/task/1150#comment2006

@DorpsGek
Copy link
Member Author

mallmonkey wrote:

That patch indeed fixes the problem.


This comment was imported from FlySpray: https://bugs.openttd.org/task/1150#comment2014

@DorpsGek
Copy link
Member Author

Rubidium closed the ticket.

Reason for closing: Fixed

In r11023.


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

@DorpsGek DorpsGek added Core flyspray This issue is imported from FlySpray (https://bugs.openttd.org/) labels Apr 6, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
flyspray This issue is imported from FlySpray (https://bugs.openttd.org/)
Projects
None yet
Development

No branches or pull requests

1 participant