Register    Login    Forum    Search    FAQ

Board index » Everything




Post new topic Reply to topic  [ 6 posts ] 
Author Message
 Post Posted: April 8th, 2017, 3:06 am 
 

Joined: April 7th, 2017, 4:37 pm
Posts: 2
After creating a version of the program i belived could build and run well, i run into this exception. I'm not sure how to begin debugging as the exception was thrown within the bitset and i can't step out while debugging.

This is the error message:

Exception thrown at 0x00007FF6B62ECC40 in Engine.exe: 0xC0000005: Access violation reading location 0xFFFFFFFFFFFFFFFF.

This is code in question:

constexpr bool _Subscript(size_t _Pos) const
{ // subscript nonmutable sequence
return ((_Array[_Pos / _Bitsperword]
& ((_Ty)1 << _Pos % _Bitsperword)) != 0);
}



any help would be greatly appreciated! Thanks!


Top 
 Profile  
Reply with quote  
 Post Posted: April 8th, 2017, 4:14 am 
Site Admin
User avatar

Joined: December 31st, 2011, 4:53 pm
Posts: 3281
Location: Japan
Well, you can't step out, but you can explore down (up?) the call stack and see exactly the point in YOUR code where the problem happens / explore the variables at that point / set a break point before there next run / etc.

_________________
Chili


Top 
 Profile  
Reply with quote  
 Post Posted: April 8th, 2017, 5:28 am 
 

Joined: February 28th, 2013, 3:23 am
Posts: 2546
Location: Oklahoma, United States
You'll need to use the call stack and go back a few lines to see where in YOUR code the problem lies. More than likely, you are writing to an invalid index from the look of it.

_________________
If you think paging some data from disk into RAM is slow, try paging it into a simian cerebrum over a pair of optical nerves. - gameprogrammingpatterns.com


Top 
 Profile  
Reply with quote  
 Post Posted: April 8th, 2017, 5:29 am 
 

Joined: February 28th, 2013, 3:23 am
Posts: 2546
Location: Oklahoma, United States
dang it, I wrote mine before seeing what chili wrote. Just had the page up for a while before posting.

_________________
If you think paging some data from disk into RAM is slow, try paging it into a simian cerebrum over a pair of optical nerves. - gameprogrammingpatterns.com


Top 
 Profile  
Reply with quote  
 Post Posted: April 8th, 2017, 6:25 pm 
 

Joined: April 7th, 2017, 4:37 pm
Posts: 2
Here is my code in question, and some snips of the autos and call stack. Still not sure whats going on yet. maybe the 256 value went over the max value possible? idk.
http://imgur.com/a/KDkuB


Top 
 Profile  
Reply with quote  
 Post Posted: April 9th, 2017, 5:47 am 
 

Joined: February 28th, 2013, 3:23 am
Posts: 2546
Location: Oklahoma, United States
From what I can see, the Keyboard reference isn't pointing to a correct instance of Keyboard, how are you passing the keyboard object to Slider::Update(const Keyboard &).

It would be best to either A) clean, then zip your project and upload here or B) upload to GitHub and share the link to the repository here.

_________________
If you think paging some data from disk into RAM is slow, try paging it into a simian cerebrum over a pair of optical nerves. - gameprogrammingpatterns.com


Top 
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
 
Post new topic Reply to topic  [ 6 posts ] 

Board index » Everything


 
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: