Page 1 of 1

Exception thrown in my version of fart-annoyed

Posted: April 8th, 2017, 3:06 am
by mistcurve
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!

Re: Exception thrown in my version of fart-annoyed

Posted: April 8th, 2017, 4:14 am
by chili
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.

Re: Exception thrown in my version of fart-annoyed

Posted: April 8th, 2017, 5:28 am
by albinopapa
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.

Re: Exception thrown in my version of fart-annoyed

Posted: April 8th, 2017, 5:29 am
by albinopapa
dang it, I wrote mine before seeing what chili wrote. Just had the page up for a while before posting.

Re: Exception thrown in my version of fart-annoyed

Posted: April 8th, 2017, 6:25 pm
by mistcurve
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

Re: Exception thrown in my version of fart-annoyed

Posted: April 9th, 2017, 5:47 am
by albinopapa
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.