Riven X crashes on Start New Game

Bug #626603 reported by Jean-Francois Roy
36
This bug affects 6 people
Affects Status Importance Assigned to Milestone
Riven X
Fix Committed
Critical
Jean-Francois Roy

Bug Description

I have a problem where RivenX crashes as soon as I press the Start New Game. I'm running MacBook Pro with 10.6.4 with a 2 GHz Intel Core Duo with 1.5 GB 667M MHz DDR2 SDRAM. Is there anything wrong with my computer or is it a bug?

Changed in rivenx:
status: New → Incomplete
Revision history for this message
Jordan Carrick (bournlucky) wrote :

Attached is a text file of the crash log. Let me know if you need something else.

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

I also have this problem on a similar system. The exception that I get is:

*** -[NSCFArray objectAtIndex:]: index (0) beyond bounds (0)
NSRangeException

I have checked out the latest code from Bazaar and attempted to track this down, but with no luck. (I do not have any experience with OS X programming)

Also, I am using the files from the Steam version of the game, so the problem may stem from that, but I have not been able to tell from the error message.

Revision history for this message
Timothy Palpant (timothypalpant) wrote :
Download full text (3.4 KiB)

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...

Read more...

Revision history for this message
Ben Haines (enjambed) wrote :

I'm also seeing the crash on "start new game" on Snow Leopard and RivenX 0.9.6. Crash log attached.

Revision history for this message
Callum Thorpe (makemonsters) wrote :

I have the same problem. To use Timothy's solution above, which file needs editing and how do I do that if I don't have access to XCode?! I am also using the Steam version of the game.

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

You need to edit RXCard.m line 136 to comment out a block of code. You can do that in TextEdit (or any text file editor), but you will have a hard time building the application without Xcode. I uploaded my build here:

http://palpant.us/RivenX.zip

So you're welcome to try it out if you'd like. Hopefully it will at least hold you off until this is fixed. Let me know if it helps!

Revision history for this message
Callum Thorpe (makemonsters) wrote :

Smashing, that works a treat! Thanks very much!

Revision history for this message
Nathan Wendel (nathan-wendel) wrote :

Hi, I get this same crash but Timothy's build didn't solve it for me. I have X-Code but I wouldn't know how to do anything different from what he has. Unless anyone has a suggestion?

I'm running 10.6.6 on a 2.4 Ghz Core 2 Duo Macbook from 2008 (Macbook 4.1), with 4GB 667 MHz DDR2 SDRAM and 4.79 GB available HDD space. I've installed the DVD version of the game.

I'm attaching my crash report (from build 0.9.6, not Timothy's build).

Thanks. Best of luck, looking forward to 1.0.

Revision history for this message
Nathan Wendel (nathan-wendel) wrote :

And in case it will be useful, attached is the crash from using Timothy's build. Thanks!

Revision history for this message
Liam Dick (liam-dick) wrote :

I'm getting the same problem.
I downloaded the latest Riven X file, it starts the menu up fine, then I click "Start New Game" and it crashes every time.
Timothy's build said that I didn't have the latest version of Quicktime.
I've been trying to get this game for a very long time. I hope someone fixes this soon.

Revision history for this message
Robert Krahn (rkrahn) wrote :

I just purchased Riven from Steam and am getting the same NSCFArray error. I'm running OS 10.6.8 with QT 10. Timothy's build isn't working since it's requiring QT 7. I'd love to be able to play it, and I appreciate your efforts to make this great game available to guys like me, who've never experienced it.

Revision history for this message
Jean-Francois Roy (jeanfrancois.roy) wrote :

Nathan's issue is different than the rest of the posters.

Changed in rivenx:
status: Incomplete → In Progress
importance: Undecided → Critical
assignee: nobody → Jean-Francois Roy (jeanfrancois.roy)
Changed in rivenx:
status: In Progress → Fix Committed
Revision history for this message
Michel Müller (mmueller-ee) wrote :

I also get the message "*** -[__NSArrayM objectAtIndex:]: index 0 beyond bounds for empty array" on clicking "start new game" in 0.9.8. I'm using the steam release as well.

Building from your github sources works. Would be great if you released it this way. Cheers for your effort though, thank you very much!

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Related questions

Remote bug watches

Bug watches keep track of this bug in other bug trackers.