Author Topic: Another debugging idea  (Read 1972 times)

Offline USS Frontier

  • Posts: 176
  • Cookies: 562
Another debugging idea
« on: March 05, 2009, 07:14:02 PM »
Hey people, tho this question is more directed towards MLeo, other people may help as well so here I am lol

I was testing (several times) GC's War Sim the other day, trying to conquer the galaxy from the ground up so I could test how it behaved in a long play time (like at least over half hour; even tho you can save/load state), but as is commom with a heavy modded BC (KM1 and all...) those pesky little crashes for no reason that or make the game go directly to the desktop or show that "BC encountered a error and must be closed bla bla bla"  didn't let me test the War Sim like I wanted, and like I think many people will want to play...

So I was thinking if there was someway we could discover where these crashes are coming from so we could try to fix them... Of course a few of them might be unfixable like BC just being a bi*** because of the old engine and all, but others such as small exceptions somewhere in the python scripts are probably fixable and would increase the game's stability.

Logging each python code line that is run to check the last function calls before a crash isn't a very good option for what I know, because first dunno if that is possible to do, then there's also the problem of a big log files, etc...

But another idea I was considering lately was making another app, outside of BC, that running alongside BC could somehow "detect" which error happened causing the game to crash so that we could see it... Also dunno if this can be done or has been done, or if it would work since the errors might be coming from the python scripts and I think the error log wouldn't tell us which script caused it...


Anyway these are just ideas. I'm really mad with this instability of the game which doesn't let us make cool long games, and this could help us at least to fix a couple of these errors (i'm assuming it is more than one) and thus increase BC's stability. Until Excalibur is released :P

So, can be done?
"Revenge is a dish best served cold"
                    -Old Klingon Proverb
GravityFX Download
Galaxy Charts Download

Offline MLeo

  • Retired Staff
  • Posts: 3636
  • Cookies: 833
  • Software Simian
    • the Programming Pantheon
Re: Another debugging idea
« Reply #1 on: March 06, 2009, 10:04:08 AM »
Just got 5 minutes, but the "best" crash log I've been able to come up with is a direct logger, replacing sysout and syserr.
Some crashes don't leave a "paper trail". For example missing projectiles.

But we can trace those differently. My More Than 4 Torpedoes mod makes it impossible to crash on missing torpedoes. Not yet pulses.
I still can't read peoples minds, nor can I read peoples computers, even worse, I can't combine the two to read what is going wrong with your BC install...

"It was filed under 'B' for blackmail." - Morse, Inspector Morse - The dead of Jericho.

Offline USS Frontier

  • Posts: 176
  • Cookies: 562
Re: Another debugging idea
« Reply #2 on: March 06, 2009, 04:40:04 PM »
I think you mentioned that direct logger with me before... I think it had a problem that it rendered the in-game console useless wasn't it? Or i'm just allucinating and it works perfectly? :P

But doesn't all these sudden crashes leave no "trail". At least for the python console to get.
And the error(s) that Windows says happened to close the game and asks to send a report about it, can't we get some usefull info from them?

How exactly could we trace them differently as you mentioned?
"Revenge is a dish best served cold"
                    -Old Klingon Proverb
GravityFX Download
Galaxy Charts Download

Offline MLeo

  • Retired Staff
  • Posts: 3636
  • Cookies: 833
  • Software Simian
    • the Programming Pantheon
Re: Another debugging idea
« Reply #3 on: March 06, 2009, 05:45:01 PM »
Nah, that was yours. :P Or maybe USS Sovereigns, or someone elses entirely.

Mine isn't yet completely perfect (unfortunately) it sometimes doesn't propery log exceptions themselves.


The thing is, we don't really know, if we log enough, we ought to find out the "last moment" before things just stopped.
I've used that method to trace a crash (and then subsequent tries to fix it) in a new script, which I have sadly lost but will recreate one of these days.


On another note:
I once accidently left a stock game running for 3 hours, no problem at all.
So I think we ought to look at how ensure things release resources when they aren't needed anymore.
I still can't read peoples minds, nor can I read peoples computers, even worse, I can't combine the two to read what is going wrong with your BC install...

"It was filed under 'B' for blackmail." - Morse, Inspector Morse - The dead of Jericho.