Re: [Opengc-devel] Debug-mode failure when built with VC7
Status: Pre-Alpha
Brought to you by:
madmartigan
From: Damion S. <da...@op...> - 2004-04-27 15:17:37
|
Thanks for catching this. I'll make the change in the repository. Cheers, -Damion- On Apr 27, 2004, at 10:59 AM, Tim Crews wrote: > Steve: > > I already fixed the debug errors in my local checked-out copy by > changing three declarations of buffer[1] to buffer[2]. The > resulting executable did run without run-time errors. Just search for > "buffer[1]" in all files to find the three occurrences. > > Tim > > -----Original Message----- > From: ope...@li... > [mailto:ope...@li...]On Behalf Of Doyle, > Steven > Sent: Tuesday, April 27, 2004 7:52 AM > To: 'ope...@li...' > Subject: RE: [Opengc-devel] Debug-mode failure when built with VC7 > > > Tim, > > I didn't actually fix this, but why don't you try commenting out the > construction of the speed tape in ogcBoeing777PFD.cpp then see if it > will > run. > > Cheers > > steve > > -----Original Message----- > From: Tim Crews [mailto:tim...@ge...] > Sent: 27 April 2004 15:46 > To: ope...@li... > Subject: RE: [Opengc-devel] Debug-mode failure when built with VC7 > > > Steve: > > The source I am building is straight from CVS. > > Tim > > -----Original Message----- > From: ope...@li... > [mailto:ope...@li...]On Behalf Of Doyle, > Steven > Sent: Tuesday, April 27, 2004 12:02 AM > To: 'ope...@li...' > Subject: RE: [Opengc-devel] Debug-mode failure when built with VC7 > > > Hi, > > Yes I can also confirm this, I don't use the speed tape so it doesn't > affect > me. I should of mentioned it before . Are what version of OGC are you > using > ? > > Cheers > > Steve > > -----Original Message----- > From: Tim Crews [mailto:tim...@ge...] > Sent: 26 April 2004 18:30 > To: ope...@li... > Subject: [Opengc-devel] Debug-mode failure when built with VC7 > > > Hello: > > I have been building the OpenGC code under Microsoft Visual Studio .NET > (Version 7). I am building the Debug target. When I run it > under the debugger, I get frequent run-time error checks saying that > the > stack frame is corrupted around the variable "buffer". > > An example of this can be found in ogcBoeing777SpeedTape.cpp, > ogcBoeing777SpeedTape::Render, which declares > > char buffer[1]; > > and has many lines that look like this: > > sprintf( buffer, "%i", charSpd/100); > > Even when the result of (charSpd/100) is one digit, sprintf is > null-terminating the string that it is writing to. This is resulting > in a desired write to &(Buffer[0]), but also an undesired write to > &(Buffer[0])+1. I believe this is what the MSVC debugger is > complaining about, since it puts guard data around each variable on the > stack, and detects corruption of that guard data. > > To confirm this, and modified the declaration of Buffer to look like > this: > > char buffer[2]; > > and modified the sprintf code to look like this: > > buffer[1] = 255; > sprintf( buffer, "%i", charSpd/100); > > After stepping over the sprintf, sure enough buffer[1] is zero. > > Tim Crews > GECO, Inc > Mesa, Arizona, USA > > > > ------------------------------------------------------- > This SF.net email is sponsored by: The Robotic Monkeys at ThinkGeek > For a limited time only, get FREE Ground shipping on all orders of $35 > or more. Hurry up and shop folks, this offer expires April 30th! > http://www.thinkgeek.com/freeshipping/?cpg=12297 > _______________________________________________ > Opengc-devel mailing list > Ope...@li... > https://lists.sourceforge.net/lists/listinfo/opengc-devel > > > ------------------------------------------------------- > This SF.net email is sponsored by: The Robotic Monkeys at ThinkGeek > For a limited time only, get FREE Ground shipping on all orders of $35 > or more. Hurry up and shop folks, this offer expires April 30th! > http://www.thinkgeek.com/freeshipping/?cpg=12297 > _______________________________________________ > Opengc-devel mailing list > Ope...@li... > https://lists.sourceforge.net/lists/listinfo/opengc-devel > > > > ------------------------------------------------------- > This SF.net email is sponsored by: The Robotic Monkeys at ThinkGeek > For a limited time only, get FREE Ground shipping on all orders of $35 > or more. Hurry up and shop folks, this offer expires April 30th! > http://www.thinkgeek.com/freeshipping/?cpg=12297 > _______________________________________________ > Opengc-devel mailing list > Ope...@li... > https://lists.sourceforge.net/lists/listinfo/opengc-devel > > > ------------------------------------------------------- > This SF.net email is sponsored by: The Robotic Monkeys at ThinkGeek > For a limited time only, get FREE Ground shipping on all orders of $35 > or more. Hurry up and shop folks, this offer expires April 30th! > http://www.thinkgeek.com/freeshipping/?cpg=12297 > _______________________________________________ > Opengc-devel mailing list > Ope...@li... > https://lists.sourceforge.net/lists/listinfo/opengc-devel > > > > ------------------------------------------------------- > This SF.net email is sponsored by: The Robotic Monkeys at ThinkGeek > For a limited time only, get FREE Ground shipping on all orders of $35 > or more. Hurry up and shop folks, this offer expires April 30th! > http://www.thinkgeek.com/freeshipping/?cpg=12297 > _______________________________________________ > Opengc-devel mailing list > Ope...@li... > https://lists.sourceforge.net/lists/listinfo/opengc-devel > > --------- Damion Shelton Carnegie Mellon University, Robotics Institute A408-o Newell Simon Hall 412.268.3866 (office) 412.818.8829 (cell) 412.268.6436 (fax) http://www.cs.cmu.edu/~beowulf --------- Your search for deep meaning in a trite and mundane workaday world continues. Meanwhile, 3,000 people worldwide die of malaria every day, you simp. |