OpenTTD

Tasklist

FS#4781 - Crash on NewGRF access of "aircraft_height" variable

Attached to Project: OpenTTD
Opened by Supercheese (Supercheese) - Monday, 19 September 2011, 04:51 GMT
Last edited by frosch (frosch) - Monday, 19 September 2011, 19:24 GMT
Type Bug
Category NewGRF
Status Closed
Assigned To No-one
Operating System Windows
Severity Low
Priority Normal
Reported Version 1.1.3
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

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.
This task depends upon

Closed by  frosch (frosch)
Monday, 19 September 2011, 19:24 GMT
Reason for closing:  Fixed
Additional comments about closing:  in r22946
Comment by Ingo von Borstel (planetmaker) - Monday, 19 September 2011, 05:41 GMT
  • Field changed: Status (New → Confirmed)
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

Loading...