Death of Capitol Ship Leads to R6025 Runtime Error

In this forum you will find and post information regarding the modding of Star Wars Battlefront 2. DO NOT POST MOD IDEAS/REQUESTS.

Moderator: Moderators

Post Reply
xwingguy

Death of Capitol Ship Leads to R6025 Runtime Error

Post by xwingguy »

Whenever I destroy a capitol ship it requires me to delete a huge load of objects. Somehow that deletion leads to this. Below is a definition of the error but what my real problem is that I have no clue what function I'm calling.


CAUSE
This error occurs when your application indirectly calls a pure virtual member function in a context where a call to the function is not valid. In most cases, the compiler detects this and reports the error when building the application. But depending on how your code is written, sometimes the problem is detected only at run-time.

The error occurs when you indirectly call a pure virtual function within the context of a call to the constructor or destructor of an abstract base class. This is illustrated in the sample code below, along with some more description.
Back to the top

RESOLUTION
Calling a pure virtual function is a programming error, so you need to find the call to the pure virtual function and rewrite the code so it is not called.

One way to find a call to a pure virtual function is to replace the pure virtual function with an implementation that calls the Windows API function DebugBreak. When using the debugger, DebugBreak will cause a hard-coded breakpoint. When the code stops running at this breakpoint, you can view the callstack to see where the function was called.

Another way to find a call to a pure virtual function is to set a breakpoint on the _purecall function that is found in PureVirt.c. Breaking on this function has the advantage of keeping the stack intact so that you can trace what is occurring.
User avatar
Teancum
Jedi Admin
Jedi Admin
Posts: 11080
Joined: Wed Sep 07, 2005 11:42 pm
Projects :: No Mod project currently.
Games I'm Playing :: Destiny
xbox live or psn: No gamertag set
Location: Indiana

RE: Death of Capitol Ship Leads to R6025 Runtime Error

Post by Teancum »

Again (not to be rude) it's more than likely that you've pushed the game beyond its limits.
xwingguy

RE: Death of Capitol Ship Leads to R6025 Runtime Error

Post by xwingguy »

I don't care if I have to delete it one section at a time. I'll make it work.
User avatar
[RDH]Zerted
Gametoast Staff
Gametoast Staff
Posts: 2982
Joined: Sun Feb 26, 2006 7:36 am
Projects :: Bos Wars AI - a RTS game
Games I'm Playing :: SWBF2 and Bos Wars
xbox live or psn: No gamertag set
Location: USA
Contact:

Re: RE: Death of Capitol Ship Leads to R6025 Runtime Error

Post by [RDH]Zerted »

xwingguy wrote:I don't care if I have to delete it one section at a time.
That is what your are going to have to do. I would do it in larger sections, then narrow those sections down as you get closer to the bad object.
xwingguy

RE: Re: RE: Death of Capitol Ship Leads to R6025 Runtime Err

Post by xwingguy »

I figured out what is was doing. Apparently I was calling a linked shields function referencing back to objects that no longer existed.
busterkinkade

RE: Re: RE: Death of Capitol Ship Leads to R6025 Runtime Err

Post by busterkinkade »

Is it precisely how many objects you have to delete or is it the size of all the objects you are deleting, also, if the objects are being 'deleted' and so you just see a huge explosion and the objects are 'deleted' and disappear instantly, can't you just make a script, so that it changes the models to have no collision and turn invisible (well I know that objects can be scripted in the req file to move, but I'm not sure if you can change their .odf file if that has to be done)
xwingguy

RE: Re: RE: Death of Capitol Ship Leads to R6025 Runtime Err

Post by xwingguy »

It's already been fixed.

The way I that I make chunk geometry work in this case is by killing invisible objects that have the chunk geometry set in them.
busterkinkade

RE: Re: RE: Death of Capitol Ship Leads to R6025 Runtime Err

Post by busterkinkade »

Ah just one more question, how did you call a sheild function to multiple objects?
xwingguy

RE: Re: RE: Death of Capitol Ship Leads to R6025 Runtime Err

Post by xwingguy »

the same way it does it in the template.
User avatar
Teancum
Jedi Admin
Jedi Admin
Posts: 11080
Joined: Wed Sep 07, 2005 11:42 pm
Projects :: No Mod project currently.
Games I'm Playing :: Destiny
xbox live or psn: No gamertag set
Location: Indiana

RE: Re: RE: Death of Capitol Ship Leads to R6025 Runtime Err

Post by Teancum »

I'm constantly blown away at how hard you can push the engine. :D
busterkinkade

RE: Re: RE: Death of Capitol Ship Leads to R6025 Runtime Err

Post by busterkinkade »

Ah, a linked shield function in the space template, gotcha, but would linked shields work for lets say, a land map? Oh and one more thing, would it be possible so that when you look at, lets say the hanger force-field on polis massa (or whatever) that at the top of the screen it doesn't come up saying 'hanger forcefield' like, some sort of a ShowThumbnail 0 command in the objects/prop/bldg odf.
xwingguy

RE: Re: RE: Death of Capitol Ship Leads to R6025 Runtime Err

Post by xwingguy »

All you need to do to get linked shields in you map is to put this line at the top of your script:

ScriptCB_DoFile("LinkedShields")

To get rid of the healthbar and the name attached to the polis Massa shields you must convert the ClassLabel of the following objects to "prop"

pol1_prop_hangar_shield
pol1_prop_health_shield
pol1_prop_cavern_shield
busterkinkade

Just one nooby question.

Post by busterkinkade »

Just one nooby question, that shield command, do you put all the objects that you want to have their shields linked together under that script command line?
xwingguy

RE: Just one nooby question.

Post by xwingguy »

Read the Space LUA guide
busterkinkade

RE: Just one nooby question.

Post by busterkinkade »

Sorry
Post Reply