Page 1 of 1

Death of Capitol Ship Leads to R6025 Runtime Error

Posted: Sat Jul 01, 2006 10:22 am
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.

RE: Death of Capitol Ship Leads to R6025 Runtime Error

Posted: Sat Jul 01, 2006 11:25 am
by Teancum
Again (not to be rude) it's more than likely that you've pushed the game beyond its limits.

RE: Death of Capitol Ship Leads to R6025 Runtime Error

Posted: Sat Jul 01, 2006 12:23 pm
by xwingguy
I don't care if I have to delete it one section at a time. I'll make it work.

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

Posted: Sat Jul 01, 2006 12:51 pm
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.

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

Posted: Sat Jul 01, 2006 4:22 pm
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.

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

Posted: Sat Jul 01, 2006 4:27 pm
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)

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

Posted: Sat Jul 01, 2006 4:48 pm
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.

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

Posted: Sat Jul 01, 2006 4:55 pm
by busterkinkade
Ah just one more question, how did you call a sheild function to multiple objects?

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

Posted: Sat Jul 01, 2006 5:10 pm
by xwingguy
the same way it does it in the template.

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

Posted: Sat Jul 01, 2006 7:14 pm
by Teancum
I'm constantly blown away at how hard you can push the engine. :D

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

Posted: Sun Jul 02, 2006 4:39 am
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.

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

Posted: Sun Jul 02, 2006 10:03 am
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

Just one nooby question.

Posted: Sun Jul 02, 2006 11:19 am
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?

RE: Just one nooby question.

Posted: Sun Jul 02, 2006 11:29 am
by xwingguy
Read the Space LUA guide

RE: Just one nooby question.

Posted: Sun Jul 02, 2006 11:35 am
by busterkinkade
Sorry