Jump to content

Release Runtime Error


xtreampb
 Share

Recommended Posts

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!

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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!

Link to comment
Share on other sites

That almost always means a variable isn't initialized correctly. My guess is finding this bug and if it's an init issue, you'll always init every variable from now on if you don't already :)

 

 

Read the first answer to this to understand more.

 

http://stackoverflow.com/questions/312312/what-are-some-reasons-a-release-build-would-run-differently-than-a-debug-build

  • Upvote 1
Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

 Share

×
×
  • Create New...