Bridge Commander Central

BC Forums => BC Technical Support => Topic started by: Billz on April 11, 2009, 09:01:57 PM

Title: Game freeze
Post by: Billz on April 11, 2009, 09:01:57 PM
For some reason, whenever this ship (http://bridgecommander.filefront.com/file/Luna_Class;98591) takes even a single hit from my weapons, in which ever ship I am using, my game instantly freezes.

I have no idea why since I have damage effects turned off in the BC config and since because its a low poly port from Armada 2.

Also, after a while with playing with the non-NEM version of this ship (http://bridgecommander.filefront.com/file/_Aehlla_Class_Romulan_Scout_Ship;84368), I get a C++ error.  :? Explain that one because I am at a loss.

Its very confusing.
Title: Re: Game freeze
Post by: MLeo on April 12, 2009, 10:06:29 AM
For the Luna problem:
Please run in Windowed mode and see if there is a popup (debug console) when the hit occurs.

About the Aehlla problem, could you describe what it was that you were doing?
I currently can't remember any C++ error during a battle.
Title: Re: Game freeze
Post by: Billz on April 12, 2009, 02:41:44 PM
For the Luna problem:
Please run in Windowed mode and see if there is a popup (debug console) when the hit occurs.

About the Aehlla problem, could you describe what it was that you were doing?
I currently can't remember any C++ error during a battle.

U.S.S. Titan Problem

I have just tried running BC in Windowed mode.
I don't get a debug console pop up when a single hit is taken. The game still freezes.

Aehlla Problem
The C++ error only pops up half the time during warp. In Windowed, a debug console pops up. Heres a screenshot of the debug pop-up. I've always been able to warp to the Arctaurus (sp?) map set before so I have no idea why this is happening now. Sometimes, I get the C++ error when warping to Arctaurus (sp?) with any ship, other times, the game freezes just after I press 'warp' in Kiska's menu.
Summary:
Seems there isn't a problem with the Aehlla at all then. I am still stumped as to the problems with the U.S.S. Titan and the Arctaurus error though.
Title: Re: Game freeze
Post by: MLeo on April 12, 2009, 05:31:15 PM
The Arctaurus error is a simple coding mistake, please attach the file mentioned (scripts/Systems/...) I can fix it.

About the Luna, you don't happen to know the projectile (type/name) that hit you?
Title: Re: Game freeze
Post by: Billz on April 12, 2009, 07:22:31 PM
PYs attached.

And with the Luna, all standard types of weapons (torpedoes, phasers and pulse weapons) cause my game to freeze when they hit the U.S.S. Titan.
Title: Re: Game freeze
Post by: MLeo on April 12, 2009, 07:40:01 PM
BC should like this a great deal more.
Title: Re: Game freeze
Post by: MLeo on April 12, 2009, 07:40:39 PM
Does the freeze also happen if you load the luna as an ally ship and then fire on it?
Title: Re: Game freeze
Post by: Billz on April 12, 2009, 08:00:50 PM
Does the freeze also happen if you load the luna as an ally ship and then fire on it?

No, which is very strange to me.

Arcturus works now by the way. Thanks for fixing that script. I have no idea how a syntax error ended up in that script as that planetary system never had any issues before.
Title: Re: Game freeze
Post by: MLeo on April 12, 2009, 08:14:51 PM
What types of Tech script do you have installed?

There aren't any Foundation Technologies defined (when I downloaded it anyway), nor ATP or what I think is called "Future Tech", did you add that later on?
Title: Re: Game freeze
Post by: Billz on April 12, 2009, 08:24:18 PM
I didn't install ATP in this installation this time. I have FTech installed and Future Technologies Addition 2.0 installed.

During game installations, I always make sure all my script-based downloaded mods are installed first before moving onto planetary systems, ships, bridges and uniforms for my crew.

I only ever used ATP before as it had a script which allowed all planetary systems to be added to the systems list during quickbattle. Once I figured out how to do that myself in LoadNanoFX.py, before reinstalling BC after it had gotten completely wiped from my harddrive in May last year, it made ATP redundent so I deleted ATP when reinstalling all my downloaded mods.
Title: Re: Game freeze
Post by: MLeo on April 12, 2009, 08:25:48 PM
That wasn't exactly what I meant, did you add (or changed) anything to the ship itself?
Title: Re: Game freeze
Post by: Billz on April 12, 2009, 08:30:59 PM
That wasn't exactly what I meant, did you add (or changed) anything to the ship itself?

Only a customized plugin based on established knowledge of the ship, with multivectral shields set at 70 and customized warp speeds. But I do this with all my other ships, excluding ship packs, and never once experienced a problem like this before.
Title: Re: Game freeze
Post by: MLeo on April 13, 2009, 05:42:44 AM
Could you attach your new plugin?
Title: Re: Game freeze
Post by: Billz on April 13, 2009, 06:09:05 AM
Here. It was made using BCUT v1.2.
Title: Re: Game freeze
Post by: MLeo on April 13, 2009, 06:25:57 AM
Could you install the attached console logger?
Put it in scripts/Custom/Autoload.
Title: Re: Game freeze
Post by: Billz on April 13, 2009, 07:39:32 AM
Could you install the attached console logger?
Put it in scripts/Custom/Autoload.

Log attached.
Title: Re: Game freeze
Post by: MLeo on April 13, 2009, 08:12:49 AM
Is the log from after the freeze happens?

And the log should end with: "_output.log" with in front of it the current date and start time (of the log tracking).
Title: Re: Game freeze
Post by: Billz on April 13, 2009, 08:52:01 AM
Is the log from after the freeze happens?

And the log should end with: "_output.log" with in front of it the current date and start time (of the log tracking).

Yep. Its from after the game crashes. I had to save the log as a txt file becuse BCCentral doesn't allow .log format files to be uploaded. The original log file name is '20090413_124154_output'.
Title: Re: Game freeze
Post by: MLeo on April 13, 2009, 11:11:36 AM
Does it still happen when you disable the Multivectral Shielding?
I know, it shouldn't matter at all, but you can't be too sure.
Title: Re: Game freeze
Post by: Billz on April 13, 2009, 09:23:09 PM
Does it still happen when you disable the Multivectral Shielding?
I know, it shouldn't matter at all, but you can't be too sure.

I have disabled multivectral shielding in the plugin and there now appears to be no more problems with this ship.

I don't understand why this problem came up with multivectral shielding enabled on the U.S.S. Titan though.
Title: Re: Game freeze
Post by: MLeo on April 14, 2009, 03:36:25 AM
Neither do I, could you attach the following file?

scripts/ftb/Techs/Shields.py

And the contents of scripts/Custom/Techs/ (as a zip)
Title: Re: Game freeze
Post by: Billz on April 14, 2009, 03:39:45 AM
Here you go.
Title: Re: Game freeze
Post by: MLeo on April 14, 2009, 07:18:59 PM
My appologies for not responding sooner, I'm afraid to say I haven't found anything yet.

Could you put this in scripts/ftb/Techs/ and then run it again (with the logger), I've added more debug output to it, so if it's the Multivectral part, then it should show.


What did amaze me a little, are the 2 oddities in your Techs directory, PhasedTorpedoV1.py, which contains no tech, and WC_JJrprisebussardWarmUp, which is a carbon (ok, bit) copy of AdonisTMPWarmupScript. :S
Title: Re: Game freeze
Post by: Billz on April 14, 2009, 07:34:42 PM
My appologies for not responding sooner, I'm afraid to say I haven't found anything yet.

Could you put this in scripts/ftb/Techs/ and then run it again (with the logger), I've added more debug output to it, so if it's the Multivectral part, then it should show.


What did amaze me a little, are the 2 oddities in your Techs directory, PhasedTorpedoV1.py, which contains no tech, and WC_JJrprisebussardWarmUp, which is a carbon (ok, bit) copy of AdonisTMPWarmupScript. :S

I assume you want the latest log again after I re-enabled Multivectral Shields on the luna, with the edited Shields.py in the BC root folder. Its attached.

I have no clue were PhasedTorpedoV1.py came from. As for WC_JJrprisebussardWarmUp, it was from the beta of Wileys v1 of the JJ Prise. It uses mostly the same structure as AdonisTMPWarmupScript but edited to work for the bussard fans on the old beta of Wileys v1 JJ Prise. Guess I just forgot to delete it  :P.

Anyway, with Multivectral Shields enabled again on the Luna, the game is back to freezing. I briefly looked in the latest log but couldn't find anything which seemed wrong. I'll leave it for you to have a gander at the log though.
Title: Re: Game freeze
Post by: MLeo on April 15, 2009, 11:51:15 AM
Well, it now shows a clear trace (think tracer bullets) to the last know functioning part.
And in this case the call to pShields.RedistributeShields() (a stock function) is causing the freeze.

Ok, here is a modified (again) Shields.py, put it in the same directory as before.
Title: Re: Game freeze
Post by: Billz on April 15, 2009, 08:02:40 PM
Well, it now shows a clear trace (think tracer bullets) to the last know functioning part.
And in this case the call to pShields.RedistributeShields() (a stock function) is causing the freeze.

Ok, here is a modified (again) Shields.py, put it in the same directory as before.

That adjusted file did the job. Thank you for sticking with this thread.

Can you explain (in simple terms) what went wrong so that I know what to look for if it happens again?
Title: Re: Game freeze
Post by: MLeo on April 16, 2009, 12:12:15 PM
I was still debugging, I haven't done any type of fix yet.

But please leave the 2 files in (yes, it is kinda a drain, especially if you use the console) for when it happens again. (That is, Shields.py and ConsoleLogger.py)
Title: Re: Game freeze
Post by: Billz on April 17, 2009, 06:03:25 PM
I was still debugging, I haven't done any type of fix yet.

But please leave the 2 files in (yes, it is kinda a drain, especially if you use the console) for when it happens again. (That is, Shields.py and ConsoleLogger.py)

If it wasn't a fix, then what was the latest build of 'shields.py' that you attached?
Title: Re: Game freeze
Post by: MLeo on April 17, 2009, 06:25:00 PM
It just contained more/different debug information.
Title: Re: Game freeze
Post by: Mario on April 17, 2009, 07:58:51 PM
@ Mleo

You have an error in the debug line.

Code: [Select]
pShields.GetSingleShieldPercentage(App.SHieldClass.TOP_SHIELDS)

As for the issue I will share the info I have about this particular issue and how you can reproduce it.

Ship with the following shield config causes the freeze

Code: [Select]
ShieldGenerator.SetMaxShields(ShieldGenerator.FRONT_SHIELDS, 12000.000000)
ShieldGenerator.SetMaxShields(ShieldGenerator.REAR_SHIELDS, 10000.000000)
ShieldGenerator.SetMaxShields(ShieldGenerator.TOP_SHIELDS, 10000.000000)
ShieldGenerator.SetMaxShields(ShieldGenerator.BOTTOM_SHIELDS, 10000.000000)
ShieldGenerator.SetMaxShields(ShieldGenerator.LEFT_SHIELDS, 10000.000000)
ShieldGenerator.SetMaxShields(ShieldGenerator.RIGHT_SHIELDS, 10000.000000)

"Fix" would result in the hp config change to

Code: [Select]
ShieldGenerator.SetMaxShields(ShieldGenerator.FRONT_SHIELDS, 10000.000000)
ShieldGenerator.SetMaxShields(ShieldGenerator.REAR_SHIELDS, 10000.000000)
ShieldGenerator.SetMaxShields(ShieldGenerator.TOP_SHIELDS, 10000.000000)
ShieldGenerator.SetMaxShields(ShieldGenerator.BOTTOM_SHIELDS, 10000.000000)
ShieldGenerator.SetMaxShields(ShieldGenerator.LEFT_SHIELDS, 10000.000000)
ShieldGenerator.SetMaxShields(ShieldGenerator.RIGHT_SHIELDS, 10000.000000)

Hope this helps ;)
Title: Re: Game freeze
Post by: MLeo on April 18, 2009, 08:27:20 AM
lol! And it still worked!
Or rather, it didn't and RedistributeShields wasn't called.

So any ship with different shield vector values will trigger this?
Title: Re: Game freeze
Post by: Mario on April 18, 2009, 10:47:40 AM
lol! And it still worked!
Or rather, it didn't and RedistributeShields wasn't called.

So any ship with different shield vector values will trigger this?

I believe so, I didn't go into great lengths investigating this. Sorry.
Title: Re: Game freeze
Post by: MLeo on April 18, 2009, 11:08:17 AM
That's a job for DiamondBC! :P

I wonder if setting the condition of all shields to some reference point (proportional) before actually calling RedistributeShields and afterwards restoring it again would do the trick.
Title: Re: Game freeze
Post by: Mario on April 19, 2009, 05:19:28 AM
That should work :)
Title: Re: Game freeze
Post by: MLeo on April 19, 2009, 08:37:44 AM
I'll see if I can whip something up and attach it here (together with the original shields.py).
Title: Re: Game freeze
Post by: MLeo on April 20, 2009, 05:42:31 AM
Took a bit longer (to get started, still was only a 15 minute script).

