EVP_aes_256_gcm() fails - evp-cipher

when I use EVP_aes_128_cbc() in my code it works fine.
But when use EVP_aes_128_gcm() or EVP_aes_256_gcm() gtest throws error message "unknown file: error: SEH exception with code 0xc0000005 thrown in the test body."
Can anyone help here?

Related

How to get stack trace error exception in C++?

I'm getting following error with one of the third party library in which i have no access to the code. This error is intermittently being thrown and i have no idea what caused the error since i can't view the code. The library is in .SO extension which running in Linux and the library is compiled with C++ version 11 and i have exception catch routine in my function with e.what().
An invalid memory reference (segmentation violation) has occurred.
Is there anyway i can view the stack trace for that error when it is being thrown? Also, any suggestion or advise on what is that error about?

c++ code analysis - fatal error C1093: API call 'GetUserString' failed '0x8013110e' :

Any ideas what this error message means? It seems like some obscure compiler error that only occurs when we run with code analysis on. Our solution compiles without code analysis turned on.

D3D11CreateDeviceAndSwapChain throws with unknown cause

for the last weeks i've been running in a strange behaviour of Visual Studio and the game I develop.
After creating the application window with WIN32 CreateWindowExA I initialize DX3D11 with D3D11CreateDeviceAndSwapChain (see line 304 in codefile here).
In VisualStudio executing this line will always result in a crash with the following text in the debug output:
First-chance exception at 0x7713C42D in SpaceLegends.exe: Microsoft C++ exception: _com_error at memory location 0x0032D7A0.
First-chance exception at 0x7713C42D in SpaceLegends.exe: Microsoft C++ exception: _com_error at memory location 0x0032D90C.
First-chance exception at 0x7713C42D in SpaceLegends.exe: Microsoft C++ exception: _com_error at memory location 0x0032D940.
First-chance exception at 0x7713C42D in SpaceLegends.exe: Microsoft C++ exception: _com_error at memory location 0x0032DA58.
First-chance exception at 0x7713C42D in SpaceLegends.exe: Microsoft C++ exception: _com_error at memory location 0x0032E248.
First-chance exception at 0x77B070B4 (ntdll.dll) in SpaceLegends.exe: 0xC0000005: Access violation reading location 0x00000000.
Critical error detected c0000374
SpaceLegends.exe has triggered a breakpoint.
But when I run the exe without VS just as a normal user I don't have any problems to start the application. Also there is no log entry reporting any difficulties or errors!
Due to some reasons I don't get the try-catch around the specific code line does not fire in VS debugging, so there is no exception message I could tell.in
I can't imagine what's wrong with this, neither I have any further idea how to solve or even trace this issue.
EDIT 1:
A full stacktrace from the moment where the exception occurs:
ntdll.dll!_RtlpBreakPointHeap#4() Unknown
ntdll.dll!_RtlpCoalesceFreeBlocks#16() Unknown
ntdll.dll!#RtlpFreeHeap#16() Unknown
ntdll.dll!_RtlFreeHeap#12() Unknown
ntdll.dll!_RtlDebugFreeHeap#12() Unknown
ntdll.dll!#RtlpFreeHeap#16() Unknown
ntdll.dll!_RtlFreeHeap#12() Unknown
ntdll.dll!_LdrpFinalizeAndDeallocateDataTableEntry#4() Unknown
ntdll.dll!_LdrpUnloadDll#8() Unknown
ntdll.dll!_LdrUnloadDll#4() Unknown
guard32.dll!003d6f12() Unknown
[Frames below may be incorrect and/or missing,
no symbols loaded for guard32.dll]
nvumdshim.dll!5dae52c4() Unknown
nvumdshim.dll!5dad777f() Unknown
[External Code]

can't debug UT since it causes compilation failure

I am writing a new UT in my code (C++, VS10).
Apparently there is an error somewhere in the test. I see the following error in the compilation console
unknown location(0): fatal error in "Test1": breakpoint encountered
I want to debug the test to see what is wrong, but I can't, since this test failure cases the compilation to fail, and prevents me from running the code inside VS debugger.
I guess I can copy my code to the main() function, but this is problematic since the test requires many includes that are absent from that part.
Is there any other option?
Use DebugBreak inside Test1. It will crash and then you can attach the application to debugger. However, if debug information is not generated, you have to debug through assembly code.
Simple usage of DebugBreak
DebugBreak(); //Include Windows.h for it.

Panda3D and load_model c++

I am new to panda3d and am trying the hello world.
I have gotten the program to run with just:
PandaFramework framework;
framework.open_framework(argc, argv);
WindowFramework *window = framework.open_window();
framework.main_loop();
framework.close_framework();
return 0;
however, if I add in :
NodePath environt = window->load_model(framework.get_models(), "panda-model");
environt.reparent_to(window->get_render());
environt.set_scale(0.25, 0.25, 0.25);
environt.set_pos(-8, 42, 0);
before the main_loop(), it won't compile. I have the panda-model.egg.pz in every folder of my c++ project but every time my program breaks on :
environt.reparent_to(window->get_render());
The excat message is: Unhandled exception at 0x0152a317 in Irr.exe: 0xC00001A5: An invalid exception handler routine has been detected.
It compiles fine the only wraning being that it can't find the pdb files but that doesn't matter.
Any ideas?
Btw, im using MSVC++ 2010 and panda3d 1.7.2
The only error I can find is : First-chance exception at 0x00bfa317 in Irr.exe: 0xC0000005: Access violation reading location 0x737265db.
Unhandled exception at 0x00bfa317 in Irr.exe: 0xC00001A5: An invalid exception handler routine has been detected.
The program '[8476] Irr.exe: Native' has exited with code 0 (0x0).
which I'm pretty sure is still rather vague. I'm sorry but its all I can find. I'd be happy to describe it more though if necessary.
Microsoft Visual C++ 2010 is not supported by current versions of Panda3D. You will need to use 2008 or compile the Panda3D SDK from source against MSVC 2010. (This is not as straightforward as it sounds, as you will also need to compile some of the thirdparty packages to be compatible with 2010. However, it is possible.)
If you insist on using 2010 instead of 2008, this forum post may be helpful:
https://www.panda3d.org/forums/viewtopic.php?t=12663