PDA

View Full Version : Program crash



Hamish
February 16th, 2011, 08:43
I have a problem that is not 100% reproducible, but occurs about 50% of the time when testing my extension. Just thought I should report it.

When I run one instance of FG as the host, load a test campaign (vanilla 3.5E, even without my extension), fire up a second instance of FG, connect to localhost and select a character from the list, the host instance freezes and I get the message "FantasyGrounds.exe has stopped working."
Once this happens I can restart the program, but it will happen again every time. Only solution is to reboot and try again, it may work then.

System stats:
AMD Athlon64 X2 4800+
8GB RAM
Windows 7 Ultimate (x64)

Oberoten
February 16th, 2011, 09:10
What does your console.log (it is in the application data folder, linked from the start menu for Fantasy Grounds II) say?

- Obe

Hamish
February 16th, 2011, 14:24
I don't seem to have a console.log. It's not in the folder you mentioned, even with hidden files showing, and a search on my entire C: drive does not find any file with that name.

Moon Wizard
February 16th, 2011, 21:31
If there is no console.log file, then FG did not capture any errors that it could log.

When I am developing ruleset code, a hang immediately followed by a crash is usually indicative of an endless loop. (which causes an out of memory crash)

Unfortunately, there is no great way to debug LUA, so the best way to debug is to remove/add sections of code to isolate the section causing the issue.

Due to the complexities of FG, there is a chance that the ruleset code could be highlighting an FG issue that we haven't found before; but I typically have found that it is an endless loop.

Let me know what you find using the isolation method.

Regards,
JPG

Hamish
February 17th, 2011, 13:20
Thanks for the suggestion, but like I said it's a plain 3.5E campaign. It happens even when I do not load any extensions at all. I will check memory usage next time it happens, don't have an opportunity to test right now.

Moon Wizard
February 18th, 2011, 03:27
I didn't do any development on the current 3.5E ruleset release, so not sure where to look for any problems.

Are you seeing the crash in a new campaign or existing campaign?

Also, if an extension adds any data to the database (likely), the problems can sometimes persist even if the extension is disabled thereafter. A new campaign where the extension has never been loaded is a good test.

Regards,
JPG

Hamish
February 19th, 2011, 10:23
Creating a new test campaign seems to have solved it. Thanks!
I am a bit confused by why it would work sometimes though... if there is a problem in the DB it should be there all the time, shouldn't it?

Moon Wizard
February 19th, 2011, 22:27
It depends.

If an interaction between an extension and the ruleset caused a database change which caused the ruleset to go into an endless loop on some set of conditions, then you would only see the issue when the specific interaction occurred. The interaction could have occurred during one of the extension development iterations, and subsequently changed so that it doesn't affect new campaigns.

My guess is that there is a certain database state that causes the ruleset to enter an endless loop. By default, the ruleset doesn't create that state, but perhaps it happened during development and testing of the extension.

Just guesswork at this point, unless we can recreate and narrow it down.

Thanks,
JPG