Jump to content

Feature request


TDouglas

Recommended Posts

Want to start by saying thanks for all the hard work :) GemRB is awesome :)

 

I'm wondering, however, if it would be possible to put in a method to log problems in dialog mode? Dialog seems to be GemRB's biggest problem (at least with BG1 / BG2), but there's currently no way to troubleshoot it.

 

My request is spurred by stuttering (and often seg faults) that are mainly dialog related (especially with player1.dlg in TOB). These make the game unplayable, and are currently impossible to troubleshoot. I'm pretty sure these issues are coming from mods, but again I can't be certain ... except to say the issues only show up in GemRB (wine flies right through them).

 

Any help with this will be greatly appreciated :)

Link to comment

I dont understand your exact request at all, but why are the current logging faculties insufficient?

 

You may need to be more specific with what problems you are having, because I have never notices a game breaking problem with dialog in BG1 or BG2. Ive also never experienced stuttering and crashes are few and far between. Sounds like you are playing on Android to me (and an ancient version at that).

Link to comment

Nah, no android here ... just a cheap laptop (and a git download) :)

 

And the dialog problems are persistant across various (modded) installs. The best I get is a message ... something like "errors occuring in dialog mode can not be logged" or something like that.

 

As stated, I'm pretty sure these issues are caused by mods ... but I don't have any way to see which block is causing the upset. I know for a fact that bg1npc mod causes stuttering ... just not why. I think other mods are causing issues with player1.dlg (causing seg faults), but again not sure exactly where the problem is. Wine runs the game just fine, so it's an issue with GemRB. Thus, the request for some way to log errors in dialog mode :)

Link to comment

Ignore that warning, but we're definitely interested in any crashes you manage to induce. I suggest you run gemrb through gdb, so when a crash happens, you can give us useful info on where it went awry. If you need help with that, let me know. Much easier than trying to reproduce your install locally.

Link to comment

Ran through a savegame just before one of the glitches, but the system hard locked (had to log in to a separate terminal and kill manually). The error message I got is as follows:

 

 

[ResourceManager]: Found 'player1.dlg' in 'chitin.key'.

[ResourceManager]: Found 'spell.ids' in 'chitin.key'.

[ResourceManager]: Found 'gtimes.ids' in 'chitin.key'.

[ResourceManager]: Found 'boolean.ids' in 'chitin.key'.

[DialogHandler/WARNING]: Errors occuring while in dialog mode cannot be logged in the MessageWindow.

 

Program received signal SIGSEGV, Segmentation fault.

GemRB::Actor::ResolveStringConstant (this=0xb08b50, Sound=0x7fffffffd8f0 "bgfeml30", index=4294967295)

at /home/doug/.wine/drive_c/Program Files (x86)/Black Isle/BGII - SoA/gemrb/gemrb/core/Scriptable/Actor.cpp:7799

