Navigation Menu

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 NewGRF access of "aircraft_height" variable #4781

Closed
DorpsGek opened this issue Sep 19, 2011 · 2 comments
Closed

Crash on NewGRF access of "aircraft_height" variable #4781

DorpsGek opened this issue Sep 19, 2011 · 2 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

Supercheese opened the ticket and wrote:

OTTD (several versions tested, including 1.1.3) crashes upon a NewGRF (written in NML) accessing the "aircraft_height" variable for a switch block. The relevant crash files, save (manually saved just before starting the vehicle which triggers the crash), and newgrf are attached (test GRF; sprites by Zephyris). The NML and other relevant source files are also attached.

Designated low priority issue because that's what I personally would give it.

Attachments

Reported version: 1.1.3
Operating system: Windows


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

planetmaker wrote:

Backtrace:

Program received signal EXC_BAD_ACCESS, Could not access memory.
Reason: KERN_PROTECTION_FAILURE at address: 0x000000a0
0x00233e6f in VehicleGetVariable (object=0xbfffc1e8, variable=68 'D', parameter=0 '\0', available=0xbfffc08f) at /Users/ingo/ottd/trunk/src/newgrf_engine.cpp:603
603 uint16 altitude = v->z_pos - w->z_pos; // Aircraft height - shadow height
(gdb) bt
# 0 0x00233e6f in VehicleGetVariable (object=0xbfffc1e8, variable=68 'D', parameter=0 '\0', available=0xbfffc08f) at /Users/ingo/ottd/trunk/src/newgrf_engine.cpp:603
# 1 0x00246a1d in DeterministicSpriteGroup::Resolve (this=0x195b2450, object=0xbfffc1e8) at /Users/ingo/ottd/trunk/src/newgrf_spritegroup.cpp:63
# 2 0x002469c2 in DeterministicSpriteGroup::Resolve (this=0x195b24c0, object=0xbfffc1e8) at /Users/ingo/ottd/trunk/src/newgrf_spritegroup.cpp:142
# 3 0x002469c2 in DeterministicSpriteGroup::Resolve (this=0x195b2850, object=0xbfffc1e8) at /Users/ingo/ottd/trunk/src/newgrf_spritegroup.cpp:142
# 4 0x00234f8f in GetVehicleCallback (callback=CBID_VEHICLE_32DAY_CALLBACK, param1=0, param2=0, engine=289, v=0x1e7ddd0) at newgrf_spritegroup.h:96
# 5 0x00383fd8 in CallVehicleTicks () at /Users/ingo/ottd/trunk/src/vehicle.cpp:788
# 6 0x0025b12d in StateGameLoop () at /Users/ingo/ottd/trunk/src/openttd.cpp:1177
# 7 0x0025be21 in GameLoop () at /Users/ingo/ottd/trunk/src/openttd.cpp:1261
# 8 0x003ba86c in QZ_GameLoop () at /Users/ingo/ottd/trunk/src/video/cocoa/event.mm:615
# 9 0x003b89b2 in -[OTTDMain applicationDidFinishLaunching:] (self=0x1e480f0, _cmd=0x98cf38ab, note=0x15842d60) at /Users/ingo/ottd/trunk/src/video/cocoa/cocoa_v.mm:71
# 10 0x96c4de53 in _nsnote_callback ()
# 11 0x92e34793 in __CFXNotificationPost ()
# 12 0x92e3419a in _CFXNotificationPostNotification ()
# 13 0x96c42cf0 in -[NSNotificationCenter postNotificationName:object:userInfo:] ()
# 14 0x96c500fd in -[NSNotificationCenter postNotificationName:object:] ()
# 15 0x98eb7216 in -[NSApplication _postDidFinishNotification] ()
# 16 0x98eb7126 in -[NSApplication _sendFinishLaunchingNotification] ()
# 17 0x9900e339 in -[NSApplication(NSAppleEventHandling) _handleAEOpen:] ()
# 18 0x9900df59 in -[NSApplication(NSAppleEventHandling) _handleCoreEvent:withReplyEvent:] ()
# 19 0x96c83298 in -[NSAppleEventManager dispatchRawAppleEvent:withRawReply:handlerRefCon:] ()
# 20 0x96c8305c in _NSAppleEventManagerGenericHandler ()
# 21 0x9991ef5c in aeDispatchAppleEvent ()
# 22 0x9991ee5b in dispatchEventAndSendReply ()
# 23 0x9991ed65 in aeProcessAppleEvent ()
# 24 0x942f5197 in AEProcessAppleEvent ()
# 25 0x98e877d2 in _DPSNextEvent ()
# 26 0x98e86dd6 in -[NSApplication nextEventMatchingMask:untilDate:inMode:dequeue:] ()
# 27 0x98e491f3 in -[NSApplication run] ()
# 28 0x003b8bb7 in VideoDriver_Cocoa::MainLoop (this=0x2a09140) at /Users/ingo/ottd/trunk/src/video/cocoa/cocoa_v.mm:389
# 29 0x0025d076 in ttd_main (argc=1, argv=0xbffff8a4) at /Users/ingo/ottd/trunk/src/openttd.cpp:722
# 30 0x0026c864 in main (argc=1, argv=0xbffff8a4) at /Users/ingo/ottd/trunk/src/os/unix/unix.cpp:266


This comment was imported from FlySpray: https://bugs.openttd.org/task/4781#comment10376

@DorpsGek
Copy link
Member Author

frosch closed the ticket.

Reason for closing: Fixed

in r22946


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

@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