Note that there are some explanatory texts on larger screens.

plurals
  1. POFirst-chance exception (ntdll.dll)
    primarykey
    data
    text
    <p>Any ideas why I am getting this error?</p> <p>This is the full error: </p> <blockquote> <p>First-chance exception at 0x77202282 (ntdll.dll) in Test.exe 0xC0000005: Access violation writing location 0x0000004</p> <p>Unhandle exception at 0x77202282 (ntdll.dll) in Test.exe 0xC0000005: Access violation writing location 0x0000004</p> </blockquote> <ul> <li>Debugging breaks at the line <code>Grid::Grid()</code>.</li> <li><code>Root.hpp</code> contains a private member <code>static Grid grid;</code>.</li> <li><code>Root.cpp</code> initializes this <code>Grid Root::Grid;</code></li> </ul> <p>I do have <code>SFML</code> linked statically, which has caused me a bit of trouble.</p> <p>This is a small example which exhibits this error:</p> <pre><code>#include &lt;fstream&gt; #include &lt;sstream&gt; #include &lt;Windows.h&gt; #include "Root.hpp" Grid Root::grid; int main (uchar argc, char **argv) { Root root; Root::Prepare(root); return Root::GetStatus(); } </code></pre> <p>The constructor as follows: </p> <pre><code>Grid::Grid() { Width = 100; Height = 100; } </code></pre> <p>The call stack:</p> <pre><code>ntdll.dll!772022b2() Unknown [Frames below may be incorrect and/or missing, no symbols loaded for ntdll.dll] Test.exe!sf::priv::MutexImpl::lock(void) Unknown Test.exe!sf::Mutex::lock(void) Unknown Test.exe!sf::Lock::Lock(class sf::Mutex &amp;) Unknown Test.exe!sf::GlResource::GlResource(void) Unknown Test.exe!sf::Texture::Texture(void) Unknown &gt; Test.exe!Grid::Grid() Line 5 C++ Test.exe!`dynamic initializer for 'Root::grid''() Line 11 C++ msvcr110d.dll!_initterm(void (void) * * pfbegin, void (void) * * pfend) Line 894 C Test.exe!__tmainCRTStartup() Line 460 C Test.exe!mainCRTStartup() Line 377 C kernel32.dll!767533aa() Unknown ntdll.dll!77219ef2() Unknown ntdll.dll!77219ec5() Unknown </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload