Open main menu

CDOT Wiki β

Changes

BTP300B A2 Team 1 Bugs Report

187 bytes added, 19:32, 4 December 2013
no edit summary
========================'''
<u>Oct 7, created the basic skeleton of the CFrame class though I'm not sure if I did it properly. Basically just created the CFrame.cpp with the get</set methods (row, row(int), etc...) coded, the more complex methods implemented but not working and the attributes of the frame class defined. Getting major compile errors on VS and G++ but seemed to be compiling in Borland. Split the work between myself, Shianne and Huda (Huda emailed the team letting us know that she wishes to work on display and hide method).u>
Oct 10, Goofed up and realized that created the basic skeleton of the CFrame class though I had 'm not added sure if I did it properly. Basically just created the private methods to CFrame. Added those in cpp with the get/set methods (row, row(int), etc...) coded, the more complex methods implemented but functionality not codedworking and the attributes of the frame class defined. Getting major compile errors on VS and G++ but seemed to be compiling in Borland. Split the work between myself, Shianne and Huda (Huda emailed the team letting us know that she wishes to work on display and hide method).
<u>Oct 15, program compiles in Borland but not in VS. Got started on private member functions of CFrame. Finished working on the setLine method and started work on void capture();10</u>
Oct 18, I've worked a bit on it Goofed up and realized that I've gotten a couple of had not added the private methods running (capture and setline) which from the looks of it should enable us to begin coding the hide and draw methods that will hide and draw the frame. Huda has stated that she wants to do hide and I think I can do the draw methodCFrame. We still need to get the private methods absrow and abscol which returns the position of the frame relative to the console which we will need Added those in order to implement the move method as well as a whole bunch of the smaller methods like overloaded display and edit methods which will let the user edit the contents of a frame(implemented but functionality not coded).
<u>Oct 19, Worked on it today and got the draw function up and running as well as fixed setLine since it seems I did it incorrectly and finally got it compiling and running properly in VS. For some reason though, absrow and abscol is causing a crash in VS but otherwise works fine in Borland (haven't had a chance to test it out in g++). added some code to A2test for testing the stuff I've coded.15</u>
Oct 21, Program compiles in Borland but not in VS. Got started on display methodprivate member functions of CFrame. The abscol and absrow crash seems to only occur Finished working on the default A2test code not setLine method and started work on my own personal test code which only creates 1 frame. The default A2test code create a nested frame void capture(a small frame inside a larger frame) so maybe the problem lies in how VS is handling those nested frames?;
<u>Oct 21, Got the display method up and running. I added in the helper method void move(iFrame&) which handles getting the user input and moving the frame based on that input (user presses up key, it calls the move(CDirection method) which moves the frame in the appropriate direction). I'm having a bit of trouble with it though, in a2test the parameter is passed a CFrame but the method itself (both the definition in iFrame and the CFrame helper method) are set to recieve iFrames. The method move(iFrame& x) should be able to recieve a CFrame since a CFrame is an iFrame and in a2test the calls to move method are all being passed CFrames. Figuring out how to fix this.18</u>
I've worked a bit on it and I've gotten a couple of the private methods running (capture and setline) which from the looks of it should enable us to begin coding the hide and draw methods that will hide and draw the frame. Huda has stated that she wants to do hide and I think I can do the draw method. We still need to get the private methods absrow and abscol which returns the position of the frame relative to the console which we will need in order to implement the move method as well as a whole bunch of the smaller methods like overloaded display and edit methods which will let the user edit the contents of a frame. <u>Oct 19</u> Worked on it today and got the draw function up and running as well as fixed setLine since it seems I did it incorrectly and finally got it compiling and running properly in VS. For some reason though, absrow and abscol is causing a crash in VS but otherwise works fine in Borland (haven't had a chance to test it out in g++). added some code to A2test for testing the stuff I've coded. <u>Oct 21</u> Got started on display method. The abscol and absrow crash seems to only occur on the default A2test code not on my own personal test code which only creates 1 frame. The default A2test code create a nested frame (a small frame inside a larger frame) so maybe the problem lies in how VS is handling those nested frames? <u>Oct 21</u> Got the display method up and running. I added in the helper method void move(iFrame&) which handles getting the user input and moving the frame based on that input (user presses up key, it calls the move(CDirection method) which moves the frame in the appropriate direction). I'm having a bit of trouble with it though, in a2test the parameter is passed a CFrame but the method itself (both the definition in iFrame and the CFrame helper method) are set to recieve iFrames. The method move(iFrame& x) should be able to recieve a CFrame since a CFrame is an iFrame and in a2test the calls to move method are all being passed CFrames. Figuring out how to fix this. <u>Oct 22, </u> I've sent an email to Peter asking for help about the issue with the
error: invalid initialization of reference of type cio::iFrame& from expression of type cio::CFrame
when calling the helper method void move(iFrame &x) which handles getting user input on the direction the user wants the frame to move. Currently working on move(CDirection) method which handles moving the actual frame.
Just finished with the move(CDirection) and the frame now moves around inside either the console (I still need to test if it will do the same if it is a child frame inside a parent frame though it should.). I also added a new char* string called contentBuffer which will hold the information held in display and edit when the user moves the frame and it has to be redrawn.  <u>Oct 23</u>
Oct 23, Need to figure out what is causing the move(iFrame&) method to not accept the CFrame classes being passed to it since that will be handling getting the user input and calling the move(CDirection) method which will actually move the frame. It technically should be accepting receiving a CFrame object since a CFrame is an implementation of the iFrame interface. For instance in a2test.cpp, the method testFrame() creates a CFrame object then calls move(iFrame&) method but it results in the following error:
error: invalid initialization of reference of type cio::iFrame& from expression of type cio::CFrame
void testFrame() {
bool done = false;
CFrame frame;
}
<u>Oct 29, </u> I don't think there's much that's left to do, just handle getting the user input to move the frame around and fix any bugs that causes it to fail any of the a2test tests.
<u>Nov 1, goofed up. Realized I forgot to pass on the SVN accounts to the rest of the team. Team kept each other up to date with the latest developments via email chains so not using the SVN really did not impact progress of the project that much.</u>
goofed up. Realized I forgot to pass on the SVN accounts to the rest of the team. Team kept each other up to date with the latest developments via email chains so not using the SVN really did not impact progress of the project that much. <u>Nov 2, </u> I'm still trying to figure out why the move method isn't working properly in the a2test. I used my own code that I added to the a2testfile and the move method works perfectly but for some reason in the actual a2test code it moves once and then just stops. I suspect that maybe we've commented out code that we should not have commented out. I think I've figured out the problem, the error occurs when the frame being moved has a parent frame, so we should probably take a look at how the parent frames are handled by the program and by the move method in particular.
works fine like this:
<u>Nov 3, </u> Done some more fixes and now the frame appears as full screen whenever row, column, width or height is set to a negative value and the frame borders are now blank when the frame visibility is set to false. The 'fix' on the crash on exit by the destructor was done by commenting out the one line that clears the buffer which keeps the program from crashing on exit.
I've updated the SVN though I'm not sure if my changes got reflected on the SVN (I'm still trying to get the hang of this) so I've attached a zip file with the updated code just in case it didn't go through.
other than the destructor issue I think that's it for this assignment. I started some minor stuff for R2, just setting up the header files for the classes for that release so there should be some additional .h files in the zip and repo.
<u>Nov 4, took on Michael and Jay for A2R2.</u>
fixed the issue with the frame moving past the bottom of the parent frame took on Michael and "moving" message now dissappears once the user hits escape and takes the frame out of move modeJay for A2R2.
fixed the issue with the frame moving past the bottom of the parent frame and "moving" message now dissappears once the user hits escape and takes the frame out of move mode. A2R1 is finished and handed in to Blackboard. <u>Nov 9, </u> Finished working on the framework of assignment2 release 2. This framework should follow the structure specified in the assignment so the only thing left would be to do the actual implementation of the methods for each class.
Divided work amoung group, Michael, wants to do the CDialog class, Huda is doing CButton and Shianne is doing CLabel. Haven't heard from Jay yet.
I'll get started on CField on Monday and try to get it done ASAP.
<u>Nov 12, Finished work on the CField class last night. Decided to get started on CLine since I haven't heard from Jay at all. Nov 16, There was an error in the edit method of CFrame in which the program was crashing when the user tries to edit the string. It turns out that the method was trying to pass a char* to the consolelineedit method which only takes in char arrays. The issue is resolved and I've updated the files in the SVN. </u>
Nov 18, CLine and CDialog are pretty much close to being done while Finished work on the CField is doneclass last night. Decided to get started on CLine since I set the attributes to the CFrame class to protected as per Michaelhaven's recommendation and added offset and cursor Positiont heard from Jay at all.
<u>Nov 25, added in the Set functionality (it should be the same as in CLine from the looks of the specs so it just invokes the allocateandcopy method). Modified CDialog and CField to fix the compile errors I was getting. I added the destructor implementation to the cpp and modified the add and edit methods of CField and CDialog to be able to accept function calls with one or no arguments. It's compiling and running with the default A2test but getting crashes so definitely still some more debugging is needed. Also the edit method in CButton still needs to be implemented. 16</u>
Nov 29, I debugged the assignment yesterday and managed to fix one bug that There was causing the program to crash but there is still an issue with error in the edit method in CDialog and CField of CFrame in which the program is was crashing and giving a corrupted memory heap error when attempting the user tries to edit the data string. It turns out that the method was trying to pass a char* to the consolelineedit method which only takes in char arrays. The issue is resolved and I've updated the files in the SVN.
Dec 2, Did some more fixes today. It's no longer crashing on edit, turns out we needed to put in an if statement in consolelineedit to catch if fieldLen is negative value and to set it to strlen of the passed string. (basically it was trying to create a new string with a negative value lenght without the if statement). Also ended up fixing CButton by getting rid of the allocate statement at the constructor (it was trying to allocate framedata which hasn't been set it at the constructor). <u>Nov 18</u>
Dec 3, Fixed the bugs on CButton, CLine, CField and CLabel begun debugging CDialog which are pretty much close to being done while CField is giving an error on done. I set the edit methodattributes to the CFrame class to protected as per Michael's recommendation and added offset and cursor Position.
Dec 4, talked with Huda and she mentioned that she has worked on a version of CDialog. Tested it and it works perfectly and is not causing any errors. Was getting a crash but traced that to a fault in my CField constructor which is setting linedata to NULL rather than as an empty string which was causing a crash when passed to the <u>Nov 25< operator in console. Fixed it and the program seems to be working properly now. Will confirm with Peter tomorrow morning to make sure that everything ready to be handed in./u>
Drafted this development diary added in the Set functionality (it should be the same as in CLine from my entries in the chain email sent between looks of the specs so it just invokes the allocateandcopy method). Modified CDialog and CField to fix the teamcompile errors I was getting. Began drafting I added the peer review destructor implementation to the cpp and team experience documentationmodified the add and edit methods of CField and CDialog to be able to accept function calls with one or no arguments. It's compiling and running with the default A2test but getting crashes so definitely still some more debugging is needed. Also the edit method in CButton still needs to be implemented.
<u>Nov 29</u>
I debugged the assignment yesterday and managed to fix one bug that was causing the program to crash but there is still an issue with the edit method in CDialog and CField in which the program is crashing and giving a corrupted memory heap error when attempting to edit the data string.
<u>Dec 2</u>
Did some more fixes today. It's no longer crashing on edit, turns out we needed to put in an if statement in consolelineedit to catch if fieldLen is negative value and to set it to strlen of the passed string. (basically it was trying to create a new string with a negative value lenght without the if statement). Also ended up fixing CButton by getting rid of the allocate statement at the constructor (it was trying to allocate framedata which hasn't been set it at the constructor).
<u>Dec 3</u>
Fixed the bugs on CButton, CLine, CField and CLabel begun debugging CDialog which is giving an error on the edit method.
<u>Dec 4</u>
talked with Huda and she mentioned that she has worked on a version of CDialog. Tested it and it works perfectly and is not causing any errors. Was getting a crash but traced that to a fault in my CField constructor which is setting linedata to NULL rather than as an empty string which was causing a crash when passed to the << operator in console. Fixed it and the program seems to be working properly now. Will confirm with Peter tomorrow morning to make sure that everything ready to be handed in.
      Drafted this development diary from my entries in the chain email sent between the team.   Began drafting the peer review and team experience documentation.
'''Shianne's Bug Log<br/>
========================'''
1
edit