Crash when I tried to go down the stairs in the Orc Caves
Date/Time: 2005-10-09 21:42:37.957 +0100
OS Version: 10.4.2 (Build 8C46)
Report Version: 3
Command: tome
Path: /Applications/ToME 2.3.2/T.o.M.E..app/Contents/MacOS/tome
Parent: WindowServer [96]
Version: 220 (2.2.0)
PID: 866
Thread: 0
Exception: EXC_BAD_ACCESS (0x0001)
Codes: KERN_INVALID_ADDRESS (0x0001) at 0x07043674
Thread 0 Crashed:
0 net.t-o-m-e.tome 0x0017b2c4 generate_fracave + 960 (generate.c:4728)
1 net.t-o-m-e.tome 0x0017b694 build_type10 + 332 (generate.c:4845)
2 net.t-o-m-e.tome 0x0017eb68 room_build + 228 (generate.c:6912)
3 net.t-o-m-e.tome 0x0017f4f4 level_generate_dungeon + 1612 (generate.c:7219)
4 net.t-o-m-e.tome 0x001804e0 cave_gen + 288 (generate.c:7902)
5 net.t-o-m-e.tome 0x0018278c generate_cave + 2340 (generate.c:9118)
6 net.t-o-m-e.tome 0x000b41e8 play_game + 2844 (dungeon.c:6130)
7 net.t-o-m-e.tome 0x0008fa78 main + 776 (main-crb.c:6413)
8 net.t-o-m-e.tome 0x00001d6c _start + 344 (crt.c:272)
9 net.t-o-m-e.tome 0x00001c10 start + 60
Thread 1:
0 libSystem.B.dylib 0x90056418 semaphore_timedwait_signal_trap + 8
1 libSystem.B.dylib 0x900723b0 pthread_cond_timedwait_relative_np + 592
2 ...ple.CoreServices.CarbonCore 0x90b6c728 TSWaitOnSemaphoreCommon + 176
3 ...ickTimeComponents.component 0x9954c340 ReadSchedulerThreadEntryPoint + 436
4 libSystem.B.dylib 0x9002c3b4 _pthread_body + 96
Thread 0 crashed with PPC Thread State 64:
srr0: 0x000000000017b2c4 srr1: 0x000000000200f030 vrsave: 0x0000000000000000
cr: 0x44042444 xer: 0x0000000000000004 lr: 0x000000000017b368 ctr: 0x000000000017eb64
r0: 0x000000000703d000 r1: 0x00000000bfffe920 r2: 0x0000000007043660 r3: 0x0000000000000021
r4: 0x0000000000000058 r5: 0x000000000703f768 r6: 0x000000000008fc18 r7: 0x0000000000000064
r8: 0x000000000028f5c2 r9: 0x000000000196dc00 r10: 0x0000000000000790 r11: 0x00000000000000fc
r12: 0x0000000000000001 r13: 0x00000000002002f4 r14: 0x0000000000000008 r15: 0x0000000000000001
r16: 0x0000000000000000 r17: 0x0000000000000018 r18: 0x0000000000000030 r19: 0x000000000000003a
r20: 0x000000000000006a r21: 0x0000000000000010 r22: 0x00000000000004fc r23: 0x0000000000000010
r24: 0x000000000000001e r25: 0x0000000000000058 r26: 0x0000000000000790 r27: 0x000000000022ddb4
r28: 0x0000000000000021 r29: 0x0000000000000008 r30: 0x000000000196e390 r31: 0x000000000017af20
Binary Images Description:
0x1000 - 0x1fffff net.t-o-m-e.tome 220 (2.2.0) /Applications/ToME 2.3.2/T.o.M.E..app/Contents/MacOS/tome
0x71a4000 - 0x71aafff com.apple.DictionaryServiceComponent 1.0.0 /System/Library/Components/DictionaryService.component/Contents/MacOS/DictionaryService
0x8d05000 - 0x8d47fff com.apple.QuickTimeFireWireDV.component 7.0.2 /System/Library/QuickTime/QuickTimeFireWireDV.component/Contents/MacOS/QuickTimeFireWireDV
0x8d58000 - 0x8dd1fff com.apple.applepixletvideo 1.2.5 (1.2d5) /System/Library/QuickTime/ApplePixletVideo.component/Contents/MacOS/ApplePixletVideo
0x8fe00000 - 0x8fe51fff dyld 43.1 /usr/lib/dyld
0x90000000 - 0x901a6fff libSystem.B.dylib /usr/lib/libSystem.B.dylib
0x901fe000 - 0x90202fff libmathCommon.A.dylib /usr/lib/system/libmathCommon.A.dylib
0x90204000 - 0x90257fff com.apple.CoreText 1.0.0 (???) /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/CoreText.framework/Versions/A/CoreText
0x90284000 - 0x90335fff ATS /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ATS.framework/Versions/A/ATS
0x90364000 - 0x9069dfff com.apple.CoreGraphics 1.256.14 (???) /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/CoreGraphics.framework/Versions/A/CoreGraphics
0x90728000 - 0x90801fff com.apple.CoreFoundation 6.4.3 (368.12) /System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation
0x9084a000 - 0x9084afff com.apple.CoreServices 10.4 (???) /System/Library/Frameworks/CoreServices.framework/Versions/A/CoreServices
0x9084c000 - 0x9094efff libicucore.A.dylib /usr/lib/libicucore.A.dylib
0x909a8000 - 0x90a2cfff libobjc.A.dylib /usr/lib/libobjc.A.dylib
0x90a56000 - 0x90acafff com.apple.framework.IOKit 1.4 (???) /System/Library/Frameworks/IOKit.framework/Versions/A/IOKit
0x90ae4000 - 0x90af6fff libauto.dylib /usr/lib/libauto.dylib
0x90afd000 - 0x90dc2fff com.apple.CoreServices.CarbonCore 10.4.1 (611.1) /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/CarbonCore.framework/Versions/A/CarbonCore
0x90e25000 - 0x90ea5fff com.apple.CoreServices.OSServices 4.0 (4.0.0) /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/OSServices.framework/Versions/A/OSServices
0x90eef000 - 0x90f2ffff com.apple.CFNetwork 10.4.2 (80) /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/CFNetwork.framework/Versions/A/CFNetwork
0x90f44000 - 0x90f5cfff com.apple.WebServices 1.1.2 (1.1.0) /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/WebServicesCore.framework/Versions/A/WebServicesCore
0x90f6c000 - 0x90feafff com.apple.SearchKit 1.0.3 /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/SearchKit.framework/Versions/A/SearchKit
0x9102f000 - 0x91056fff com.apple.Metadata 1.1 (121.6) /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/Metadata.framework/Versions/A/Metadata
0x91066000 - 0x91074fff libz.1.dylib /usr/lib/libz.1.dylib
0x91077000 - 0x91239fff com.apple.security 4.0.1 (223) /System/Library/Frameworks/Security.framework/Versions/A/Security
0x9133b000 - 0x91344fff com.apple.DiskArbitration 2.1 /System/Library/Frameworks/DiskArbitration.framework/Versions/A/DiskArbitration
0x9134b000 - 0x91372fff com.apple.SystemConfiguration 1.8.0 /System/Library/Frameworks/SystemConfiguration.framework/Versions/A/SystemConfiguration
0x91385000 - 0x9138dfff libbsm.dylib /usr/lib/libbsm.dylib
0x91391000 - 0x9140ffff com.apple.audio.CoreAudio 3.0.1 /System/Library/Frameworks/CoreAudio.framework/Versions/A/CoreAudio
0x9144d000 - 0x9144dfff com.apple.ApplicationServices 10.4 (???) /System/Library/Frameworks/ApplicationServices.framework/Versions/A/ApplicationServices
0x9144f000 - 0x91487fff com.apple.AE 1.5 (297) /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/AE.framework/Versions/A/AE
0x914a2000 - 0x9156dfff com.apple.ColorSync 4.4 /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ColorSync.framework/Versions/A/ColorSync
0x915c2000 - 0x91655fff com.apple.print.framework.PrintCore 4.0 (172.1) /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/PrintCore.framework/Versions/A/PrintCore
0x9169b000 - 0x91758fff com.apple.QD 3.8.16 (???) /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/QD.framework/Versions/A/QD
0x91796000 - 0x917f4fff com.apple.HIServices 1.5.0 (???) /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/HIServices.framework/Versions/A/HIServices
0x91822000 - 0x91845fff com.apple.LangAnalysis 1.6 /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/LangAnalysis.framework/Versions/A/LangAnalysis
0x91859000 - 0x9187efff com.apple.FindByContent 1.5 /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/FindByContent.framework/Versions/A/FindByContent
0x91891000 - 0x918d2fff com.apple.LaunchServices 10.4.3 (157) /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/LaunchServices.framework/Versions/A/LaunchServices
0x918ed000 - 0x91901fff com.apple.speech.synthesis.framework 3.3 /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/SpeechSynthesis.framework/Versions/A/SpeechSynthesis
0x9190f000 - 0x91945fff com.apple.ImageIO.framework 1.0.2 /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ImageIO.framework/Versions/A/ImageIO
0x91959000 - 0x91a1ffff libcrypto.0.9.7.dylib /usr/lib/libcrypto.0.9.7.dylib
0x91a6c000 - 0x91a81fff libcups.2.dylib /usr/lib/libcups.2.dylib
0x91a86000 - 0x91aa2fff libJPEG.dylib /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ImageIO.framework/Versions/A/Resources/libJPEG.dylib
0x91aa7000 - 0x91b16fff libJP2.dylib /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ImageIO.framework/Versions/A/Resources/libJP2.dylib
0x91b2d000 - 0x91b31fff libGIF.dylib /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ImageIO.framework/Versions/A/Resources/libGIF.dylib
0x91b33000 - 0x91b4bfff libRaw.dylib /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ImageIO.framework/Versions/A/Resources/libRaw.dylib
0x91b4e000 - 0x91b91fff libTIFF.dylib /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ImageIO.framework/Versions/A/Resources/libTIFF.dylib
0x91b98000 - 0x91bb1fff libPng.dylib /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ImageIO.framework/Versions/A/Resources/libPng.dylib
0x91bb6000 - 0x91bb9fff libRadiance.dylib /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ImageIO.framework/Versions/A/Resources/libRadiance.dylib
0x91bbb000 - 0x91bbbfff com.apple.Accelerate 1.1.1 (Accelerate 1.1.1) /System/Library/Frameworks/Accelerate.framework/Versions/A/Accelerate
0x91bbd000 - 0x91ca7fff com.apple.vImage 2.0 /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vImage.framework/Versions/A/vImage
0x91caf000 - 0x91ccefff com.apple.Accelerate.vecLib 3.1.1 (vecLib 3.1.1) /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/vecLib
0x91d3a000 - 0x91d5afff libmx.A.dylib /usr/lib/libmx.A.dylib
0x91d60000 - 0x91dc5fff libvMisc.dylib /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libvMisc.dylib
0x91dcf000 - 0x91e61fff libvDSP.dylib /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libvDSP.dylib
0x91e7b000 - 0x9240bfff libBLAS.dylib /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libBLAS.dylib
0x92453000 - 0x92763fff libLAPACK.dylib /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libLAPACK.dylib
0x92790000 - 0x9281bfff com.apple.DesktopServices 1.3 /System/Library/PrivateFrameworks/DesktopServicesPriv.framework/Versions/A/DesktopServicesPriv
0x9285d000 - 0x92a86fff com.apple.Foundation 6.4.1 (567.12) /System/Library/Frameworks/Foundation.framework/Versions/C/Foundation
0x92ba4000 - 0x92c82fff libxml2.2.dylib /usr/lib/libxml2.2.dylib
0x92ca2000 - 0x92d90fff libiconv.2.dylib /usr/lib/libiconv.2.dylib
0x92da2000 - 0x92dc0fff libGL.dylib /System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGL.dylib
0x92dcb000 - 0x92e25fff libGLU.dylib /System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGLU.dylib
0x92e43000 - 0x92e43fff com.apple.Carbon 10.4 (???) /System/Library/Frameworks/Carbon.framework/Versions/A/Carbon
0x92e45000 - 0x92e59fff com.apple.ImageCapture 3.0 /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/ImageCapture.framework/Versions/A/ImageCapture
0x92e71000 - 0x92e81fff com.apple.speech.recognition.framework 3.4 /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/SpeechRecognition.framework/Versions/A/SpeechRecognition
0x92e8d000 - 0x92ea2fff com.apple.securityhi 2.0 (203) /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/SecurityHI.framework/Versions/A/SecurityHI
0x92eb4000 - 0x92f3bfff com.apple.ink.framework 101.2 (69) /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/Ink.framework/Versions/A/Ink
0x92f4f000 - 0x92f5afff com.apple.help 1.0.3 (32) /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/Help.framework/Versions/A/Help
0x92f64000 - 0x92f91fff com.apple.openscripting 1.2.2 (???) /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/OpenScripting.framework/Versions/A/OpenScripting
0x92fab000 - 0x92fbbfff com.apple.print.framework.Print 4.0 (187) /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/Print.framework/Versions/A/Print
0x92fc7000 - 0x9302dfff com.apple.htmlrendering 1.1.2 /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/HTMLRendering.framework/Versions/A/HTMLRendering
0x9305e000 - 0x930b0fff com.apple.NavigationServices 3.4.1 (3.4) /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/NavigationServices.framework/Versions/A/NavigationServices
0x930dc000 - 0x930f9fff com.apple.audio.SoundManager 3.9 /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/CarbonSound.framework/Versions/A/CarbonSound
0x9310b000 - 0x93118fff com.apple.CommonPanels 1.2.2 (73) /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/CommonPanels.framework/Versions/A/CommonPanels
0x93121000 - 0x93431fff com.apple.HIToolbox 1.4.3 (???) /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/HIToolbox.framework/Versions/A/HIToolbox
0x9357c000 - 0x93588fff com.apple.opengl 1.4.0 /System/Library/Frameworks/OpenGL.framework/Versions/A/OpenGL
0x9361b000 - 0x93623fff libgcc_s.1.dylib /usr/lib/libgcc_s.1.dylib
0x94089000 - 0x94153fff com.apple.audio.toolbox.AudioToolbox 1.4.1 /System/Library/Frameworks/AudioToolbox.framework/Versions/A/AudioToolbox
0x941a7000 - 0x941a7fff com.apple.audio.units.AudioUnit 1.4 /System/Library/Frameworks/AudioUnit.framework/Versions/A/AudioUnit
0x941a9000 - 0x94308fff com.apple.QuartzCore 1.4.1 /System/Library/Frameworks/QuartzCore.framework/Versions/A/QuartzCore
0x94395000 - 0x943e0fff libGLImage.dylib /System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGLImage.dylib
0x94581000 - 0x94590fff libCGATS.A.dylib /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/CoreGraphics.framework/Versions/A/Resources/libCGATS.A.dylib
0x94598000 - 0x945a4fff libCSync.A.dylib /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/CoreGraphics.framework/Versions/A/Resources/libCSync.A.dylib
0x945e9000 - 0x945fdfff libRIP.A.dylib /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/CoreGraphics.framework/Versions/A/Resources/libRIP.A.dylib
0x94603000 - 0x9486dfff com.apple.QuickTime 7.0.2 /System/Library/Frameworks/QuickTime.framework/Versions/A/QuickTime
0x95419000 - 0x9549cfff libstdc++.6.dylib /usr/lib/libstdc++.6.dylib
0x9732d000 - 0x9734cfff com.apple.vecLib 3.1.1 (vecLib 3.1.1) /System/Library/Frameworks/vecLib.framework/Versions/A/vecLib
0x97b18000 - 0x97b25fff com.apple.agl 2.5.6 (AGL-2.5.6) /System/Library/Frameworks/AGL.framework/Versions/A/AGL
0x9953a000 - 0x99df2fff com.apple.QuickTimeComponents.component 7.0.2 /System/Library/QuickTime/QuickTimeComponents.component/Contents/MacOS/QuickTimeComponents
0x9a066000 - 0x9a069fff com.apple.QuickTimeH264.component 7.0.2 /System/Library/QuickTime/QuickTimeH264.component/Contents/MacOS/QuickTimeH264
0x9a258000 - 0x9a2fbfff com.apple.QuickTimeMPEG4.component 7.0.2 /System/Library/QuickTime/QuickTimeMPEG4.component/Contents/MacOS/QuickTimeMPEG4
Model: PowerBook5,6, BootROM 4.9.1f3, 1 processors, PowerPC G4 (1.2), 1.67 GHz, 1 GB
Graphics: ATI Mobility Radeon 9700, ATY,RV360M11, AGP, 128 MB
Memory Module: SODIMM0/J25LOWER, 512 MB, DDR SDRAM, PC2700U-25330
Memory Module: SODIMM1/J25UPPER, 512 MB, DDR SDRAM, PC2700U-25330
AirPort: AirPort Extreme, 400.17 (3.90.34.0.p11)
Modem: Jump, , V.92, Version 1.0,
Bluetooth: Version 1.6.0f2, 2 service, 0 devices, 0 incoming serial ports
PCI Card: TXN,PCIXXXX-00, cardbus, PC Card
Parallel ATA Device: MATSHITADVD-R UJ-835E,
Parallel ATA Device: ST9100823A, 93.16 GB
USB Device: Bluetooth HCI, , Up to 12 Mb/sec, 500 mA
USB Device: Apple Internal Keyboard/Trackpad, Apple Computer, Up to 12 Mb/sec, 500 mA
GreyCat: Given how many times I've seen the game freeze up when attempting to generate a level in the orc caves, I'm sure this is a bug in the generation code, and not anything platform-specific.
I don't pretend to understand the cave generation code, even with the comments, but this part looks terribly suspicious to me:
/* Testing values for these parameters feel free to adjust */
grd = 2 ^ (randint(4));
Was this intended to be "2 to a random power"? The ^ operator in C is XOR, not exponentiation! The code makes no sense. 2 XOR randint(4) gives one of four possible values: 3, 0, 1 or 6.
Unfortunately, I don't know what the intended or legitimate values of "grd" are. The comments are quite vague on that point.
Anyone want to bet it's supposed to be this:
grd = 1 << randint(4);
(Or, anyone willing to test it and see if it blows up?) There are three lines like this, and I'd be willing to provide a formal patch for testing purposes if someone's interested....
HarryErwin: I'm accustomed to doing beta testing, so yes, I'll do it.
GreyCat: OK, here's the diff. Should be trivial to apply by hand if you lack a decent patch utility. As far as testing goes, I'd run through the Orc cave a bunch of times, and then power up in wizard mode and run through Angband. Or at least visit the top level, wiz_lite it, and repeat....
--- src/generate.c.orig Mon Oct 10 08:50:41 2005
+++ src/generate.c Mon Oct 10 08:51:17 2005
@@ -4804,7 +4804,7 @@
while (!done)
{
/* Testing values for these parameters: feel free to adjust */
- grd = 2 ^ (randint(4) + 4);
+ grd = 1 << (randint(4) + 4);
/* Want average of about 16 */
roug = randint(8) * randint(4);
@@ -4850,7 +4850,7 @@
*/
/* Testing values for these parameters feel free to adjust */
- grd = 2 ^ (randint(4));
+ grd = 1 << (randint(4));
/* Want average of about 16 */
roug = randint(8) * randint(4);
@@ -5411,7 +5411,7 @@
while (!done)
{
/* Testing values for these parameters feel free to adjust */
- grd = 2 ^ rand_int(4);
+ grd = 1 << rand_int(4);
/* Want average of about 16 */
roug = randint(8) * randint(4);
HarryErwin: Before I go much further, here is a question for Michael Croft--how did you get the graphics working? It looks like you're code is looking for the graphics files at the top level rather than in the resources subdirectory. Would you be willing to post it?
OK, never mind. I stashed the .png files in the Resources subdirectory and that seems to work.
GreyCat: I've committed the preceding patch to CVS. I'm not sure whether it actually fixes anything, but it doesn't seem to have made anything worse....
Testing would be welcome.
ElCuGo: Can someone lock this page? It has been vandalized a lot recently. Also someone could delete the history of this page since the spam can still be found there and we don't want spammers to win.
ToME Wiki