Wednesday, February 29, 2012

Venting Nested Frustrations

My work schedule changed last week and loaded me up with a good long list of crap to do.  Combined with my obligation to babysit my five-month-old son while trying desperately to get my work done, I feel pretty out of touch with what's going on with this class.  Just now, I finally finished watching last week's lecture.  I'd made other attempts throughout the week, but something has always come up to stand in my way.

I see that some significant challenges remain to completing the game engine project, so I'm going to do my best to get my job-related stuff out of the way ASAP so I can really focus on my homework and get back on track.   

It's funny, in a way.  Now I'm frustrated that I can't even get to the frustrating part!

Sunday, February 19, 2012

Open Wide for OpenGL

Again I forgot to update my blog as I've done my classwork, so here's a summary of the last few days.

Thursday
Watched the first part of the lecture video. Got interrupted and didn't get a chance to finish it.

Friday
Had to work all day. No time, energy, or brainpower left over for homework.

Saturday
Followed the instructions on the lecture slides to get OpenGL set up.  Ran some sample programs and played around with transforms.

Sunday
Finished watching the lecture video. Corrected some things that I didn't do right the first time (project settings, cleanup, etc.)  Checked initial version of game engine project into Perforce.  Skimmed through the OpenGL SuperBible.

Monday, February 13, 2012

Life Gets In The Way

I thought for sure that I'd have time to fix those dang access violations today before the final deadline, but once again, life got in the way. Work and family obligations teamed up against me to keep me away from my computer pretty much all day.  As a result, I'm turning in PA2 with some serious flaws. This is something that I NEVER do. I do NOT turn in incomplete assignments EVER. But I guess I can't say that anymore, can I?

On the bright side, all PA1 tests pass, all but one of the PA4 tests pass, and most of the checks in the faulty PA2 files actually do work even if the overall tests are considered failures. So it could be worse, but it's still probably the worst assignment I've ever turned in.  I am ashamed, and I can only hope for mercy from the almighty Professor.

I'm ready to have this all behind me though, complete or not.  I remain optimistic for the next phase!  I'm crazy like that.

Sunday, February 12, 2012

PA2: Not One, But Many Headaches


I have actually made some progress with PA2.  Several of the checks that were failing last night are passing now.

As of right now, there are only two root causes of failure: one that causes unit tests to fail and one that brings the system crashing down.

  • The currBytesUsed calculation fails on two of the three tests in StressTest_Heap.cpp.  The first test works fine though, as do ALL of the other checks in the entire file.
  • In every place where the tracking block is referenced, I got access violations.  Commenting out the code allowed several tests to pass, but it caused disastrous crashes in the others.

So, for my final test of the evening, I included align_basic_tests, memory_test, StressTest_Alignment, and StressTest_Heap.  I excluded StressTest_fixed, StressTest_Tracking, tracking_tests_global, and tracking_tests_heap.  This resulted in 19 tests, of which 17 passed and 2 failed.

Here's an updated status of the tests.

FileStatus
align_basic_tests.cppNo problems. All tests pass.
memory_test.cppNo problems. All tests pass.
StressTest_Alignment.cppNo problems. All tests pass.
StressTest_fixed.cppCrashes with an access violation that I have not yet investigated.
StressTest_Heap.cppFirst test passes. currBytesUsed tests fail on other two.
StressTest_Tracking.cppCrashes with an access violation when reading the tracking block.
tracking_tests_global.cppCrashes with an access violation when reading the tracking block.
tracking_tests_heap.cppCrashes with an access violation when reading the tracking block.


Saturday, February 11, 2012

PA2 is a Disaster

Time runs short for me to figure out what to do about PA2.  Right now, it's somewhat of a catastrophe.  Here's what's going on with the unit tests:

FileStatus
align_basic_tests.cpp Access violation on Mem::setTrackingBlockHead(gTrackHead->gNext);
memory_test.cpp No problems. All tests pass.
StressTest_Alignment.cpp currAllocIndex tests fail. For some perplexing reason, several lines are skipped entirely because the debugger says they contain no executable statements.
StressTest_fixed.cpp Not attempted.
StressTest_Heap.cpp currAllocIndex tests fail. Seems to be the exact same problem as StressTest_Alignment.cpp
StressTest_Tracking.cpp currAllocIndex tests fail. Seems to be the exact same problem as StressTest_Alignment.cpp and StressTest_Heap.cpp
tracking_tests_global.cppcurrNumAlloc tests fail
tracking_tests_heap.cpp currNumAlloc tests fail

So this is where I will begin tomorrow, with sincere hopes of having it all worked out by Monday's deadline!

Wednesday, February 8, 2012

New Guts for PA3

I ripped out the internals of my PA3 code and replaced them with Win32 file handling functions.  As a result, some of the code looks a little cleaner, but it doesn't run without access violations.  But that's been the norm for most of my work in this class, so I'm no worse off than I have been.

My interface was barely changed, but perhaps it should be.





Tuesday, February 7, 2012

Hey PA2, Are We Having Fun Yet?

