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

random code in NML causes OTTD to crash #5404

Closed
DorpsGek opened this issue Dec 25, 2012 · 13 comments
Closed

random code in NML causes OTTD to crash #5404

DorpsGek opened this issue Dec 25, 2012 · 13 comments
Labels
component: NewGRF This issue is related to NewGRFs flyspray This issue is imported from FlySpray (https://bugs.openttd.org/)

Comments

@DorpsGek
Copy link
Member

George opened the ticket and wrote:

R24837

When I try to display wagon 11-280 in purchase window or clone a train it causes a crash

Attachments

Reported version: trunk
Operating system: Windows


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

George wrote:

the GRF

Attachments


This comment was imported from FlySpray: https://bugs.openttd.org/task/5404#comment11782

@DorpsGek
Copy link
Member Author

planetmaker wrote:

I'm missing all ECS, the station and the xussr NewGRFs required to load the savegame. Also the here attached grf file for the trainset is not even recognized as compatible to the version within the savegame.

When I started a new game with this grf - or with a self-compiled version of the grf, patched or unpatched with here attached pnml file - I did not get any crash unpon game creation.

Is there a way I can reproduce this?


This comment was imported from FlySpray: https://bugs.openttd.org/task/5404#comment11783

@DorpsGek
Copy link
Member Author

George wrote:

ECS

Attachments


This comment was imported from FlySpray: https://bugs.openttd.org/task/5404#comment11784

@DorpsGek
Copy link
Member Author

George wrote:

I also do not get a crash in a new game, but I also do not get a random - wagons are in blue CC


This comment was imported from FlySpray: https://bugs.openttd.org/task/5404#comment11785

@DorpsGek
Copy link
Member Author

George wrote:

more crashes

Attachments


This comment was imported from FlySpray: https://bugs.openttd.org/task/5404#comment11786

@DorpsGek
Copy link
Member Author

michi_cc wrote:

From the crash log I can see that for whatever reason, the map generator sprites from the base set (sprites 4845 to 4882) are used for some other purpose. Either because some of the sprites of the NewGRF are placed at these indices or because they are (erroneously) returned by some callback/property.


This comment was imported from FlySpray: https://bugs.openttd.org/task/5404#comment11789

@DorpsGek
Copy link
Member Author

George wrote:

please remove the double post


This comment was imported from FlySpray: https://bugs.openttd.org/task/5404#comment11790

@DorpsGek
Copy link
Member Author

George wrote:

please remove the double post


This comment was imported from FlySpray: https://bugs.openttd.org/task/5404#comment11791

@DorpsGek
Copy link
Member Author

NG wrote:

There was a lot of NewGRF adding, removing and upgrading shown in the logs, so I'm not sure whether the report is entirely justified...


This comment was imported from FlySpray: https://bugs.openttd.org/task/5404#comment11794

@DorpsGek
Copy link
Member Author

frosch wrote:

0012f3c8 00c5bcdc e1212012 00000000 00000000 kernel32+0x12fd3
0012f420 005e27e9 e1212012 00000000 00000000 openttd!abort_action
0012f434 006b6aac 00000016 d27252f7 0012f498 openttd!CustomAbort+0x10 [c:\bamboo-agent-home\xml-data\build-dir\ottd-nightly-w32bit\src\os\windows\crashlog_win.cpp @ 548]
0012f480 006b6075 00000016 0043763a 00001300 openttd!raise+0x17a [f:\dd\vctools\crt_bld\self_x86\crt\src\winsig.c @ 586]
0012f488 0043763a 00001300 00000003 65737341 openttd!abort+0x10 [f:\dd\vctools\crt_bld\self_x86\crt\src\abort.c @ 74]
0012f698 00447465 00ba5bbc 0000032d 00be2c7c openttd!error+0x38 [c:\bamboo-agent-home\xml-data\build-dir\ottd-nightly-w32bit\src\openttd.cpp @ 119]
0012f6c4 0041e5b1 00000000 0000001f 00001300 openttd!GetRawSprite+0x40 [c:\bamboo-agent-home\xml-data\build-dir\ottd-nightly-w32bit\src\spritecache.cpp @ 814]
0012f6d8 0050af00 0000a1be 0000001f 00000045 openttd!DrawSprite+0x55 [c:\bamboo-agent-home\xml-data\build-dir\ottd-nightly-w32bit\src\gfx.cpp @ 1217]
0012f704 00479a2e 0000001f 00000045 000002b9 openttd!DrawTrainEngine+0x153 [c:\bamboo-agent-home\xml-data\build-dir\ottd-nightly-w32bit\src\train_cmd.cpp @ 528]
0012f72c 0046c1e7 00000002 000001b7 0000001f openttd!DrawVehicleEngine+0xa1 [c:\bamboo-agent-home\xml-data\build-dir\ottd-nightly-w32bit\src\engine_gui.cpp @ 302]
0012f784 0046d2d3 00000002 000001b7 00000039 openttd!DrawEngineList+0x222 [c:\bamboo-agent-home\xml-data\build-dir\ottd-nightly-w32bit\src\build_vehicle_gui.cpp @ 915]
0012f7b0 00461a61 0012f7f0 00000004 03af51d8 openttd!BuildVehicleWindow::DrawWidget+0x69 [c:\bamboo-agent-home\xml-data\build-dir\ottd-nightly-w32bit\src\build_vehicle_gui.cpp @ 1336]
0012f804 004af896 03af51d8 027fc1b0 004af896 openttd!NWidgetLeaf::Draw+0xadd [c:\bamboo-agent-home\xml-data\build-dir\ottd-nightly-w32bit\src\widget.cpp @ 2418]
0012f810 004af896 03af51d8 027fbca0 004af896 openttd!NWidgetSmallmapDisplay::Draw+0x11 [c:\bamboo-agent-home\xml-data\build-dir\ottd-nightly-w32bit\src\smallmap_gui.cpp @ 1661]
0012f81c 004af896 03af51d8 03af51d8 0045e355 openttd!NWidgetSmallmapDisplay::Draw+0x11 [c:\bamboo-agent-home\xml-data\build-dir\ottd-nightly-w32bit\src\smallmap_gui.cpp @ 1661]
0012f828 0045e355 03af51d8 03af51d8 004773e5 openttd!NWidgetSmallmapDisplay::Draw+0x11 [c:\bamboo-agent-home\xml-data\build-dir\ottd-nightly-w32bit\src\smallmap_gui.cpp @ 1661]
0012f84c 0046d311 03af51d8 0012f888 0046330d openttd!Window::DrawWidgets+0x13 [c:\bamboo-agent-home\xml-data\build-dir\ottd-nightly-w32bit\src\widget.cpp @ 574]
0012f858 0046330d 00000158 03af51d8 00000019 openttd!BuildVehicleWindow::OnPaint+0x21 [c:\bamboo-agent-home\xml-data\build-dir\ottd-nightly-w32bit\src\build_vehicle_gui.cpp @ 1352]
0012f870 00463375 00000019 00000400 00000158 openttd!DrawOverlappedWindow+0xff [c:\bamboo-agent-home\xml-data\build-dir\ottd-nightly-w32bit\src\window.cpp @ 680]
0012f8a4 0041f75d 00000200 00000019 00000400 openttd!DrawOverlappedWindowForAll+0x61 [c:\bamboo-agent-home\xml-data\build-dir\ottd-nightly-w32bit\src\window.cpp @ 697]
0012f8c0 0041f8ec 00000200 00000000 00000000 openttd!RedrawScreenRect+0x6a [c:\bamboo-agent-home\xml-data\build-dir\ottd-nightly-w32bit\src\gfx.cpp @ 1728]
0012f8f0 00465acf 133a97c6 133a97d6 0012f90c openttd!DrawDirtyBlocks+0x158 [c:\bamboo-agent-home\xml-data\build-dir\ottd-nightly-w32bit\src\gfx.cpp @ 1818]
0012f904 005e3957 00000000 005e1354 00c4b07c openttd!UpdateWindows+0xf9 [c:\bamboo-agent-home\xml-data\build-dir\ottd-nightly-w32bit\src\window.cpp @ 2756]
0012f950 00438ef5 0012fd2c 0012fe30 7ffdb000 openttd!ThreadMutex_Win32::BeginCritical+0xa [c:\bamboo-agent-home\xml-data\build-dir\ottd-nightly-w32bit\src\thread\thread_win32.cpp @ 128]
0012fd14 005e3412 00000001 0012fe30 00380038 openttd!ttd_main+0x10ab [c:\bamboo-agent-home\xml-data\build-dir\ottd-nightly-w32bit\src\openttd.cpp @ 849]
0012ff30 006b85c4 00400000 00000000 001624df openttd!WinMain+0x7e [c:\bamboo-agent-home\xml-data\build-dir\ottd-nightly-w32bit\src\os\windows\win32.cpp @ 464]
0012ffc0 7c81776f 00380038 00320031 7ffdb000 openttd!__tmainCRTStartup+0x11a [f:\dd\vctools\crt_bld\self_x86\crt\src\crt0.c @ 275]
0012fff0 00000000 006b8617 00000000 00000000 kernel32+0x1776f


This comment was imported from FlySpray: https://bugs.openttd.org/task/5404#comment11803

@DorpsGek
Copy link
Member Author

frosch wrote:

The 'colour_mapping' callback of engine 325 (grfid 20964802) returns 0x1598, which is no recolour sprite.

Engine 325 seems to be "Boxcar CMV (4-axis)".


This comment was imported from FlySpray: https://bugs.openttd.org/task/5404#comment11804

@DorpsGek
Copy link
Member Author

frosch closed the ticket.

Reason for closing: Fixed

in r24858


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

@DorpsGek
Copy link
Member Author

frosch wrote:

r24858 fixes the crash, but there is some issue with the GRF nevertheless


This comment was imported from FlySpray: https://bugs.openttd.org/task/5404#comment11805

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

No branches or pull requests

1 participant