7799 if (csound[index]) {

(gdb) Killed

 

 

This error occurs in TOB when clicking on the fountain to head to the tree of life ... the game calls player1.dlg and crashes.

 

It's still more information than I usually get, but this seems to imply the issue may be sound related instead? I don't have much time to test it right now ... will try to run again later today and try some experiments. If you think of anything in particular you'd like me to try let me know :)

Link to comment

Found something a bit earlier in the log, but am not sure if it means anything.

 

After you've clicked on the harp and the horn, you click on the fountain. It moves the party to AR2805 then starts player1.dlg.

 

In this case, it moves the party to the new area and this is printed:

 

 

[GameScript]: MoveBetweenAreas: Viconia to ar2805 [261.502] face: 1

[ResourceManager]: Found 'defsound.2da' in 'GemRB Unhardcoded data'.

[MUSImporter]: Loading ./music/blank.mus...

[ResourceManager]: Searching for 'TAV1/TAV1A'...

[ResourceManager]: Found 'TAV1/TAV1A.acm' in 'Music'.

[unknown]: Playing: TAV1/TAV1A

[GameScript/ERROR]: Actionoverride failed for object:

[GameScript/DEBUG]: IDS Targeting: 0 0 0 0 0 0 0 0 0 0

Filters: 25 0 0 0 0

 

[GameScript/ERROR]: Actionoverride failed for object:

[GameScript/DEBUG]: IDS Targeting: 0 0 0 0 0 0 0 0 0 0

Filters: 26 0 0 0 0

 

In this case, Viconia is the last party member to be moved, so am not sure what the scripts are that fail. There's some (non-error) output, then the previous post information and seg fault.

 

I'll check the bcs for the area later to see if anything unusual is supposed to happen before player1.dlg is called.

 

Keep in mind, this is only for this one instance ... I get a seg fault each time the game attempts to load player1.dlg (starting at spellhold), thus my initial suspicion the culprit is with dialog mode.

Link to comment

FYI that waring is:

 

 

Errors occuring while in dialog mode cannot be logged in the MessageWindow.

 

And it means that errors wont be logged to the in game window that is used for dialog. this only applies when you have enabled logging to that window with the console and doesnt affect logging to the other locations.

 

that crash report looks helpful, and easily fixed. does look like potentially mod induced tho. You should post the output for the other crashes you encounter too (the spellhold one; tho it is probably the same issue). The problem so far appears to be an invalid soundset; we should add some boundary checking for sure, but maybe something else going awry too.

Link to comment

Yeah, looks like the same output. From Spellhold, when walk on the trigger on the stairs to set off player1.dlg:

 

 

[GameControl]: Position: ar1512 [1490.1513]

[GameScript]: Displaying string on: none

[ResourceManager]: Searching for 'bgfeml3i'...

[ResourceManager]: Found 'bgfeml3i.wav' in 'Sounds'.

[ResourceManager]: Found 'chmb2g11.bam' in 'chitin.key'.

[ResourceManager]: Found 'player1.dlg' in 'chitin.key'.

[ResourceManager]: Found 'spell.ids' in 'chitin.key'.

[ResourceManager]: Found 'gtimes.ids' in 'chitin.key'.

[ResourceManager]: Found 'boolean.ids' in 'chitin.key'.

[DialogHandler/WARNING]: Errors occuring while in dialog mode cannot be logged in the MessageWindow.

 

Program received signal SIGSEGV, Segmentation fault.

GemRB::Actor::ResolveStringConstant (this=0xb10250, Sound=0x7fffffffd8f0 "bgfeml30", index=4294967295)

at /home/doug/.wine/drive_c/Program Files (x86)/Black Isle/BGII - SoA/gemrb/gemrb/core/Scriptable/Actor.cpp:7799

7799 if (csound[index]) {

(gdb) Killed

 

 

I get this every time the game tries to run player1.dlg, so can post other instances if needed.

Link to comment

The ids warnings are just saying you have 4 person party. Is that correct? Anyway, it's not related.

 

oh, when you're dropped back into gdb on crash, type backtrace (or just bt) to get a call stack. I see some of the uses of this functions don't check the passed params, but more info is always helpful.

Link to comment

Sadly, when it hits player1.dlg it hard freezes the screen ... I have to log into a different virtual console and kill the process, which keeps me from getting back into gdb :( If you have any suggestions as to how to stop the freeze I'd be happy to run the trace tho :)

 

Oh, and yes I had a four party line up, tho the ids warnings only showed up after everyone had moved.

Link to comment

you don't have to kill it. Sure, the window becomes useless, but that's because gdb stoped its execution — right before it would have crashed. Don't use fullscreen mode if that's the problem (or are you talking about bin/screen?).

Link to comment

Sorry, it diddn't even occur to me to exit fullscreen prior to the trigger (I'm an idiot lol).

 

The backtrace is as follows:

 

 

Program received signal SIGSEGV, Segmentation fault.

GemRB::Actor::ResolveStringConstant (this=0xb101e0, Sound=0x7fffffffd8f0 "bgfeml30", index=4294967295)

at /home/doug/.wine/drive_c/Program Files (x86)/Black Isle/BGII - SoA/gemrb/gemrb/core/Scriptable/Actor.cpp:7799

7799 if (csound[index]) {

(gdb) bt

#0 GemRB::Actor::ResolveStringConstant (this=0xb101e0, Sound=0x7fffffffd8f0 "bgfeml30", index=4294967295)

at /home/doug/.wine/drive_c/Program Files (x86)/Black Isle/BGII - SoA/gemrb/gemrb/core/Scriptable/Actor.cpp:7799

#1 0x00007ffff7b6467b in GemRB::Actor::VerbalConstant (this=0xb101e0, start=0, count=0)

at /home/doug/.wine/drive_c/Program Files (x86)/Black Isle/BGII - SoA/gemrb/gemrb/core/Scriptable/Actor.cpp:3481

#2 0x00007ffff7acafd0 in GemRB::DialogHandler::InitDialog (this=0x964d00, spk=<optimized out>, tgt=0xb101e0, dlgref=<optimized out>)

at /home/doug/.wine/drive_c/Program Files (x86)/Black Isle/BGII - SoA/gemrb/gemrb/core/DialogHandler.cpp:132

#3 0x00007ffff7b36cb8 in GemRB::BeginDialog (Sender=0xb101e0, parameters=<optimized out>, Flags=24)

at /home/doug/.wine/drive_c/Program Files (x86)/Black Isle/BGII - SoA/gemrb/gemrb/core/GameScript/GSUtils.cpp:1151

#4 0x00007ffff7b3ad97 in GemRB::GameScript::ExecuteAction (Sender=0xb101e0, aC=0x23bb240)

at /home/doug/.wine/drive_c/Program Files (x86)/Black Isle/BGII - SoA/gemrb/gemrb/core/GameScript/GameScript.cpp:2373

#5 0x00007ffff7b805f3 in GemRB::Scriptable::ProcessActions (this=this@entry=0xb101e0)

at /home/doug/.wine/drive_c/Program Files (x86)/Black Isle/BGII - SoA/gemrb/gemrb/core/Scriptable/Scriptable.cpp:551

#6 0x00007ffff7b8072a in GemRB::Scriptable::Update (this=0xb101e0)

at /home/doug/.wine/drive_c/Program Files (x86)/Black Isle/BGII - SoA/gemrb/gemrb/core/Scriptable/Scriptable.cpp:324

#7 0x00007ffff7b00728 in GemRB::Map::UpdateScripts (this=0x9509b0)

at /home/doug/.wine/drive_c/Program Files (x86)/Black Isle/BGII - SoA/gemrb/gemrb/core/Map.cpp:747

#8 0x00007ffff7ad656d in GemRB::Game::UpdateScripts (this=0x9c3ff0)

at /home/doug/.wine/drive_c/Program Files (x86)/Black Isle/BGII - SoA/gemrb/gemrb/core/Game.cpp:1430

#9 0x00007ffff7aecc85 in GemRB::Interface::Main (this=0x603070)

at /home/doug/.wine/drive_c/Program Files (x86)/Black Isle/BGII - SoA/gemrb/gemrb/core/Interface.cpp:1153

#10 0x0000000000400e93 in main (argc=1, argv=0x7fffffffdcf8)

at /home/doug/.wine/drive_c/Program Files (x86)/Black Isle/BGII - SoA/gemrb/gemrb/GemRB.cpp:100

 

 

Hope this helps :)

 

I'm still a bit confused by all this myself ... gdb says it's an issue with sound, yet the issue occurs each time (and only when) player1.dlg is called (the sounds appear to be working just fine otherwise, or at least not crashing the game).

 

Looking at this version of player1.dlg, it's been altered mainly by a mod called the longer road. I'm wondering if that's the problem (or a problem between that mod and some other I've installed)? I'm not saying there isn't some issue with sound, but the fact the problem is reproducible simply by calling the dialog script seems suspicious.

Link to comment

you are overlooking the fact that dialogs produce sounds ;) Anyway, the problem is that index is some huge number well beyond what it ought to be: 4294967295 which is -1 when represented with 32 bits, so an underflow is occurring. start+count-1 <- this code results in -1 since (as you can see from the trace) start and count are both 0.

Link to comment

I thought about that, but player1.dlg doesn't call sound ... it just prints a message for player1's internal dialog (at least in this instance, as I'm running without anyone else in the party for this game). I switched the soundset for the player just for testing purposes, but no change.

 

Weird :(

Link to comment

Got it :)

 

I'm thinking seriously about wiping this game and doing a fresh install ... this time without TobEx (it seems to be making things more confusing debug wise). I'll hold off until I get a green light from you folks tho (in case you need more info from this particular game).

 

Would be interested to know if there's any mods in particular you'd like playtested? Or any odd install order you'd like to test? And, if there are any mods you recommend against installing?

Link to comment

Archived

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

×
×
  • Create New...