Crash on last spot of dark tunnel

Bug #1059381 reported by Michel Müller
16
This bug affects 3 people
Affects Status Importance Assigned to Milestone
Riven X
New
Undecided
Unassigned

Bug Description

I'm using the steam data together with the latest developer version of Riven X that I've compiled from sources.
System:
10.8.2
Retina Macbook Pro, 16 GB Ram

On the last spot of the dark tunnel, the place where you can start the chain of lamps in order to get to the animal circle, there is a crash every time I want to turn around towards the tunnel again. Saving at that point could even brick the savegame (at least for someone not being able to change the code ;) ). The game crashes on "release_assert(hotspot)", line 2054 in RXScriptEngine.m -> hotspot is Null at that point; I did the following hack to make it work again:

- commented out the the assert

- put an if(hotspot) conditonal around the next 10 or so lines of the function (everything except [controller updateHotspotState]).

This is what it looks like from the assert on:

 //release_assert(hotspot);

    if (hotspot) {
        OSSpinLockLock(&_active_hotspots_lock);
        if (record->enabled == 1 && !hotspot->enabled)
            [_active_hotspots addObject:hotspot];
        else if (record->enabled == 0 && hotspot->enabled)
            [_active_hotspots removeObject:hotspot];
        OSSpinLockUnlock(&_active_hotspots_lock);

        hotspot->enabled = record->enabled;

        OSSpinLockLock(&_active_hotspots_lock);
        [_active_hotspots sortUsingSelector:@selector(compareByIndex:)];
        OSSpinLockUnlock(&_active_hotspots_lock);
    }

    // instruct the script handler to update the hotspot state
    [controller updateHotspotState];

This way I can actually turn around, which appears to be corrupting the state for the next hotspots, leading to a jump to somewhere outside the tunnel - however the light was on at that point and I didn't need to go back to the faulty spot again, therefore being able to continue with the game ;).

Generally I find the functionality of release_assert questionable - for a game it might be better to do something unexpected than to crash anyways ;).

Anyway, it was nice hacking myself around the game, thanks for sharing the source.

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

Other bug subscribers

Remote bug watches

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