View unanswered posts | View active topics It is currently Wed Dec 25, 2024 5:08 pm



Reply to topic  [ 11 posts ] 
 RTTI Data? 
Author Message
User avatar

Joined: Sun May 31, 2009 1:04 am
Posts: 308
Reply with quote
Post RTTI Data?
I got a strange error that I've never seen before while testing out a script that I wrote to control a sprite's animation. The sprite's animation froze, and when I checked the console it was spamming this:

My CC Console wrote:
Error: Access violation - no RTTI data!


Does anyone know what this means?


Wed Jul 29, 2009 1:47 am
Profile
REAL AMERICAN HERO
User avatar

Joined: Sat Jan 27, 2007 10:25 pm
Posts: 5655
Reply with quote
Post Re: RTTI Data?
retro terrain something something

hmm

How many frames does it have and how are you doing your animation? I've got various animation methods in Xextredge and I've never even begun to encounter an issue like that.


Wed Jul 29, 2009 2:01 am
Profile
User avatar

Joined: Sun May 31, 2009 1:04 am
Posts: 308
Reply with quote
Post Re: RTTI Data?
Agh...the error started popping up again. It's completely random o_O.

Sometimes, my game crashes because of it. Just now, I have a crash error that reads:

Microsoft Visual C++
Runtime Error!
Program:C:\Cortex Command\Cortex Command.exe
R6025
- pure vital function call


Seriously...wtf is the point of giving an error report if it tells you absolutely nothing about what is causing the error?! -_-


Wed Jul 29, 2009 5:41 am
Profile
User avatar

Joined: Sun May 31, 2009 1:04 am
Posts: 308
Reply with quote
Post Re: RTTI Data?
Well, boys and girls, it seems I have come across this error yet again, in a completely different situtation. Funny thing about it, it only seems to happen to me when I'm working on contest entry projects :lol:


Thu Jul 22, 2010 3:04 am
Profile
User avatar

Joined: Tue Nov 06, 2007 6:58 am
Posts: 2054
Reply with quote
Post Re: RTTI Data?
Yea, I've hit this once when doing some freaky stuff with frames.


Thu Jul 22, 2010 3:28 am
Profile
User avatar

Joined: Sun May 31, 2009 1:04 am
Posts: 308
Reply with quote
Post Re: RTTI Data?
The last time this happened to me was when I was making my House Plant for a modding contest. Sometimes, when animating the tongue frame by frame, the tongue would freeze up and stop working. Then my console would spam the error.

This time, the error didn't start showing up until I started messing with vectors by rotating them with RadRotate().

What really is grinding my gears is the fact that the error only comes up randomly. Usually everything works fine. But sometimes the error occurs. It's really frustrating :x


Thu Jul 22, 2010 4:09 am
Profile
User avatar

Joined: Sun Jul 13, 2008 9:57 am
Posts: 4886
Location: some compy
Reply with quote
Post Re: RTTI Data?
make a script that checks when the error starts happening and logs everything going on from there (just check the last line of consoleman:savealltext). particles being created, particles being destroyed, whatever. You might even just want to always log everything but note where the error starts happening, for context (whatever's happening is likely to happen before the error I suppose).


Thu Jul 22, 2010 4:38 am
Profile WWW
User avatar

Joined: Sun May 31, 2009 1:04 am
Posts: 308
Reply with quote
Post Re: RTTI Data?
Using print() outputs, I've narrowed down the source of the error to the Vector:RadRotate() function. Strange.


Tue Jul 27, 2010 8:01 am
Profile
User avatar

Joined: Tue Jun 12, 2007 11:52 pm
Posts: 13144
Location: Here
Reply with quote
Post Re: RTTI Data?
How are you calling the vector? If you're doing "variable:function()", try "Vector(variable.X,variable.Y):function()".


Tue Jul 27, 2010 8:12 am
Profile
User avatar

Joined: Sun May 31, 2009 1:04 am
Posts: 308
Reply with quote
Post Re: RTTI Data?
I got fed up with it, broke out my linear algebra textbook, and wrote my own function. Problem solved/avoided. :lol:

Code:
function RotateVector(vec,radAngle)
   return Vector(vec.X*math.cos(radAngle)+vec.Y*math.sin(radAngle),-1*(vec.X*math.sin(radAngle) - vec.Y*math.cos(radAngle)));
end

Works 100% of the time, plus you don't have to worry about the weird ♥♥♥♥ that occurs when you cross the 3*PI/2 line (with Vector:RadRotate(), when you cross from quadrant 3 to quadrant 4, you have to switch from using 0 == > 3*PI/2 to -PI/2 ==> 0)

Oh, and to answer your question CC48, I was calling it using variable:function().


Tue Jul 27, 2010 8:59 am
Profile
DRL Developer
DRL Developer
User avatar

Joined: Tue Jul 27, 2004 8:02 pm
Posts: 428
Location: AZ
Reply with quote
Post Re: RTTI Data?
Code:
Vector & Vector::RadRotate(float angle)
{
    angle = -angle;
    float tempX = m_X * cos(angle) - m_Y * sin(angle);
    float tempY = m_X * sin(angle) + m_Y * cos(angle);
    m_X = tempX;
    m_Y = tempY;

    return *this;
}


That's the C++ impl of the function.. I don't think the error has to do with this specific function; more likely it's somehting that's happening to the memory of the lua Vector object instance. No idea how to fix it.. yet. Please post any more patterns and hints you find out


Fri Sep 07, 2012 8:16 am
Profile ICQ
Display posts from previous:  Sort by  
Reply to topic   [ 11 posts ] 

Who is online

Users browsing this forum: No registered users


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by STSoftware for PTF.
[ Time : 0.091s | 15 Queries | GZIP : Off ]