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

assertion when opening AI debug window #2962

Closed
DorpsGek opened this issue Jun 6, 2009 · 2 comments
Closed

assertion when opening AI debug window #2962

DorpsGek opened this issue Jun 6, 2009 · 2 comments
Labels
flyspray This issue is imported from FlySpray (https://bugs.openttd.org/)

Comments

@DorpsGek
Copy link
Member

DorpsGek commented Jun 6, 2009

fonsinchen opened the ticket and wrote:

I just caught this assertion when opening the AI debug window in multiplayer on the server when no AI is present. There have been AIs before that have been bought by human-controlled companies. I'm trying to produce a save game, but it seems there are further preconditions I haven't found yet.

openttd: /home/alve/projekte/openttd/src/ai/ai_gui.cpp:723: virtual void AIDebugWindow::OnPaint(): Assertion `info != __null' failed.

Program received signal SIGABRT, Aborted.
0x00007f081bd7ded5 in raise () from /lib/libc.so.6
(gdb) bt
# 0 0x00007f081bd7ded5 in raise () from /lib/libc.so.6
# 1 0x00007f081bd7f3f3 in abort () from /lib/libc.so.6
# 2 0x00007f081bd76dc9 in __assert_fail () from /lib/libc.so.6
# 3 0x0000000000443446 in AIDebugWindow::OnPaint (this=0x7f080400a220) at /home/alve/projekte/openttd/src/ai/ai_gui.cpp:723
# 4 0x00000000006e0937 in DrawOverlappedWindow (w=0x7f080400a220, left=0, top=24, right=320, bottom=488) at /home/alve/projekte/openttd/src/window.cpp:516
# 5 0x00000000006e09cf in DrawOverlappedWindowForAll (left=0, top=24, right=320, bottom=488) at /home/alve/projekte/openttd/src/window.cpp:539
# 6 0x000000000051beaf in RedrawScreenRect (left=0, top=24, right=320, bottom=488) at /home/alve/projekte/openttd/src/gfx.cpp:1269
# 7 0x000000000051c144 in DrawDirtyBlocks () at /home/alve/projekte/openttd/src/gfx.cpp:1355
# 8 0x00000000006e23e4 in UpdateWindows () at /home/alve/projekte/openttd/src/window.cpp:2304
# 9 0x00000000006c44e4 in VideoDriver_SDL::MainLoop (this=0x2409470) at /home/alve/projekte/openttd/src/video/sdl_v.cpp:501
# 10 0x00000000005c97f4 in ttd_main (argc=1, argv=0x7fff26989ff8) at /home/alve/projekte/openttd/src/openttd.cpp:702
# 11 0x00000000006ae666 in main (argc=1, argv=0x7fff26989ff8) at /home/alve/projekte/openttd/src/unix.cpp:251
(gdb) up
# 1 0x00007f081bd7f3f3 in abort () from /lib/libc.so.6
(gdb)
# 2 0x00007f081bd76dc9 in __assert_fail () from /lib/libc.so.6
(gdb)
# 3 0x0000000000443446 in AIDebugWindow::OnPaint (this=0x7f080400a220) at /home/alve/projekte/openttd/src/ai/ai_gui.cpp:723
723 assert(info != NULL);
(gdb) l
718 DrawCompanyIcon(i, this->widget[AID_WIDGET_COMPANY_BUTTON_START + i].left + 13 + offset, this->widget[AID_WIDGET_COMPANY_BUTTON_START + i].top + 2 + offset);
719 }
720
721 /* Draw the AI name */
722 AIInfo *info = Company::Get(ai_debug_company)->ai_info;
723 assert(info != NULL);
724 char name[1024];
725 snprintf(name, sizeof(name), "%s (v%d)", info->GetName(), info->GetVersion());
726 DrawString(this->widget[AID_WIDGET_NAME_TEXT].left + 7, this->widget[AID_WIDGET_NAME_TEXT].right - 7, 47, name, TC_BLACK, SA_CENTER);

Reported version: 0.7.0
Operating system: All


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

DorpsGek commented Jun 6, 2009

Yexo wrote:

Easily reproducible:

  1. Start non-dedicated server
  2. Start some AI.
  3. Open the AI debug window (it'll select the only AI).
  4. Close the AI debug window
  5. Stop the ai ("stop_ai 2" in console)
  6. Move to spectators
  7. Create a new company (company 2)
  8. Open the AI debug panel.
    assert

This comment was imported from FlySpray: https://bugs.openttd.org/task/2962#comment6170

@DorpsGek
Copy link
Member Author

DorpsGek commented Jun 6, 2009

Yexo closed the ticket.

Reason for closing: Fixed

In r16522


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

@DorpsGek DorpsGek closed this as completed Jun 6, 2009
@DorpsGek DorpsGek added Core flyspray This issue is imported from FlySpray (https://bugs.openttd.org/) labels Apr 7, 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