Here is the DiamondBC_RedistributeShields (goes to Autoload) and the original Shields
Could you see if this solves your problem with a working Multivectral Shielding (assuming you haven't yet fixed the shield properties)?
Title: Re: Game freeze
Post by: Billz on April 20, 2009, 05:52:28 AM
Took a bit longer (to get started, still was only a 15 minute script).

Here is the DiamondBC_RedistributeShields (goes to Autoload) and the original Shields
Could you see if this solves your problem with a working Multivectral Shielding (assuming you haven't yet fixed the shield properties)?

I'll try it. How will I know for sure that its taken effect though?
Title: Re: Game freeze
Post by: JimmyB76 on April 20, 2009, 08:40:05 AM
lol Billz - you must hold the record for any one person having the most threads/problems posted in Tech Support :P
what on earth do you do to your install to have problem after problem? :P
Title: Re: Game freeze
Post by: Billz on April 20, 2009, 09:56:18 AM
lol Billz - you must hold the record for any one person having the most threads/problems posted in Tech Support :P
what on earth do you do to your install to have problem after problem? :P

Its good practice for me. By not starting off with a KM1 based install, I am left to learn about problems not fixed. This way, they can be fixed and I learn a little bit more.
Title: Re: Game freeze
Post by: JimmyB76 on April 20, 2009, 11:09:22 AM
it's a painstaking and torturous way to learn, tho fortunately MLeo comes to the rescue each time...  :)
before KM i had some issues here and there and learned quite a bit by digging through scripts and repairing things with comparing backups and with the guidance of others...
hopefully you're gaining alot of insight rather than breaking things and having someone clean it up for ya; poor MLeo has a million things on his plate also   lol j/k :P

(edit - im just busting your chops...  i know how annoying a broken install can be and the lack of knowledge to be able to fix mistakes made...  but you really should go the KM route to save alot of grief and headaches  :P)
anyway, didnt mean to drag the thread offtopic...  it can veer back ontopic)
Title: Re: Game freeze
Post by: MLeo on April 20, 2009, 12:22:16 PM
Well, if you haven't changed the hardpoint of the Luna, and you put the original Shields.py back and installed the DiamondBC_RedistributeShields.py in scripts/Custom/Autoload/ then the Luna can now be hit without freezing the game (which was your problem, right?).
Title: Re: Game freeze
Post by: Billz on April 20, 2009, 08:59:52 PM
Fixed.

No more game freezing.

Teach me your ways, great one!
Title: Re: Game freeze
Post by: MLeo on April 21, 2009, 08:37:07 AM
I think you will find errors in your console. :(

I've just tested it locally, new version in a minute.
Title: Re: Game freeze
Post by: MLeo on April 21, 2009, 05:08:33 PM
Not entirely done yet, some strange BC-ism I haven't quite figured out.
But atleast it doesn't crash or free on not uniform max values.
Title: Re: Game freeze
Post by: MLeo on April 22, 2009, 06:48:05 AM
And here is one that does (seem to) work.

For some reason, the use of GetSingleShieldPercentage was not reporting the right figures directly after a RedistributeShields, but through my method of setting the maximum shields to 1 and setting the current shields to the percentage, and then restoring the right max value after the redistribution it is now properly working (the new percentage is the same value as the current shield value).

I'm considering also redoing GetSingleShieldPercentage, but I don't (yet) know if it's that usefull. I mean, I doubt a lot of people would want to do the exact same thing I was doing. :P
Title: Re: Game freeze
Post by: Billz on April 22, 2009, 08:05:38 AM
Thank you Mleo. It now seems to be working with no problems whatsoever.
Title: Re: Game freeze
Post by: MLeo on April 22, 2009, 11:26:17 AM
Final version, will be releasing this tonight (mostlikely) once I've had the time to write a proper readme for it.
The only difference is style of the code and I'm now doing less work in the two loops.
Title: Re: Game freeze
Post by: Billz on April 22, 2009, 05:17:54 PM
Let me see if I've got this correct.

You've been using a tech help thread, to help someone, but to beta test an aspect of DiamondBC at the same time?


You sneaky fiend...






...wish I had thought of that, lol.
Title: Re: Game freeze
Post by: MLeo on April 22, 2009, 05:41:22 PM
Oi, I've been away from my computer a lot this week. I actually wrote the few versions in 5 minute breaks...
Title: Re: Game freeze
Post by: Billz on April 22, 2009, 07:18:08 PM
Oi, I've been away from my computer a lot this week. I actually wrote the few versions in 5 minute breaks...

I meant it as a compliment.

 :?

Anyway, it appears to be fully working now.

I just took the Luna up against a dominion bugship. It pounded on my forward shields. As soon as my forward shields turned yellow on the HUD, power was automatically re-routed to compensate, turning the forward shield green again.
Title: Re: Game freeze
Post by: MLeo on April 23, 2009, 08:54:28 AM
Oi, I've been away from my computer a lot this week. I actually wrote the few versions in 5 minute breaks...

I meant it as a compliment.

 :?
It isn't to me, publishing untested (even uncompiled!) code is really bad practise.
Title: Re: Game freeze
Post by: Billz on April 23, 2009, 09:20:31 AM
The point is, I am greatful that you solved the original problem. Thank you for investing your time.