C++ Access Violation reading location 0x00421000

EDN Admin

Well-known member
Joined
Aug 7, 2010
Messages
12,794
Location
In the Machine
<p style="padding-right:0px; font-size:14px; vertical-align:baseline; clear:both; word-wrap:break-word; font-family:Arial,Liberation Sans,DejaVu Sans,sans-serif
I am working with OpenSceneGraph library , and I keep running into this violation issue that I would appreciate some help with. The problem is with the particular line below which happens to be the first in my main function.
<pre class="lang-c prettyprint prettyprinted" style="padding:5px; border:0px; font-size:14px; vertical-align:baseline; background-color:#eeeeee; font-family:Consolas,Menlo,Monaco,Lucida Console,Liberation Mono,DejaVu Sans Mono,Bitstream Vera Sans Mono,Courier New,monospace,serif; width:auto; max-height:600px <pre class="prettyprint osg::ref_ptr<osg::Node> bench = osgDB::readNodeFile("Models/test.IVE");[/code]<br/>[/code]
<p style="padding-right:0px; font-size:14px; vertical-align:baseline; clear:both; word-wrap:break-word; font-family:Arial,Liberation Sans,DejaVu Sans,sans-serif
I have my models folder right in my directory. The error is as below.
<p style="padding-right:0px; font-size:14px; vertical-align:baseline; clear:both; word-wrap:break-word; font-family:Arial,Liberation Sans,DejaVu Sans,sans-serif
<strong style="margin:0px; padding:0px; border:0px; vertical-align:baseline; background-color:transparent Unhandled exception at 0x68630A6C (msvcr100.dll) in OSG3D.exe: 0xC0000005: Access violation reading location 0x00421000.
<p style="padding-right:0px; font-size:14px; vertical-align:baseline; clear:both; word-wrap:break-word; font-family:Arial,Liberation Sans,DejaVu Sans,sans-serif
And this is where the problem seems to be coming up.
<pre class="lang-c prettyprint prettyprinted" style="padding:5px; border:0px; font-size:14px; vertical-align:baseline; background-color:#eeeeee; font-family:Consolas,Menlo,Monaco,Lucida Console,Liberation Mono,DejaVu Sans Mono,Bitstream Vera Sans Mono,Courier New,monospace,serif; width:auto; max-height:600px <pre class="prettyprint /** Read an osg::Node from file.
* Return valid osg::Node on success,
* return NULL on failure.
* The osgDB::Registry is used to load the appropriate ReaderWriter plugin
* for the filename extension, and this plugin then handles the request
* to read the specified file.*/
inline osg::Node* readNodeFile(const std::string& filename)
{
return readNodeFile(filename,Registry::instance()->getOptions());
}[/code] For one I would appreciate details on how best to tackle this kind of exception message in the future. Are there tools that make this easy to debug or are there ways to capture the exact issues and fix them? I would appreciate any help with this. [/code]<hr class="sig tokorie@gmail.com

View the full article
 
Back
Top