Jump to content

world->Update() Crash


gamecreator
 Share

Go to solution Solved by aiaf,

Recommended Posts

What things could potentially make world->Update() crash a program?  I have the following code right now and the program regularly crashes after printing D and not printing E to the console.

printf("C");
Leadwerks::Time::Update();
printf("D");
world->Update();
printf("E");
world->Render();
printf("F");
gui.draw();
printf("G");
context->Sync(true);
printf("H");

As I was typing this up and testing the program again, I got the following error, which seems like it crashed during world->Render():

assert.thumb.jpg.370f5879443fbc9cd3cedc36bb17054e.jpg

Searching the forums found this issue (https://www.leadwerks.com/community/topic/10612-world-update-crash/) which seemed to be resolved at the time.

I should also make it clear that this doesn't usually happen as soon as I start the game.  Sometimes it takes a few seconds, sometimes it's when I fire a shot, sometimes when I kill an enemy.  Happens sooner the more enemies I include though.  Pretty much never happens with just a few, like 6 or less.

 

Link to comment
Share on other sites

  • Solution

Running under debugger something helps identify problems.

But the ultimate tool for this is in the linux land :) its valgrind detects memory leaks and other kind of memory stuff.

To tell the true there are for windows also Dr Memory(free but never used it) and purify (this one is expensive).

  • Upvote 1

I made this with Leadwerks/UAK:

Structura Stacky Desktop Edition

Website:

Binary Station

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...