Jump to content

bg2: assertion failed in GAMImporter.cpp


Guest Guest_Chris_*

Recommended Posts

Guest Guest_Chris_*

Just installed gemrb 0.6.2 on a Debian amd64 stable installation. It seems like it works fine until I try to move my character (i.e. the intro bit in Shadows of Amn plays, Imoen comes to talk to me, and it crashes at the end of the conversation). In Throne of Bhaal, it just crashes as soon as the in game GUI appears. Here is the last few lines of output from gemrb before it falls over:

 

[ResourceManager]: Searching for am4000n... [MUSImporter]: Loading /home/chris/storage/games/gemrb/game-data/Baldur's Gate 2/music/Mx4000.MUS...[FOUND]
[ResourceManager]: Searching for Combo2/Combo2A... Combo2/Combo2A.acm...[Music]
Playing: Combo2/Combo2A
am4000n.wav...[chitin.key]
[ResourceManager]: Searching for GUIW08.chu...[chitin.key]
[ResourceManager]: Searching for amb_e13a... amb_e13a.wav...[chitin.key]
[OPENAL]: Music in INITIAL State. AutoStarting
[ResourceManager]: Searching for am4000d4... am4000d4.wav...[chitin.key]
[ResourceManager]: Searching for amb_e02b... amb_e02b.wav...[chitin.key]
[ResourceManager]: Searching for savegame.2da...[GemRB Override]
[ResourceManager]: Searching for defsound.2da...[GemRB Override]
gemrb: /home/chris/storage/games/gemrb/src/gemrb-0.6.2/gemrb/plugins/GAMImporter/GAMImporter.cpp:1023: int GAMImporter::PutPCs(DataStream*, Game*): Assertion `stream->GetPos() == PCOffset + i * PCSize' failed.
Aborted

 

Any thoughts?

Link to comment
gemrb: /home/chris/storage/games/gemrb/src/gemrb-0.6.2/gemrb/plugins/GAMImporter/GAMImporter.cpp:1023: int GAMImporter::PutPCs(DataStream*, Game*): Assertion `stream->GetPos() == PCOffset + i * PCSize' failed.<br />

Aborted[/code]<br /><br />Any thoughts?<br />

<br /><br /><br />

 

This happens when it fails to save the game - you probably have bg2 installed on a read-only partition and you didn't set SavePath in the config? gemrb does have a more helpful error message in the git version, but I guess it's new since 0.6.2.

Link to comment
Guest Guest_Chris_*
try the git version or wait for about a week for the next release.
The git version works. It seems if I copy GAMImporter::PutPCs() from git to 0.6.2 and rebuild, 0.6.2 works as well. Which is odd, because the difference between the two versions seems very insignificant.. The assert in git (around line 1044 in GAMImporter.cpp) uses the CREOffset variable, but the 0.6.2 doesn't (but is passed the same expression that CREOffset is set to anyway) and an extra asset is added before the return line, and it seems that is it. Mind you, given this is the first time I've looked at the code, I have no idea what the assert is actually asserting..

 

This happens when it fails to save the game - you probably have bg2 installed on a read-only partition and you didn't set SavePath in the config? gemrb does have a more helpful error message in the git version, but I guess it's new since 0.6.2.
The game is installed on a compressed filesystem (squashfs if you really need to know), but I set SavePath to a normal directory with write permissions.

 

But anyway, the git version is working for me, so problem solved I guess.

Link to comment
I have no idea what the assert is actually asserting..

 

It's checking whether the correct amount of data was written to disk - I added them when I found some really nasty bugs which wrote incorrect amounts of data when saving and made corrupted savegames, and wanted to make sure that didn't happen again without it being obvious.

 

Glad to hear it works for you now!

Link to comment

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...