Exception thrown in my version of fart-annoyed

The Partridge Family were neither partridges nor a family. Discuss.
Post Reply
mistcurve
Posts: 2
Joined: April 7th, 2017, 4:37 pm

Exception thrown in my version of fart-annoyed

Post by mistcurve » April 8th, 2017, 3:06 am

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!

User avatar
chili
Site Admin
Posts: 3948
Joined: December 31st, 2011, 4:53 pm
Location: Japan
Contact:

Re: Exception thrown in my version of fart-annoyed

Post by chili » April 8th, 2017, 4:14 am

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

albinopapa
Posts: 4373
Joined: February 28th, 2013, 3:23 am
Location: Oklahoma, United States

Re: Exception thrown in my version of fart-annoyed

Post by albinopapa » April 8th, 2017, 5:28 am

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

albinopapa
Posts: 4373
Joined: February 28th, 2013, 3:23 am
Location: Oklahoma, United States

Re: Exception thrown in my version of fart-annoyed

Post by albinopapa » April 8th, 2017, 5:29 am

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

mistcurve
Posts: 2
Joined: April 7th, 2017, 4:37 pm

Re: Exception thrown in my version of fart-annoyed

Post by mistcurve » April 8th, 2017, 6:25 pm

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

albinopapa
Posts: 4373
Joined: February 28th, 2013, 3:23 am
Location: Oklahoma, United States

Re: Exception thrown in my version of fart-annoyed

Post by albinopapa » April 9th, 2017, 5:47 am

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

Post Reply