Jump to content

Recommended Posts

Posted

Hi all. I just attempted to publish a prototype to windows. I'm running win 8.1 64 bit. My debug runs fine from the IDE. When i tried to run in the release configuration, it threw a runtime error once the map was loaded. the error was an access violation error. Can anyone help provide guidance on this matter

 

Thanks,

 

~xtreampb~

bool Life()
{
 while(death=false)
 {
   if(death==true)
   return death;
 }
}

 

I have found the secret to infinite life

 

Did I help you out? Like my post!

Posted

On the occasion that this happens, the problems are hard to track down. Uninitialized pointers and writing outside the bounds of an array are two common causes.

 

Is this C++ or Lua?

My job is to make tools you love, with the features you want, and performance you can't live without.

Posted

You are most likely using a pointer that points to nothing. You could put some logging in your game and start narrowing it down to where it's happening. I usually put some printf()'s in major sections of my game and then start putting printf()'s in a more specific area as things narrow down.

Posted

this is in C++. If it was a pointer or written outside of bounds issue wouldn't it also crash in the debug mode, or at least launch the debugger. It is only throwing any run time errors when i run the release version of the exact same source code.

bool Life()
{
 while(death=false)
 {
   if(death==true)
   return death;
 }
}

 

I have found the secret to infinite life

 

Did I help you out? Like my post!

Posted

Thanks for the link. Learned something new. Time to ensure all my vars are intialized before use.

bool Life()
{
 while(death=false)
 {
   if(death==true)
   return death;
 }
}

 

I have found the secret to infinite life

 

Did I help you out? Like my post!

Posted

You probably realize this, pointers are the only thing you really need to worry about, and only for the purpose of preventing yourself from calling a function on a non-existent object. It's only a way to help prevent user error, they don't actually have to be initialized if you don't make any mistakes.

 

Another trick is to look at the object's ref count and check the collected value. If the object's refcount is either zero or some huge crazy number, it's probably an invalid object. If the collected member is true, it was probably deleted.

My job is to make tools you love, with the features you want, and performance you can't live without.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...