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

OTTD Crashes on wrong GRF #3218

Closed
DorpsGek opened this issue Sep 20, 2009 · 10 comments
Closed

OTTD Crashes on wrong GRF #3218

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

Comments

@DorpsGek
Copy link
Member

George opened the ticket and wrote:

r17560

When the grf has wrong definition industry definition (two parts are located on the same tile), OTTD crashes when trying to build the industry of the wrong layout. It should report the wrong GRF instead.

Attachments

Reported version: trunk
Operating system: All


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

Rubidium wrote:

... and where is the wrong GRF so we can actually test whether our fix is correct?


This comment was imported from FlySpray: https://bugs.openttd.org/task/3218#comment6697

@DorpsGek
Copy link
Member Author

George wrote:

layout 6 for Steel mill crashes the game when industry is build

Attachments


This comment was imported from FlySpray: https://bugs.openttd.org/task/3218#comment6699

@DorpsGek
Copy link
Member Author

George wrote:

Wrong (part 36 is build over part 34), crashes OTTD:
00 01 FE 34 00
00 02 FE 34 00
04 01 FE 35 00
05 01 FE 35 00
04 02 FE 35 00
05 02 FE 35 00
00 01 FE 36 00
00 02 FE 36 00
01 00 FE 37 00
02 00 FE 37 00
04 03 FE 37 00
05 03 FE 37 00
02 01 FE 38 00
02 02 FE 38 00
00 03 FE 39 00
01 03 FE 39 00
00 80

Correct, works fine:
00 01 FE 34 00
00 02 FE 34 00
04 01 FE 35 00
05 01 FE 35 00
04 02 FE 35 00
05 02 FE 35 00
01 01 FE 36 00
01 02 FE 36 00
01 00 FE 37 00
02 00 FE 37 00
04 03 FE 37 00
05 03 FE 37 00
02 01 FE 38 00
02 02 FE 38 00
00 03 FE 39 00
01 03 FE 39 00
00 80


This comment was imported from FlySpray: https://bugs.openttd.org/task/3218#comment6700

@DorpsGek
Copy link
Member Author

glx wrote:

openttd.exe!NewIndustryTileResolver(ResolverObject * res=0x0012f9f0, unsigned short gfx=232, unsigned int tile=232608, Industry * indus=0x00000000) Ligne 161 + 0x2f octets C++
openttd.exe!DrawNewIndustryTile(TileInfo * ti=0x00000000, Industry * i=0x00000000, unsigned short gfx=232, const IndustryTileSpec * inds=0x00000000) Ligne 255 C++
openttd.exe!DrawTile_Industry(TileInfo * ti=0x00000000) Ligne 320 + 0x11 octets C++
openttd.exe!ViewportAddLandscape() Ligne 1048 C++
openttd.exe!ViewportDoDraw(const ViewPort * vp=0x00000000, int left=9432, int top=9534, int right=0, int bottom=0) Ligne 1496 C++
openttd.exe!ViewportDrawChk(const ViewPort * vp=0x00000000, int left=0, int top=256, int right=640, int bottom=576) Ligne 1549 C++
openttd.exe!Window::DrawViewport() Ligne 1578 + 0x6f octets C++
openttd.exe!NWidgetViewport::Draw(const Window * w=0x032b2518) Ligne 1881 C++
openttd.exe!NWidgetPIPContainer::Draw(const Window * w=0x032b2518) Ligne 1346 + 0xb octets C++
openttd.exe!Window::DrawWidgets() Ligne 702 C++
openttd.exe!MainWindow::OnPaint() Ligne 225 C++
openttd.exe!DrawOverlappedWindow(Window * w=0x00000000, int left=0, int top=256, int right=640, int bottom=576) Ligne 557 + 0x7 octets C++
openttd.exe!DrawOverlappedWindowForAll(int left=512, int top=256, int right=640, int bottom=576) Ligne 574 C++
openttd.exe!RedrawScreenRect(int left=512, int top=0, int right=0, int bottom=0) Ligne 1373 C++
openttd.exe!DrawDirtyBlocks() Ligne 1457 + 0xb octets C++
openttd.exe!UpdateWindows() Ligne 2430 C++
openttd.exe!VideoDriver_Win32::MainLoop() Ligne 891 C++
openttd.exe!ttd_main(int argc=, char * * argv=) Ligne 742 C++
openttd.exe!WinMain(HINSTANCE__ * hInstance=0x00400000, HINSTANCE__ * hPrevInstance=0x00000000, char * lpCmdLine=0x0015232f, int nCmdShow=1) Ligne 380 + 0x9 octets C++
openttd.exe!__tmainCRTStartup() Ligne 263 + 0x1b octets C
kernel32.dll!7c816d4f()
[Les frames ci-dessous sont peut-être incorrects et/ou manquants, aucun symbole chargé pour kernel32.dll]


This comment was imported from FlySpray: https://bugs.openttd.org/task/3218#comment6710

@DorpsGek
Copy link
Member Author

frosch wrote:

From reading the source (sorry, without testing), I assume:
"DoCommand(cur_tile, 0, 0, DC_EXEC | DC_NO_TEST_TOWN_RATING | DC_NO_MODIFY_TOWN_RATING, CMD_LANDSCAPE_CLEAR);" at industry_cmd::1636 deletes the industry currently being constructed.


This comment was imported from FlySpray: https://bugs.openttd.org/task/3218#comment6714

@DorpsGek
Copy link
Member Author

Rubidium wrote:

Building the 6th steel mill with the given NewGRF does cause any crash for me. Do you have a savegame that reproduces the crash?


This comment was imported from FlySpray: https://bugs.openttd.org/task/3218#comment6715

@DorpsGek
Copy link
Member Author

George wrote:

Destroy the Wronninghall steel mill and build a new one at that place

Attachments


This comment was imported from FlySpray: https://bugs.openttd.org/task/3218#comment6717

@DorpsGek
Copy link
Member Author

Rubidium wrote:

I don't have the machinery vector from that savegame; it isn't the one you attached before because that one is loaded as the compatible one.


This comment was imported from FlySpray: https://bugs.openttd.org/task/3218#comment6718

@DorpsGek
Copy link
Member Author

George wrote:

It is easily reproduceable here. Here is the same problem for layout 5.

Attachments


This comment was imported from FlySpray: https://bugs.openttd.org/task/3218#comment6721

@DorpsGek
Copy link
Member Author

Rubidium closed the ticket.

Reason for closing: Fixed

In r17605


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

@DorpsGek DorpsGek added NewIndustries 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