No!  PA2 still is not fun.  If I were a consumer of alcohol, I would be driven to do so now.  I worked on this assignment for most of the day, and barely have any progress to show for it.

The memory tests from last night continue to work well, so I decided to tackle the basic alignment tests next. After a few hours of desperate troubleshooting, I was able to get the custom new operator to stop crashing, but only by ignoring parameters and cutting things down to their most basic forms.

Now, approaching the end of the day and the end of my sanity, the test I'm hopelessly stuck on at the moment is this:

(mem_Info.currBytesUsed == 5*sizeof(Dog))

How in the world can I make this condition true?  Logic says that it should be, but how to get the code to agree, I do not yet know.

I'm tempted to stay up all night again to keep working on this, but I'm rapidly reaching a point of diminishing returns by doing so. I'm ready to cut my losses for today and try to get some rest.  The mental energy I've expended on PA2 has been immense, even if my results are not.  I'm going to rest up, re-read the online documentation on the Win32 memory functions, and try again tomorrow.

For tonight, I'm leaving PA2 like this:







PA2 Finally Shows Progress

PA2 is still not a comfortable area for me, but I can proudly say that after two days of work, the first set of tests is passing.  The tests defined in memory_test.cpp are out of the way...though I know full well that the destroyHeap method has a huge leak because I can't figure out how to delete a heap without throwing access violations.  But that's a problem for another day.

First set of tests down!



Friday, February 3, 2012

Even PA4 Conspires Against Me!

As you could see from my last few posts, PA4 was going along great.  I made progress steadily until the very, very end.  The getInv() method's unit test fails, and I have absolutely no idea why.  I've fought with it off and on for the last nine hours, and I've made no progress.  For now, I give up.  I'll work on other stuff and come back to this later if there's time.

I'm leaving PA4 right here:

Curse you, getInv!



Thursday, February 2, 2012

PA4 Progress Report 3


PA4 Unit Test Status
Tests currently passing:  18/20  (90%)

Unit Test CategoryStatus
COMBO_TEST
Fail
VECT_TEST_BOOLEANPASS
VECT_TEST_ADDSUBPASS
VECT_TEST_BRACKETPASS
VECT_TEST_CONSTRUCTORPASS
VECT_TEST_FUNCTIONSPASS
VECT_TEST_MATRIXPASS
VECT_TEST_SCALEPASS
VECT_TEST_SETPASS
VECT_TEST_UNARYPASS
MATRIX_TEST_ADDSUBPASS
MATRIX_TEST_BRACKETPASS
MATRIX_TEST_CONSTRUCTORPASS
MATRIX_TEST_MULTIPLYPASS
MATRIX_TEST_SCALEPASS
MATRIX_TEST_UNARYPASS
MATRIX_TEST_SPECIALPASS
MATRIX_TEST_SETPASS
MATRIX_TEST_FUNCTIONSPASS
MATRIX_TEST_INVERSEFail

PA4 Progress Report 2

PA4 Unit Test Status
Tests currently passing:  17/20  (85%)

Unit Test CategoryStatus
COMBO_TEST
Fail
VECT_TEST_BOOLEANPASS
VECT_TEST_ADDSUBPASS
VECT_TEST_BRACKETPASS
VECT_TEST_CONSTRUCTORPASS
VECT_TEST_FUNCTIONSPASS
VECT_TEST_MATRIXPASS
VECT_TEST_SCALEPASS
VECT_TEST_SETPASS
VECT_TEST_UNARYPASS
MATRIX_TEST_ADDSUBPASS
MATRIX_TEST_BRACKETPASS
MATRIX_TEST_CONSTRUCTORPASS
MATRIX_TEST_MULTIPLYPASS
MATRIX_TEST_SCALEPASS
MATRIX_TEST_UNARYPASS
MATRIX_TEST_SPECIALPASS
MATRIX_TEST_SETPASS
MATRIX_TEST_FUNCTIONSFail
MATRIX_TEST_INVERSEFail

Wednesday, February 1, 2012

PA4 Progress Report 1


PA4 Unit Test Status
Tests currently passing:  8/20  (40%)

Unit Test CategoryStatus
COMBO_TEST
Fail
VECT_TEST_BOOLEANPASS
VECT_TEST_ADDSUBPASS
VECT_TEST_BRACKETPASS
VECT_TEST_CONSTRUCTOR PASS
VECT_TEST_FUNCTIONSPASS
VECT_TEST_MATRIXFail
VECT_TEST_SCALEPASS
VECT_TEST_SETPASS
VECT_TEST_UNARYPASS
MATRIX_TEST_ADDSUBFail
MATRIX_TEST_BRACKETFail
MATRIX_TEST_CONSTRUCTORFail
MATRIX_TEST_MULTIPLY Fail
MATRIX_TEST_SCALEFail
MATRIX_TEST_UNARYFail
MATRIX_TEST_SPECIALFail
MATRIX_TEST_SETFail
MATRIX_TEST_FUNCTIONSFail
MATRIX_TEST_INVERSEFail