Author Topic: Random errors at program shut down  (Read 2049 times)

Offline Gerd256

  • Single posting newcomer
  • *
  • Posts: 3
Random errors at program shut down
« on: August 12, 2023, 11:01:50 am »
My program work fine, but when I run it from CodeBlocks and close it I  do sometimes receive this error:


-------------- Run: Release in Integral (compiler: GNU GCC Compiler)---------------

Checking for existence: E:\My Documents\Integral\bin\Release\Integral.exe
Executing: "E:\My Documents\Integral\bin\Release\Integral.exe"  (in E:\My Documents\Integral\.)
Process terminated with status -1073741819 (0 minute(s), 10 second(s))
 
Sometimes it closes fine:

-------------- Run: Release in Integral (compiler: GNU GCC Compiler)---------------

Checking for existence: E:\My Documents\Integral\bin\Release\Integral.exe
Executing: "E:\My Documents\Integral\bin\Release\Integral.exe"  (in E:\My Documents\Integral\.)
Process terminated with status 0 (0 minute(s), 5 second(s))

What causes this error?

My program is terminated with

void IntegralFrame::OnQuit(wxCommandEvent& event)
{
    Close();
}

I am using Codeblocks 17.12, WxWidgets 3.1.3 and Win10

Offline Miguel Gimenez

  • Developer
  • Lives here!
  • *****
  • Posts: 1557
Re: Random errors at program shut down
« Reply #1 on: August 12, 2023, 11:24:25 am »
That error (0xC0000005) indicates a memory access violation. Probably you are deleting something owned by wxWidgets before closing, or memory has been corrupted by your code. In any case it is not related to C::B, so it is OT here.