Jump to content
Leadwerks Community

Recommended Posts

Posted

Since I'm not ready to upgrade to VS2015, I decided to roll back to 4.1 To my surprise, my program now seems to crash on window commands.

 


bool App::Loop()

{

printf("1\n");

if(window->KeyDown(Key::Escape)) return false;

printf("2\n");

if(window->Closed()) return false;

printf("3\n");

 

The above prints 1 but not 2 or 3. If I comment out the KeyDown line, it will crash on the Closed line instead.

 

Any idea what's going on? I'll try to create a clean project from scratch just in case but this seems strange to me.

Posted

Clean your project, first of all.

 

Then set a breakpoint and see what's going on with the window variable.

  • Upvote 1

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

Posted

+ this 0x0087b478 {window=0xcdcdcdcd {hwnd=??? hdc=??? devmode={dmDeviceName=0xcdcdcded <Error reading characters of string.> ...} ...} ...} App *

 

Not sure if that's what you're looking for. I haven't ever really used the debugger.

 

 

Edit: I'm testing what's going on. A blank project with just a few lines did not crash so the issue is somewhere else. I hate this part of coding...

 

Edit 2: Figured I might as well just bite the bullet and upgrade to 2015. Fingers crossed.

 

Edit 3: Got 2015 working with a project after a fix to the working directory. So far so good.

Posted

Turns out that once I found the solution, I remembered that I came across this before. I previously moved

 

Leadwerks::Window* window;

Context* context;

World* world;

Camera* camera;

 

to my own world.h/world.cpp files. However, when I made a clean 4.1, and later 4.2 project, I forgot to remove them from the App class. The compiler doesn't give you an error but it will definitely make your project crash. Stupidity on my part and pretty frustrating.

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