Bug 5528 - Game crashes sporadically after cutscenes
Status: RESOLVED FIXED
Alias: None
Product: Psychonauts
Classification: Unclassified
Component: everything
Version: unspecified
Hardware: PC Linux
: P3 major
Assignee: Ryan C. Gordon
QA Contact: Ryan C. Gordon
URL:
: 5523 5550 5582 5587 5593 5598 5609 5663
Depends on:
Blocks:
 
Reported: 2012-05-31 21:56 EDT by Daniel
Modified: 2012-06-20 23:31:13 EDT
14 users (show)

See Also:



Description Daniel 2012-05-31 21:56:30 EDT
When I play the game, after a cutscene the game may crash. This seems to happen sporadically as I can often play past the cutscene if I reload the game from the nearest save and go through it again.

I'm running Arch Linux 64bit (kernel version 3.3.7-1), using GNOME 3 and PulseAudio/ALSA for sound.

Here is the console output prior to the error, I was unsure where to cut off, so I added all that was in my terminal:

Game: Engine Running hook startup
Game: Engine   -> SetupGlobalObjects
Game: Engine   -> SetupLevelMenu
Game: Engine   -> InitMath
WARN: Couldn't resize array to 128; out-of-bounds elements are still in use: Vertex Pool, 188
Loading new level 'CAKC'
=========================
Memory post unload level
=========================
=========================
DaveD: Info: Texture pack file contains 468 textures
Game: Engine Saved[GLOBAL]: InstaHintFord_HostileRecord = [table]
Game: Engine Saved[GLOBAL]: InstaHintFord_HostileOrder = [table]
WARN: Redundant packfile read: anims\coach\coach_breathe.jan
WARN: Redundant packfile read: anims\thought_bubble\bubblefirestarting.jan
WARN: Redundant packfile read: anims\thought_bubble\bubbleintothemind.jan
WARN: Redundant packfile read: anims\thought_bubble\bubbleinvisibility.jan
WARN: Redundant packfile read: anims\thought_bubble\bubblepopperfill.jan
WARN: Redundant packfile read: anims\thought_bubble\bubbletelekinesis.jan
Initializing level script (if there is one)
Game: Engine adapted 2, current 2
PSYCHONAUTS UNIX FILENAME: corrected 'workresource/sounds/cafxmem.isb' to 'WorkResource/Sounds/cafxmem.isb'
PSYCHONAUTS UNIX FILENAME: corrected 'workresource/sounds/cakcfx.isb' to 'WorkResource/Sounds/cakcfx.isb'
PSYCHONAUTS UNIX FILENAME: corrected 'workresource/sounds/cafx.isb' to 'WorkResource/Sounds/cafx.isb'
PSYCHONAUTS UNIX FILENAME: corrected 'workresource/sounds/cakcvoice.isb' to 'WorkResource/Sounds/cakcvoice.isb'
PSYCHONAUTS UNIX FILENAME: corrected 'workresource/sounds/camusic.isb' to 'WorkResource/Sounds/camusic.isb'
PSYCHONAUTS UNIX FILENAME: corrected 'workresource/sounds/cavoice.isb' to 'WorkResource/Sounds/cavoice.isb'
Game: Engine Saved[GLOBAL]: scavengerHuntItems = [table]
Game: Engine Saved[GLOBAL]: numUnredeemedScavengerHuntItems = 0
Game: Engine Saved[GLOBAL]: numRedeemedScavengerHuntItems = 0
Game: Engine Saved[GLOBAL]: rank = 6
Game: Engine Saved[GLOBAL]: cardsInInv = 6
Game: Engine Saved[GLOBAL]: coresInInv = 0
Game: Engine Saved[GLOBAL]: websInInv = 0
Game: Engine Saved[GLOBAL]: figmentPoints = 11
Game: Engine Saved[GLOBAL]: brains = [table]
Game: Engine Saved[GLOBAL]: totalBrainsHeld = 0
Game: Engine Saved[GLOBAL]: totalBrainsRedeemed = 0
Game: Engine Saved[GLOBAL]: maxHealth = 16
Game: Engine Saved[GLOBAL]: psiHealth = 16
Game: Engine Saved[GLOBAL]: maxLives = 5
Game: Engine Saved[GLOBAL]: dartLives = 5
Game: Engine Saved[GLOBAL]: arrowheads = 9
Game: Engine Saved[GLOBAL]: numUnredeemedPsitanium = 1
Game: Engine Saved[GLOBAL]: psiBlastMaxAmmo = 30
Game: Engine Saved[GLOBAL]: psiBlastAmmo = 30
Game: Engine Saved[GLOBAL]: totalVaults = 1
Game: Engine Saved[GLOBAL]: confusionMaxAmmo = 5
Game: Engine Saved[GLOBAL]: confusionAmmo = 5
Game: Engine Saved[GLOBAL]: cardsRedeemed = 0
Game: Engine Saved[GLOBAL]: cobwebsRedeemed = 0
Game: Engine Saved[GLOBAL]: bSaveGame = 1
Game: Engine Saved[GLOBAL]: baggageMatched = 5
Game: Engine Saved[GLOBAL]: shownpokey = [table]
Game: Engine Saved[GLOBAL]: clairvoyanced = [table]
Game: Engine Saved[GLOBAL]: scavengerHuntItems = [table]
Game: Engine Saved[GLOBAL]: numUnredeemedScavengerHuntItems = 0
Game: Engine Saved[GLOBAL]: numRedeemedScavengerHuntItems = 0
Game: Engine Saved[GLOBAL]: arrowheads = 9
Game: Engine Saved[GLOBAL]: numUnredeemedPsitanium = 1
Game: Engine Saved[GLOBAL]: psiBlastMaxAmmo = 30
Game: Engine Saved[GLOBAL]: psiBlastAmmo = 30
Game: Engine Saved[GLOBAL]: totalVaults = 1
Game: Engine Saved[GLOBAL]: confusionMaxAmmo = 5
Game: Engine Saved[GLOBAL]: confusionAmmo = 5
Game: Engine Saved[GLOBAL]: cardsRedeemed = 0
Game: Engine Saved[GLOBAL]: cobwebsRedeemed = 0
Game: Engine Saved[GLOBAL]: bSaveGame = 1
Game: Engine Saved[GLOBAL]: baggageMatched = 5
Game: Engine Saved[GLOBAL]: shownpokey = [table]
Game: Engine Saved[GLOBAL]: clairvoyanced = [table]
Game: Engine Saved[GLOBAL]: scavengerHuntItems = [table]
Game: Engine Saved[GLOBAL]: numUnredeemedScavengerHuntItems = 0
Game: Engine Saved[GLOBAL]: numRedeemedScavengerHuntItems = 0
Game: Engine Saved[GLOBAL]: rank = 6
Game: Engine Saved[GLOBAL]: cardsInInv = 6
Game: Engine Saved[GLOBAL]: coresInInv = 0
Game: Engine Saved[GLOBAL]: websInInv = 0
Game: Engine Saved[GLOBAL]: figmentPoints = 11
Game: Engine Saved[GLOBAL]: brains = [table]
Game: Engine Saved[GLOBAL]: totalBrainsHeld = 0
Game: Engine Saved[GLOBAL]: totalBrainsRedeemed = 0
Game: Engine Saved[GLOBAL]: maxHealth = 16
Game: Engine Saved[GLOBAL]: psiHealth = 16
Game: Engine Saved[GLOBAL]: maxLives = 5
Game: Engine Saved[GLOBAL]: dartLives = 5
Game: Engine Saved[GLOBAL]: arrowheads = 9
Game: Engine Saved[GLOBAL]: numUnredeemedPsitanium = 1
Game: Engine Saved[GLOBAL]: psiBlastMaxAmmo = 30
Game: Engine Saved[GLOBAL]: psiBlastAmmo = 30
Game: Engine Saved[GLOBAL]: totalVaults = 1
Game: Engine Saved[GLOBAL]: confusionMaxAmmo = 5
Game: Engine Saved[GLOBAL]: confusionAmmo = 5
Game: Engine Saved[GLOBAL]: cardsRedeemed = 0
Game: Engine Saved[GLOBAL]: cobwebsRedeemed = 0
Game: Engine Saved[GLOBAL]: bSaveGame = 1
Game: Engine Saved[GLOBAL]: baggageMatched = 5
Game: Engine Saved[GLOBAL]: shownpokey = [table]
Game: Engine Saved[GLOBAL]: clairvoyanced = [table]
Game: Engine Reloading goals:
Game: Engine Activating goal: ObstacleCourse
Game: Engine Saved[GLOBAL]: ActiveGoals = [table]
1: UpdateJournal        (string)
1: Real Node: ObstacleCourse Real Parent: root Real     (string)
1: Render ObstacleCourse        (string)
Game: Engine Saved[GLOBAL]: NextEncouragement = '/GLZF014TO/ 10'
Game: Engine Saved[GLOBAL]: bUsedSalts = 0
Game: Engine Saved[GLOBAL]: PsiBallColor = 'red'
Game: Engine Warning: Animator requires you to define self.animBasePath to function correctly.
WARN: (none(-1) LoadAnim NewFan: No anim passed
Game: Engine Warning: Animator can load your mesh for you.  Not loading mesh for Ford.  Define self.meshName.
WARN: ENGINE: Lua garbage collection starting
FreeUnusedBlocksInBuckets released 0 Kb
WARN: (none(-1) SetSimulationCullDistance LevelScript: Warn: LSO (null) does not have an entity
WARN: (none(-1) SetPhysicsFlag LevelScript: Warn: LSO (null) does not have an entity
VM  : JT could not find script 'Chops'
* Stack Trace
1: (null)                    (line   -1, file '(none)) ()
2: SpawnScript               (line   -1, file 'C) (global)
3: onBeginLevel              (line   -1, file '(none)) (field)
4: (null)                    (line   -1, file '(none)) ()
Game: Engine HideNSeek has not been seen
WARN: (none(-1) SetSimulationCullDistance LevelScript: Warn: LSO (null) does not have an entity
WARN: (none(-1) SetPhysicsFlag LevelScript: Warn: LSO (null) does not have an entity
Game: Engine LOADING LEVEL ca.CAKC
Game: Engine Saved[GLOBAL]: NextEncouragement = '/GLZF014TO/ 10'
Game: Engine Cutscene progression: CS Script moving from state nil to state nil, resultant state nil.  Time: 1046.015258789062.
* Stack Trace
1: (null)                    (line   -1, file '(none)) ()
2: SpawnScript               (line   -1, file 'C) (global)
3: onBeginLevel              (line   -1, file '(none)) (field)
4: onBeginLevel              (line   -1, file '(none)) (field)
5: (null)                    (line   -1, file '(none)) ()
Game: Engine Raz spawning at DartStart GEN_dartstart
VM  : (none(-1) RegisterTriggerVolume LevelScript: Could not find trigger volume 'tv_CoachOffice'
Game: Engine Saved[GLOBAL]: NeedRankIncrement = 0
WARN: ENGINE: Lua garbage collection starting
FreeUnusedBlocksInBuckets released 0 Kb
======================
Asset load progression
======================
Initial: 2.518 MB Vertex, 8.688 MB Texture
Level  : 11.222 MB Vertex, 33.246 MB Texture
Scripts: 11.248 MB Vertex, 33.246 MB Texture
======================
======================
Memory post level load
======================
======================
WARN: ENGINE: Lua garbage collection starting
FreeUnusedBlocksInBuckets released 0 Kb
DaveD: Level loaded in 1.77 seconds
Anim: anims\dragonfly\fly.jan: loaded (1 frames latency)
Anim: anims\dartnew\helmet\darthelmetup.jan: loaded (1 frames latency)
Anim: anims\campkids\idle01.jan: loaded (1 frames latency)
Anim: anims\lili\meditate.jan: loaded (1 frames latency)
Anim: anims\psichallenge\spin.jan: loaded (1 frames latency)
Anim: anims\psichallenge\psicardspin_loop.jan: loaded (1 frames latency)
PSYCHONAUTS UNIX FILENAME: corrected 'WorkResource/cutscenes/prerendered/casr.bik' to 'WorkResource/cutscenes/prerendered/CASR.bik'
PSYCHONAUTS UNIX FILENAME: corrected 'WorkResource/cutscenes/prerendered/casr.dfs' to 'WorkResource/cutscenes/prerendered/CASR.dfs'
PSYCHONAUTS UNIX FILENAME: corrected 'WorkResource/cutscenes/prerendered/casr.dfs' to 'WorkResource/cutscenes/prerendered/CASR.dfs'
PSYCHONAUTS UNIX FILENAME: corrected 'WorkResource/cutscenes/prerendered/casr.bik' to 'WorkResource/cutscenes/prerendered/CASR.bik'
PSYCHONAUTS UNIX FILENAME: corrected 'WorkResource/cutscenes/prerendered/casr.bik' to 'WorkResource/cutscenes/prerendered/CASR.bik'

Encountered Error:
  Psychonauts has encountered an error

/home/icculus/projects/psychonauts/Source/game/luatest/ScriptVM/ScriptThread.cpp, line 102
((DWORD*)m_pStack)[0] == SENTINEL_VALUE_DWORD
Comment 1 Sven Hesse 2012-05-31 22:23:20 EDT
Alternatively, the game may also lockup, or crash with a double free or floating point exception. Also before starting a cutscene, not just afterwards.
Looks like a textbook memory corruption to me; I'd advise taking a closer look with valgrind.

Moreover, that bug is for me reproducible every time after the "Way to make us look bad" cutscene after the Basic Braining. So the game is, for me, only playable until this point.
Comment 2 David Gow 2012-06-01 02:29:01 EDT
I've been getting this issue when the cutscene 'BBLI' begins to play. (Often crashing with a SIGFPE.
Comment 3 violaceous.fox 2012-06-01 08:01:20 EDT
I am having the same problem as the first commenter; in addition to random cutscene crashes, the game inevitably crashes at the end of the cutscene after Basic Braining. Trying to skip the cutscene by hitting ESC simply makes the game crash immediately.
Comment 4 Daniel 2012-06-01 19:39:45 EDT
I am now getting crashes at the end of Basic Braining, when the cutscene is about to play, also with a floating point error. I am unable to play past this point.

Here's some data I dredged up in gdb, if useful:

Program received signal SIGFPE, Arithmetic exception.
0x0852acc9 in BinkOpen ()

The assembly code that leads up to the error point is as such:

   0x0852acaf <+3471>:  movl   $0x3e8,0x14(%esp)
   0x0852acb7 <+3479>:  mov    %edx,0x1c(%esp)
   0x0852acbb <+3483>:  mov    0x1c(%esp),%eax
   0x0852acbf <+3487>:  mov    0x18(%esp),%ecx
   0x0852acc3 <+3491>:  mul    %ecx
   0x0852acc5 <+3493>:  mov    0x14(%esp),%ecx
=> 0x0852acc9 <+3497>:  div    %ecx

And my registers at the time look like this:

eax            0x200ebce0       537836768
ecx            0x3e8    1000
edx            0xb137   45367
ebx            0x0      0
esp            0xfc51680        0xfc51680
ebp            0xfdf36e0        0xfdf36e0
esi            0x0      0
edi            0xac44   44100
eip            0x852acc9        0x852acc9 <BinkOpen+3497>
eflags         0x10a13  [ CF AF IF OF RF ]
cs             0x23     35
ss             0x2b     43
ds             0x2b     43
es             0x2b     43
fs             0x0      0
gs             0x63     99
st0            0        (raw 0x00000000000000000000)
st1            -0.3327982723712921142578125     (raw 0xbffdaa64890000000000)
st2            0.88217919803635069797564938198775053    (raw 0x3ffee1d67ef4c7130000)
st3            0.970084607601165771484375       (raw 0x3ffef857770000000000)
st4            2600     (raw 0x400aa280000000000000)
st5            0.6018928325374116594659312795556616     (raw 0x3ffe9a15a60f71eab800)
st6            1        (raw 0x3fff8000000000000000)
st7            1        (raw 0x3fff8000000000000000)
fctrl          0x37f    895
fstat          0x3f     63
ftag           0xffff   65535
fiseg          0x0      0
fioff          0x0      0
foseg          0x0      0
fooff          0x0      0
fop            0x0      0
xmm0           {v4_float = {0x0, 0x0, 0x0, 0x0}, v2_double = {0x0, 0x0}, v16_int8 = {0x0 <repeats 16 times>}, v8_int16 = {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0}, v4_int32 = {
    0x0, 0x0, 0x0, 0x0}, v2_int64 = {0x0, 0x0}, uint128 = 0x00000000000000000000000000000000}
xmm1           {v4_float = {0x0, 0x0, 0x0, 0x0}, v2_double = {0x0, 0x0}, v16_int8 = {0x0 <repeats 16 times>}, v8_int16 = {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0}, v4_int32 = {
    0x0, 0x0, 0x0, 0x0}, v2_int64 = {0x0, 0x0}, uint128 = 0x00000000000000000000000000000000}
xmm2           {v4_float = {0x0, 0x0, 0x0, 0x0}, v2_double = {0x8000000000000000, 0x0}, v16_int8 = {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xff, 0x0, 0xff, 0x0, 0x0, 0x0, 0x0,
    0xff, 0x0}, v8_int16 = {0x0, 0x0, 0x0, 0xff00, 0xff00, 0x0, 0x0, 0xff}, v4_int32 = {0x0, 0xff000000, 0xff00, 0xff0000}, v2_int64 = {0xff00000000000000, 0xff00000000ff00},
  uint128 = 0x00ff00000000ff00ff00000000000000}
xmm3           {v4_float = {0x0, 0x0, 0x0, 0x0}, v2_double = {0x0, 0x0}, v16_int8 = {0x0 <repeats 16 times>}, v8_int16 = {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0}, v4_int32 = {
    0x0, 0x0, 0x0, 0x0}, v2_int64 = {0x0, 0x0}, uint128 = 0x00000000000000000000000000000000}
xmm4           {v4_float = {0x0, 0x0, 0x0, 0x0}, v2_double = {0x8000000000000000, 0x8000000000000000}, v16_int8 = {0x73, 0x20, 0x6e, 0x6f, 0x74, 0x20, 0x68, 0x61, 0x76, 0x65,
    0x20, 0x61, 0x6e, 0x20, 0x65, 0x6e}, v8_int16 = {0x2073, 0x6f6e, 0x2074, 0x6168, 0x6576, 0x6120, 0x206e, 0x6e65}, v4_int32 = {0x6f6e2073, 0x61682074, 0x61206576,
    0x6e65206e}, v2_int64 = {0x616820746f6e2073, 0x6e65206e61206576}, uint128 = 0x6e65206e61206576616820746f6e2073}
xmm5           {v4_float = {0x9080000, 0x0, 0x0, 0x0}, v2_double = {0x0, 0x0}, v16_int8 = {0x42, 0x42, 0x4c, 0x54, 0x0 <repeats 12 times>}, v8_int16 = {0x4242, 0x544c, 0x0,
    0x0, 0x0, 0x0, 0x0, 0x0}, v4_int32 = {0x544c4242, 0x0, 0x0, 0x0}, v2_int64 = {0x544c4242, 0x0}, uint128 = 0x000000000000000000000000544c4242}
xmm6           {v4_float = {0x0, 0x0, 0x0, 0x0}, v2_double = {0x0, 0x0}, v16_int8 = {0x0 <repeats 16 times>}, v8_int16 = {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0}, v4_int32 = {
    0x0, 0x0, 0x0, 0x0}, v2_int64 = {0x0, 0x0}, uint128 = 0x00000000000000000000000000000000}
xmm7           {v4_float = {0x0, 0x0, 0x0, 0x0}, v2_double = {0x8000000000000000, 0x8000000000000000}, v16_int8 = {0xff <repeats 16 times>}, v8_int16 = {0xffff, 0xffff, 0xffff,
    0xffff, 0xffff, 0xffff, 0xffff, 0xffff}, v4_int32 = {0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff}, v2_int64 = {0xffffffffffffffff, 0xffffffffffffffff},
  uint128 = 0xffffffffffffffffffffffffffffffff}
mxcsr          0x1fa0   [ PE IM DM ZM OM UM PM ]
mm0            {uint64 = 0x0, v2_int32 = {0x0, 0x0}, v4_int16 = {0x0, 0x0, 0x0, 0x0}, v8_int8 = {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0}}
mm1            {uint64 = 0xaa64890000000000, v2_int32 = {0x0, 0xaa648900}, v4_int16 = {0x0, 0x0, 0x8900, 0xaa64}, v8_int8 = {0x0, 0x0, 0x0, 0x0, 0x0, 0x89, 0x64, 0xaa}}
mm2            {uint64 = 0xe1d67ef4c7130000, v2_int32 = {0xc7130000, 0xe1d67ef4}, v4_int16 = {0x0, 0xc713, 0x7ef4, 0xe1d6}, v8_int8 = {0x0, 0x0, 0x13, 0xc7, 0xf4, 0x7e, 0xd6,
    0xe1}}
mm3            {uint64 = 0xf857770000000000, v2_int32 = {0x0, 0xf8577700}, v4_int16 = {0x0, 0x0, 0x7700, 0xf857}, v8_int8 = {0x0, 0x0, 0x0, 0x0, 0x0, 0x77, 0x57, 0xf8}}
mm4            {uint64 = 0xa280000000000000, v2_int32 = {0x0, 0xa2800000}, v4_int16 = {0x0, 0x0, 0x0, 0xa280}, v8_int8 = {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x80, 0xa2}}
mm5            {uint64 = 0x9a15a60f71eab800, v2_int32 = {0x71eab800, 0x9a15a60f}, v4_int16 = {0xb800, 0x71ea, 0xa60f, 0x9a15}, v8_int8 = {0x0, 0xb8, 0xea, 0x71, 0xf, 0xa6,
    0x15, 0x9a}}
mm6            {uint64 = 0x8000000000000000, v2_int32 = {0x0, 0x80000000}, v4_int16 = {0x0, 0x0, 0x0, 0x8000}, v8_int8 = {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x80}}
mm7            {uint64 = 0x8000000000000000, v2_int32 = {0x0, 0x80000000}, v4_int16 = {0x0, 0x0, 0x0, 0x8000}, v8_int8 = {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x80}}
Comment 5 David Gow 2012-06-02 05:56:08 EDT
There do appear to be a number of different errors causing this. When it crashes as the cutscene starts (which seems to be something uninitialized in BinkOpen (with a funky looking stack)) and a problem with the Lua VM after the cutscene ends.

The Lua problem sometimes hangs or segfaults, and sometimes gives the "((DWORD*)m_pStack)[0] == SENTINEL_VALUE_DWORD" assertion. I have a coredump for this with the 'CASR.bik' file:

----
WARN: ENGINE: Lua garbage collection starting
FreeUnusedBlocksInBuckets released 0 Kb
DaveD: Level loaded in 2.49 seconds
Anim: anims\dragonfly\fly.jan: loaded (1 frames latency)
Anim: anims\dartnew\helmet\darthelmetup.jan: loaded (1 frames latency)
Anim: anims\campkids\idle01.jan: loaded (1 frames latency)
Anim: anims\lili\meditate.jan: loaded (1 frames latency)
Anim: anims\psichallenge\spin.jan: loaded (1 frames latency)
Anim: anims\psichallenge\psicardspin_loop.jan: loaded (1 frames latency)
PSYCHONAUTS UNIX FILENAME: corrected 'WorkResource/cutscenes/prerendered/casr.bik' to 'WorkResource/cutscenes/prerendered/CASR.bik'
PSYCHONAUTS UNIX FILENAME: corrected 'WorkResource/cutscenes/prerendered/casr.dfs' to 'WorkResource/cutscenes/prerendered/CASR.dfs'
PSYCHONAUTS UNIX FILENAME: corrected 'WorkResource/cutscenes/prerendered/casr.dfs' to 'WorkResource/cutscenes/prerendered/CASR.dfs'
PSYCHONAUTS UNIX FILENAME: corrected 'WorkResource/cutscenes/prerendered/casr.bik' to 'WorkResource/cutscenes/prerendered/CASR.bik'
PSYCHONAUTS UNIX FILENAME: corrected 'WorkResource/cutscenes/prerendered/casr.bik' to 'WorkResource/cutscenes/prerendered/CASR.bik'

Encountered Error:
  Psychonauts has encountered an error

/home/icculus/projects/psychonauts/Source/game/luatest/ScriptVM/ScriptThread.cpp, line 102
((DWORD*)m_pStack)[0] == SENTINEL_VALUE_DWORD

 Please contact technical support at http://www.doublefine.com.

zsh: trace trap (core dumped)  ./Psychonauts
----
#0  EErrorManager::ErrorMessage (this=0x86a34e0, szFile=0x85d958c "/home/icculus/projects/psychonauts/Source/game/luatest/ScriptVM/ScriptThread.cpp", nLine=102, 
    szMessage=0x85d95f8 "((DWORD*)m_pStack)[0] == SENTINEL_VALUE_DWORD", bWarning=false) at /home/icculus/projects/psychonauts/Source/CommonLibs/DFUtil/ErrorManager.cpp:455
#1  0x084b1c50 in EScriptThread::UnbindThread (this=0x13382a48) at /home/icculus/projects/psychonauts/Source/game/luatest/ScriptVM/ScriptThread.cpp:102
#2  0x084bbe9f in EScriptVM::RunScript (this=0x9364e90, pObject=0xe4f8af0) at /home/icculus/projects/psychonauts/Source/game/luatest/ScriptVM/ScriptVM.cpp:3006
#3  0x084bdaaa in EScriptVM::RunAllScripts (this=0x9364e90) at /home/icculus/projects/psychonauts/Source/game/luatest/ScriptVM/ScriptVM.cpp:3976
#4  0x082d5b56 in GameApp::InitFrame (this=0x935a4d8) at /home/icculus/projects/psychonauts/Source/game/luatest/Game/GameApp.cpp:1634
#5  0x083152d3 in PCGameApp::InitFrame (this=0x935a4d8) at /home/icculus/projects/psychonauts/Source/game/luatest/Game/PCGameApp.cpp:335
#6  0x08521afa in main (argc=1, argv=0xff9785d4) at /home/icculus/projects/psychonauts/Source/game/luatest/UnixMain.cpp:372
(gdb) up
#1  0x084b1c50 in EScriptThread::UnbindThread (this=0x13382a48) at /home/icculus/projects/psychonauts/Source/game/luatest/ScriptVM/ScriptThread.cpp:102
102	/home/icculus/projects/psychonauts/Source/game/luatest/ScriptVM/ScriptThread.cpp: No such file or directory.
(gdb) print this->m_ThreadState
$1 = EScriptTHread::kThreadPaused
(gdb) print this->m_pStack
$2 = 0x136809d8 "ures/ui/sayline heads"
(gdb) up
#2  0x084bbe9f in EScriptVM::RunScript (this=0x9364e90, pObject=0xe4f8af0) at /home/icculus/projects/psychonauts/Source/game/luatest/ScriptVM/ScriptVM.cpp:3006
3006	/home/icculus/projects/psychonauts/Source/game/luatest/ScriptVM/ScriptVM.cpp: No such file or directory.
(gdb) print pObject->m_pName
$3 = 0x10174521 "LevelScript"
----


Sometimes, the game hangs in luaH_getstr(table,TString("Pare")) after a cutscene as well. I have a coredump from 'ASCA.bik' for this case.

----
WARN: ENGINE: Lua garbage collection starting
FreeUnusedBlocksInBuckets released 0 Kb
DaveD: Level loaded in 1.20 seconds
Anim: anims\braintanks\idle.jan: loaded (1 frames latency)
Anim: anims\dartnew\dartidleshrug.jan: loaded (1 frames latency)
Anim: anims\dartnew\helmet\darthelmetup.jan: loaded (1 frames latency)
Anim: anims\objects\duster\dusterretract.jan: loaded (1 frames latency)
Anim: anims\objects\dowsingrod\drod_idle.jan: loaded (1 frames latency)
PSYCHONAUTS UNIX FILENAME: corrected 'WorkResource/cutscenes/prerendered/asca.bik' to 'WorkResource/cutscenes/prerendered/ASCA.bik'
PSYCHONAUTS UNIX FILENAME: corrected 'WorkResource/cutscenes/prerendered/asca.dfs' to 'WorkResource/cutscenes/prerendered/ASCA.dfs'
PSYCHONAUTS UNIX FILENAME: corrected 'WorkResource/cutscenes/prerendered/asca.dfs' to 'WorkResource/cutscenes/prerendered/ASCA.dfs'
PSYCHONAUTS UNIX FILENAME: corrected 'WorkResource/cutscenes/prerendered/asca.bik' to 'WorkResource/cutscenes/prerendered/ASCA.bik'
PSYCHONAUTS UNIX FILENAME: corrected 'WorkResource/cutscenes/prerendered/asca.bik' to 'WorkResource/cutscenes/prerendered/ASCA.bik'
----
#0  0x081f3f5b in luaH_getstr (t=0x1031c688, key=0xd46dee0) at /home/icculus/projects/psychonauts/Source/CommonLibs/Lua/src/ltable.c:108
#1  0x081f3fa7 in luaH_get (L=0x9f402a8, t=0x1031c688, key=0x104152d8) at /home/icculus/projects/psychonauts/Source/CommonLibs/Lua/src/ltable.c:116
#2  0x081e342c in lua_rawget (L=0x9f402a8, index=1) at /home/icculus/projects/psychonauts/Source/CommonLibs/Lua/src/lapi.c:358
#3  0x084b28d6 in Lua_Inherit_GetIndexTagMethod (pState=0x9f402a8) at /home/icculus/projects/psychonauts/Source/game/luatest/ScriptVM/ScriptVM.cpp:340
#4  0x081e6615 in callCclosure (L=0x9f402a8, cl=0xe00d270, base=0x104152c8) at /home/icculus/projects/psychonauts/Source/CommonLibs/Lua/src/ldo.c:134
#5  0x081e6774 in luaD_call (L=0x9f402a8, func=0x104152c0, nResults=1) at /home/icculus/projects/psychonauts/Source/CommonLibs/Lua/src/ldo.c:177
#6  0x081f5ea7 in luaV_gettable (dst=0x104152b8, L=0x9f402a8, t=0x104152b8) at /home/icculus/projects/psychonauts/Source/CommonLibs/Lua/src/lvm.c:144
#7  0x081f6ecd in luaV_execute (L=0x9f402a8, cl=0xd539c98, base=0x104152b0) at /home/icculus/projects/psychonauts/Source/CommonLibs/Lua/src/lvm.c:484
#8  0x081e6792 in luaD_call (L=0x9f402a8, func=0x104152a8, nResults=0) at /home/icculus/projects/psychonauts/Source/CommonLibs/Lua/src/ldo.c:178
#9  0x081e68a5 in f_call (L=0x9f402a8, ud=0x103f6828) at /home/icculus/projects/psychonauts/Source/CommonLibs/Lua/src/ldo.c:211
#10 0x081e6df7 in luaD_runprotected (L=0x9f402a8, f=0x81e687b <f_call>, ud=0x103f6828) at /home/icculus/projects/psychonauts/Source/CommonLibs/Lua/src/ldo.c:373
#11 0x081e68e5 in lua_call (L=0x9f402a8, nargs=1, nresults=0) at /home/icculus/projects/psychonauts/Source/CommonLibs/Lua/src/ldo.c:220
#12 0x084bbd16 in EScriptVM::RunScript (this=0x91a6e90, pObject=0x9701e38) at /home/icculus/projects/psychonauts/Source/game/luatest/ScriptVM/ScriptVM.cpp:2965
#13 0x084bdaaa in EScriptVM::RunAllScripts (this=0x91a6e90) at /home/icculus/projects/psychonauts/Source/game/luatest/ScriptVM/ScriptVM.cpp:3976
#14 0x082d5b56 in GameApp::InitFrame (this=0x919c4d8) at /home/icculus/projects/psychonauts/Source/game/luatest/Game/GameApp.cpp:1634
#15 0x083152d3 in PCGameApp::InitFrame (this=0x919c4d8) at /home/icculus/projects/psychonauts/Source/game/luatest/Game/PCGameApp.cpp:335
#16 0x08521afa in main (argc=1, argv=0xff824c24) at /home/icculus/projects/psychonauts/Source/game/luatest/UnixMain.cpp:372
----

Yell if you want the full 'core' file.

Hope this helps!
-- David
Comment 6 Ryan C. Gordon 2012-06-03 05:48:12 EDT
(I'm adding this comment to several bugs here...sorry if you see it multiple times.)

There were some memory corruption bugs in the initial Humble Bundle build, which we believe have been tracked down and fixed now. Most of the crashes are probably due to these.

Those getting Floating Point Exception crashes during cutscenes: that was my fault, I screwed up something hooking up the Bink audio output code. This is also fixed, I think.

Here is a test build, please try it and report back. It's a 2.1 megabyte download: just untar it and overwrite the two files in your game installation.

This build also has joystick support and working FSAA (if the game is way slower for you, you can turn off FSAA in the options menu).

There are still some bugs, but this should be MUCH more playable.

Download it here:

   http://treefort.icculus.org/psychonauts/psychonuts-linux-test-06032012.tar.bz2

We'll do a more formal build once we get some feedback.

--ryan.
Comment 7 Philipp Richter 2012-06-03 07:37:26 EDT
(In reply to comment #6)
> (I'm adding this comment to several bugs here...sorry if you see it multiple
> times.)
> 
> There were some memory corruption bugs in the initial Humble Bundle build,
> which we believe have been tracked down and fixed now. Most of the crashes are
> probably due to these.
> 
> Those getting Floating Point Exception crashes during cutscenes: that was my
> fault, I screwed up something hooking up the Bink audio output code. This is
> also fixed, I think.
> 
> Here is a test build, please try it and report back. It's a 2.1 megabyte
> download: just untar it and overwrite the two files in your game installation.
> 
> This build also has joystick support and working FSAA (if the game is way
> slower for you, you can turn off FSAA in the options menu).
> 
> There are still some bugs, but this should be MUCH more playable.
> 
> Download it here:
> 
>   
> http://treefort.icculus.org/psychonauts/psychonuts-linux-test-06032012.tar.bz2
> 
> We'll do a more formal build once we get some feedback.
> 
> --ryan.

Hello,

this patch helps a lot. FSAA is working properly now and the cutscene crashes seem to also been gone (replaying section where I'd get crashes didn't kill the application this time).
Comment 8 David Gow 2012-06-03 07:50:58 EDT
This updated version seems to fix all of the cutscene-related crashes (and the FSAA looks great!) Sound now plays consistently in the prerendered cutscenes, as well.

-- David
Comment 9 Daniel 2012-06-03 22:55:56 EDT
The new build has fixed this bug for me as well, good work.
Comment 10 dwangoAC 2012-06-04 02:16:16 EDT
(In reply to comment #6)
> There were some memory corruption bugs in the initial Humble Bundle build,
> which we believe have been tracked down and fixed now. Most of the crashes are
> probably due to these.
> 
~snip~
> We'll do a more formal build once we get some feedback.
> 
> --ryan.

Thanks, Ryan!  I've performed some testing using your patch on a Dell nVidia NVS 3100M based laptop on Ubuntu 12.04 launching from a terminal and I'm still seeing bad behavior following cutscenes.  I admit that I have never played Psychonauts before so I'm a little unsure where I am but I met a vault during basic braining and the cutscene played without audio; shortly after that, the game crashed while I was navigating through a section with a turret shooting at me with walls I could punch over.  I've pasted the relevant output from these two problems below:

---

Game: Engine Beginning cutscene VaultCollection
Game: Engine Cutscene progression: CS Script moving from state nil to state VaultCollection, resultant state VaultCollection.  Time: 170.5431060791016.
* Stack Trace
1: setState                  (line   -1, file '(none)) (field)
2: xRunCutsceneWithSettings  (line   -1, file '(none)) (field)
3: runCutsceneWithSettings   (line   -1, file '(none)) (field)
4: runCutscene               (line   -1, file '(none)) (field)
5: (null)                    (line   -1, file '(none)) ()
Game: Engine WARNING: bVaultPunchedCoachLinePlayed is not in the saved var table
Game: Engine Saved[BB]: bVaultPunchedCoachLinePlayed = 1
Anim: anims\mentalarrowhead\idle_air.jan: loaded (1 frames latency)
Anim: anims\vaults\takedamage.jan: loaded (1 frames latency)
(none(-1) Trigger_ContainsEntity ArrowheadAmmo115: invalid trigger handle
Anim: anims\mentalarrowhead\run.jan: loaded (1 frames latency)
Anim: anims\vaults\openmouth.jan: loaded (1 frames latency)
Game: Engine Saved[GLOBAL]: SeenMentalArrowheadTutorialPopup = 1
Game: Engine Saved[GLOBAL]: bVaultBBVault1 = 1
STUBBED: not implemented at SetHLSLPSConstant (/home/icculus/projects/psychonauts/Source/CommonLibs/DFGraphics/OpenGLGraphics.cpp:2334)
Game: Engine Saved[GLOBAL]: SeenVaultTutorialPopup = 1
Game: Engine Cutscene progression: CS Script moving from state VaultCollection to state CleanupCSVaultCollection, resultant state CleanupCSVaultCollection.  Time: 172.8981323242188.
* Stack Trace
1: setState                  (line   -1, file '(none)) (field)
2: (null)                    (line   -1, file '(none)) ()
Game: Engine Ending normal cutscene VaultCollection
Game: Engine RESTORE SECONDARY TARGET
Game: Engine SET SECONDARY TARGET nil
Game: Engine WARNING: bVaultCollectionPlayed is not in the saved var table
Game: Engine Saved[BB]: bVaultCollectionPlayed = 1
Game: Engine Cutscene progression: CS Script moving from state CleanupCSVaultCollection to state nil, resultant state nil.  Time: 172.9706573486328.
* Stack Trace
1: setState                  (line   -1, file '(none)) (field)
2: endCutscene               (line   -1, file '(none)) (field)
3: (null)                    (line   -1, file '(none)) ()
Game: Engine Saved[OATMEALS]: BBOatmealsFound = 2
Game: Engine Saved[OATMEALS]: BB = [table]
Anim: anims\dartnew\railslide45angle.jan: loaded (1 frames latency)
Anim: anims\dartnew\railslideflat.jan: loaded (1 frames latency)
Anim: anims\bb\cutoutend.jan: loaded (1 frames latency)
Game: Engine Saved[BB]: bTowerOfPowerDown = 1
Anim: anims\bb\olemouthclose.jan: loaded (1 frames latency)
Game: Engine Saved[BB]: playerRespawnPointName = [table]
Game: Engine SET SECONDARY TARGET Turret
Anim: anims\bb\punchywalldown.jan: loaded (1 frames latency)
Anim: anims\emotional baggage\hatboxtag_default.jan: loaded (1 frames latency)
Anim: anims\bb\nopunchywallup.jan: loaded (1 frames latency)
Anim: anims\dartnew\damagelf.jan: loaded (1 frames latency)
Game: Engine Saved[BB]: playerRespawnPointName = [table]
Anim: anims\emotional baggage\hatbox_idle2.jan: loaded (1 frames latency)
Game: Engine Saved[GLOBAL]: NeedRankIncrement = 1
Anim: anims\bunny\spin.jan: loaded (1 frames latency)
WARN: Timer repeat too short: 0.001000, timer BunnyExplosion29F 1 
Anim: anims\emotional baggage\hatbox_idle1.jan: loaded (1 frames latency)
Game: Engine Saved[GLOBAL]: NeedRankIncrement = 0
Anim: anims\co_rankup\spin.jan: loaded (1 frames latency)
WARN: Timer repeat too short: 0.001000, timer BunnyExplosion2CC 1 
Anim: anims\dartnew\doublejump.jan: loaded (1 frames latency)
WARN: Timer repeat too short: 0.001000, timer BunnyExplosion2DF 1 
Game: Engine Beginning cutscene EmoBagCollection
Game: Engine Cutscene progression: CS Script moving from state nil to state EmoBagCollection, resultant state EmoBagCollection.  Time: 224.6592254638672.
* Stack Trace
1: setState                  (line   -1, file '(none)) (field)
2: xRunCutsceneWithSettings  (line   -1, file '(none)) (field)
3: runCutsceneWithSettings   (line   -1, file '(none)) (field)
4: runCutscene               (line   -1, file '(none)) (field)
5: (null)                    (line   -1, file '(none)) ()
Anim: anims\emotional baggage\hatboxtag_happy.jan: loaded (1 frames latency)
Anim: anims\emotional baggage\hatbox_happy.jan: loaded (1 frames latency)
Game: Engine Cutscene progression: CS Script moving from state EmoBagCollection to state CleanupCSEmoBagCollection, resultant state CleanupCSEmoBagCollection.  Time: 236.3072204589844.
* Stack Trace
1: setState                  (line   -1, file '(none)) (field)
2: (null)                    (line   -1, file '(none)) ()
Game: Engine Ending normal cutscene EmoBagCollection
Game: Engine WARNING: bEmoBagCollectionPlayed is not in the saved var table
Game: Engine Saved[BB]: bEmoBagCollectionPlayed = 1
Game: Engine Cutscene progression: CS Script moving from state CleanupCSEmoBagCollection to state nil, resultant state nil.  Time: 236.4192199707031.
* Stack Trace
1: setState                  (line   -1, file '(none)) (field)
2: endCutscene               (line   -1, file '(none)) (field)
3: (null)                    (line   -1, file '(none)) ()
WARN: Timer repeat too short: 0.001000, timer BunnyExplosion2FB 1 
WARN: Timer repeat too short: 0.001000, timer BunnyExplosion314 1 
*** glibc detected *** ./Psychonauts: corrupted double-linked list: 0x10666890 ***
Killed

---

I finally had to kill -9 the game as it was completely unresponsive with minimal CPU usage.  Please let me know if there are any specific tests you'd like me to try or if you'd like any other details about my hardware.  Thanks for your work on this - I look forward to playing through this once the kinks are ironed out.

A.C.
******
Comment 11 Ryan C. Gordon 2012-06-04 05:41:57 EDT
(In reply to comment #10)
> WARN: Timer repeat too short: 0.001000, timer BunnyExplosion2FB 1 
> WARN: Timer repeat too short: 0.001000, timer BunnyExplosion314 1 
> *** glibc detected *** ./Psychonauts: corrupted double-linked list: 0x10666890
> ***
> Killed

This appears to be a separate issue, which we're tracking in Bug #5552.

--ryan.
Comment 12 bugzilla.5.kyoo 2012-06-04 19:29:14 EDT
*** Bug 5587 has been marked as a duplicate of this bug. ***
Comment 13 bugzilla.5.kyoo 2012-06-04 19:49:28 EDT
> (I'm adding this comment to several bugs here...sorry if you see it multiple
> times.)

> There were some memory corruption bugs in the initial Humble Bundle build,
> which we believe have been tracked down and fixed now. Most of the crashes are
> probably due to these.

> Those getting Floating Point Exception crashes during cutscenes: that was my
> fault, I screwed up something hooking up the Bink audio output code. This is
> also fixed, I think.

> Here is a test build, please try it and report back. It's a 2.1 megabyte
> download: just untar it and overwrite the two files in your game installation.

> This build also has joystick support and working FSAA (if the game is way
> slower for you, you can turn off FSAA in the options menu).

> There are still some bugs, but this should be MUCH more playable.

> Download it here:

> http://treefort.icculus.org/psychonauts/psychonuts-linux-test-06032012.tar.bz2

> We'll do a more formal build once we get some feedback.

> --ryan

This fixed my crash at the end of "Way to make us look bad" video after basic braining.  It also allows me to see figments in the menu.  Before, after I pressed space to see the figments, there would be multiple pages and pages with figments on them would be blank.  I hear sound during "Way to make us look bad" where I didn't before, except the first time I saw it.
Comment 14 Ryan C. Gordon 2012-06-20 11:49:08 EDT
(I'm adding this comment to many bugs that this fix might apply to...sorry if you see it multiple times or it doesn't _actually_ fix your issue.)

Here is a new test build, please try it and report back. It's a 2.1 megabyte
download, so you don't have to redownload the whole game again.

This is meant to fix crash bugs mostly. We still have rendering issues, etc to sort out. If this didn't fix your issue, please report it on this bug. If there are still other unrelated issues, please file a new bug or add yourself to the CC list of one of the other bugs. Here's the open bug list if you want to check for others with the same problem:

    https://bugzilla.icculus.org/buglist.cgi?query_format=specific&bug_status=__open__&product=Psychonauts

Steam users: you'll get this through Steam shortly.

Linux users, download this...

  http://treefort.icculus.org/psychonauts/psychonauts-linux-0.3-patch.tar.bz2

...and unpack it. Overwrite Psychonauts and libSDL-1.2.so.0 with it. This works with either of the first two builds from HumbleBundle.com.

Mac users that aren't using Steam, download this...

  http://treefort.icculus.org/psychonauts/psychonauts-mac-0.3-patch.tar.bz2

...double click it, and run the patcher program it produces.

We'll do a more formal build once we get some feedback.

--ryan.
Comment 15 Ryan C. Gordon 2012-06-20 23:25:15 EDT
*** Bug 5523 has been marked as a duplicate of this bug. ***
Comment 16 Ryan C. Gordon 2012-06-20 23:25:41 EDT
*** Bug 5550 has been marked as a duplicate of this bug. ***
Comment 17 Ryan C. Gordon 2012-06-20 23:26:35 EDT
*** Bug 5582 has been marked as a duplicate of this bug. ***
Comment 18 Ryan C. Gordon 2012-06-20 23:26:49 EDT
*** Bug 5593 has been marked as a duplicate of this bug. ***
Comment 19 Ryan C. Gordon 2012-06-20 23:27:07 EDT
*** Bug 5598 has been marked as a duplicate of this bug. ***
Comment 20 Ryan C. Gordon 2012-06-20 23:29:50 EDT
*** Bug 5609 has been marked as a duplicate of this bug. ***
Comment 21 Ryan C. Gordon 2012-06-20 23:30:23 EDT
*** Bug 5663 has been marked as a duplicate of this bug. ***
Comment 22 Ryan C. Gordon 2012-06-20 23:31:13 EDT
Resolving bug: this should be fixed by the 0.2 patch.

--ryan.