PDA

View Full Version : Crash when dice rolls are hidden



Brenn
November 3rd, 2008, 01:02
Hey all, I just started working again on a ruleset I had shelved for a while. I've modified a ton a files and don't really remember everything I've touched. The problem I'm currently having is that if the dice rolls are hidden (/die hide) FG crashes when you roll a die. It works fine if they are not hidden, however.

I've been through chatchat.lua, ChatManager.lua and ChatEntry.lua and everything looks right. For the life of me I can't figure out what is going on. What gets affected on a hidden die roll differently than if it's shown? Do I not have some essential thing created and it's calling a null reference on a hidden die roll vs. the shown one?

I'm pretty confused here.

Oberoten
November 3rd, 2008, 02:11
https://notepad-plus.sourceforge.net/uk/site.htm

Notepad ++ is a nice little editor that will help you a LOT when editing rulesets and the like... not the least important feature is that it can compare two files, like say the chatchat.lua file from your own ruleset to that of per example the d20 ruleset... showing where the differences are.

- Obe

Brenn
November 3rd, 2008, 02:30
Yeah that's what I use. There is nothing wrong in these files, that I can see. It crashes after leaving the OnDiceLanded event in chatchat.lua (unless of course I return(true); ).

I'm simply puzzled. As near as I can tell, once it goes out of the script defined OnDiceLanded, it's handled by hard code. I put prints in addMessage and deliverMessage procedures in ChatManager.lua and they never fired after a dice roll in either stock d20 (which works fine) or mine (which has the aforementioned problems).

Foen
November 3rd, 2008, 06:26
Dice handling is a fragile part of the FG engine - while I can't diagnose the problem from your posts, I do know that any script errors will generally cause a complete application crash.

Foen

Brenn
November 5th, 2008, 13:24
Dice handling is a fragile part of the FG engine - while I can't diagnose the problem from your posts, I do know that any script errors will generally cause a complete application crash.

Foen

That's the problem for me, I've touched nearly everything and I don't really remember exactly what I was doing when I shelved this for my move out to CA. The console isn't showing any script errors, or any errors for that matter. Due to the amount of code I've changed it's not practical to post it. Well, I'll visit it again this weekend and see if I can determine what is going on.

Brenn
November 9th, 2008, 23:16
I still haven't figured this one out. I'm moving on, hoping it will correct itself as I flush out the ruleset.

I'm also having psuedo random crashes, always around the time the dice are thrown, but I'm not sure if it's the scripts or possibly just instability in Vista 64.

Foen
November 10th, 2008, 06:05
I use Vista Business x64 and don't have any problems with it. If you think it is an operating system instability, you might want to check you have the latest drivers: especially for your graphics card.

Foen

Tarostar
November 10th, 2008, 11:40
I still haven't figured this one out. I'm moving on, hoping it will correct itself as I flush out the ruleset.

May I suggest that you try to narrow it down by commenting out your custom code, initially in onDiceLanded where the problem is most likely to be. Start by commenting out all your code and confirm that hidden dice rolls work. If it does then start gradually including more and more of your custom code and test each time until it crashes. This way you will know exactly which part is causing the crash and then you should be able to figure it out or come back here with further questions.

Brenn
November 11th, 2008, 00:37
I use Vista Business x64 and don't have any problems with it. If you think it is an operating system instability, you might want to check you have the latest drivers: especially for your graphics card.

Foen


I do. I have an EVGA GeForce GTX-280. I just built this box a month or two ago. I've had a couple of other non-FG related crashes, but I've identified the cause of those being me buying OCZ ram that doesn't play well with my mobo, they decreased significantly after I backed off the clock on the RAM, even though it says it's 1800 MHz ram, it's doesn't play nice there. Been stable at 1333 though. I don't think the FG crashes are related to this.

I haven't had any problems to speak of with Vista, and since it's stable for you in regards to FG I'm starting believe I've definitely got something going on in the script. Wish there was a more convenient way to debug. Oh well.

Brenn
November 11th, 2008, 00:45
May I suggest that you try to narrow it down by commenting out your custom code, initially in onDiceLanded where the problem is most likely to be. Start by commenting out all your code and confirm that hidden dice rolls work. If it does then start gradually including more and more of your custom code and test each time until it crashes. This way you will know exactly which part is causing the crash and then you should be able to figure it out or come back here with further questions.

I've done that, I went a step further and just pasted in the stock chat lua scripts from the base and it still happens.

It's not really practical to comment out all of my custom code external to the chat scripts because it's quite extensive. I was hoping to find out what happens after it leaves onDiceLanded to get a direction to go in.

I'll dig into it more tonight. I think I just figured it out. It has to do with the graphics used between hidden and revealed dice rolls. I'll post back if I nailed it.

EDIT: The irony kills me. The fact that you posted about commenting stuff out to troubleshoot and the solution being that I had commented something out a long time ago (probably in testing or troubleshooting something or another) being the actual problem is pretty funny in my book.

I had commented out:


<die name="dmdie">
<icon>dmdieicon</icon>
</die>


in gameelements.xml. Don't ask me why, I don't really know.

It's fixed now, so I'm happy.