Comment 3 for bug 626603

Revision history for this message
Timothy Palpant (timothypalpant) wrote :

I found the Debugger Console in XCode, which was significantly more informative than the "Debug Console" that popped up automatically. Here is the Exception:

2010-09-23 21:32:11 -0400 [script] [BASE] thread is terminating
__raiseError (in CoreFoundation) + 381
objc_exception_throw (in libobjc.A.dylib) + 56
+[NSException raise:format:arguments:] (in CoreFoundation) + 136
+[NSException raise:format:] (in CoreFoundation) + 58
_NSArrayRaiseBoundException (in Foundation) + 121
-[NSCFArray objectAtIndex:] (in Foundation) + 63
-[RXCard _loadScripts] (in Riven X) (RXCard.m:136)
-[RXCard load] (in Riven X) (RXCard.m:755)
-[RXScriptEngine openCard] (in Riven X) (RXScriptEngine.m:594)
-[RXCardState _switchCardWithSimpleDescriptor:] (in Riven X) (RXCardState.mm:1456)
-[NSObject(NSThreadPerformAdditions) performSelector:onThread:withObject:waitUntilDone:modes:] (in Foundation) + 238
-[NSObject(NSThreadPerformAdditions) performSelector:onThread:withObject:waitUntilDone:] (in Foundation) + 169
performSelector (in Riven X) (InterThreadMessaging.m:122)
-[NSObject(InterThreadMessaging) performSelector:withObject:inThread:waitUntilDone:] (in Riven X) (InterThreadMessaging.m:174)
-[RXCardState setActiveCardWithSimpleDescriptor:waitUntilDone:] (in Riven X) (RXCardState.mm:1507)
-[RXCardState setActiveCardWithStack:ID:waitUntilDone:] (in Riven X) (RXCardState.mm:1516)
-[RXScriptEngine _opcode_goToStack:arguments:] (in Riven X) (RXScriptEngine.m:1733)
-[RXScriptEngine _executeRivenProgram:count:] (in Riven X) (RXScriptEngine.m:483)
-[RXScriptEngine mouseDownInHotspot:] (in Riven X) (RXScriptEngine.m:993)
__NSThreadPerformPerform (in Foundation) + 506
__CFRunLoopDoSources0 (in CoreFoundation) + 1563
__CFRunLoopRun (in CoreFoundation) + 1071
CFRunLoopRunSpecific (in CoreFoundation) + 452
CFRunLoopRunInMode (in CoreFoundation) + 97
-[NSRunLoop(NSRunLoop) runMode:beforeDate:] (in Foundation) + 279
-[NSRunLoop(NSRunLoop) run] (in Foundation) + 76
RXThreadRunLoopRun (in Riven X) (RXThreadUtilities.m:97)
-[RXWorld _RXScriptThreadEntry:] (in Riven X) (RXWorld.mm:309)
-[NSThread main] (in Foundation) + 45
__NSThread__main__ (in Foundation) + 1499
_pthread_start (in libSystem.B.dylib) + 345
thread_start (in libSystem.B.dylib) + 34

And around RXCard.m:136 is this:

// WORKAROUND: there is a legitimate bug in the CD edition's tspit 155 open card program;
// FIXME: need a new "is CD edition" check
// it executes activate SLST record 2 command after the introduction sequence, which is the mute SLST; patch it up to activate SLST 1
// if ([_descriptor isCardWithRMAP:28314 stackName:@"tspit"] && [[ce valueForKey:@"key"] isEqualToString:@"CD_EDITION"]) {
if ([_descriptor isCardWithRMAP:28314 stackName:@"tspit"]) {
    NSDictionary* start_rendering_program = [[_card_scripts objectForKey:RXStartRenderingScriptKey] objectAtIndex:0];
    RXScriptCompiler* comp = [[RXScriptCompiler alloc] initWithCompiledScript:start_rendering_program];
    NSMutableArray* dp = [comp decompiledScript];

with

136: NSDictionary* start_rendering_program = [[_card_scripts objectForKey:RXStartRenderingScriptKey] objectAtIndex:0];

being the operative line. I took a shot in the dark by commenting out the entire if-block in hopes that it was non-essential, and that fixed it for me. I'm afraid that is as close as I can get to a fix, as I'm not sure what this code is attempting to do and Objective-C is a little bit cryptic to a Java programmer.

Again, I am using the Steam files, so a new case might be needed to detect them.