Skip to content

AWS::InitAPI fails on windows #1692

Closed
Closed
@atitusfwd

Description

@atitusfwd

I'm trying to learn to use the AWS C++ SDK, windows platform, building with CMAKE. I have simplified this down to the basic skeleton defined here: https://docs.aws.amazon.com/sdk-for-cpp/v1/developer-guide/basic-use.html

The program source:

`#include <aws/core/Aws.h>

int main()
{
Aws::SDKOptions options;
options.loggingOptions.logLevel = Aws::Utils::Logging::LogLevel::Trace;
Aws::InitAPI(options);
{
printf("Hello CMake.\n");
}
Aws::ShutdownAPI(options);
return 0;
}`

The result is the same even if the options configuration is commented out. When running the executable, there is no output written to std out or std error, The log file is created but is completely empty (zero bytes). The return code from the program is
-1073741819 as obtained from %errorlevel% variable. If the program is run repeatedly, it will (infrequently) produce the following error stack trace to the console:

Fatal error condition occurred in C:\Temp\build\aws-sdk-cpp\crt\aws-crt-cpp\crt\aws-c-io\source\event_loop.c:74: aws_thread_launch(&cleanup_thread, s_event_loop_destroy_async_thread_fn, el_group, &thread_options) == AWS_OP_SUCCESS
Exiting Application
at 0x7FFC390A2530: aws_backtrace_print
at 0x7FFC39093330: aws_fatal_assert
at 0x7FFC37575F10: aws_event_loop_wait_for_stop_completion
at 0x7FFC3909F630: aws_ref_count_release
at 0x7FFC37573D80: aws_server_bootstrap_set_alpn_callback
at 0x7FFC3909F630: aws_ref_count_release
at 0x7FFC37573760: aws_client_bootstrap_release
at 0x7FFC390F73E0: Aws::Crt::Io::ClientBootstrap::~ClientBootstrap
at 0x7FFC115AD5D0: Aws::Utils::Stream::SimpleStreamBuf::xsputn
at 0x7FFC57614180: execute_onexit_table
at 0x7FFC57614180: execute_onexit_table
at 0x7FFC57614180: execute_onexit_table
at 0x7FFC115AD5D0: Aws::Utils::Stream::SimpleStreamBuf::xsputn
at 0x7FFC115AD5D0: Aws::Utils::Stream::SimpleStreamBuf::xsputn
at 0x7FFC596A9900: RtlActivateActivationContextUnsafeFast
at 0x7FFC596EDA50: LdrShutdownProcess
at 0x7FFC596ED980: RtlExitUserProcess
at 0x7FFC57CBE0A0: FatalExit
at 0x7FFC04D439F0: wassert
at 0x7FFC04D439F0: wassert
at 0x7FFC04D440F0: Exit
at 0x7FFC04D3D850: abort
at 0x7FFC04D3C850: terminate
at 0x7FF7DA3C7370: __scrt_unhandled_exception_filter(d:\agent_work\4\s\src\vctools\crt\vcstartup\src\utility\utility_desktop.cpp:96)
at 0x7FFC5723B6A0: UnhandledExceptionFilter
at 0x7FFC59733EC0: memset
at 0x7FFC5971C6E0: _C_specific_handler
at 0x7FFC59732060: _chkstk
at 0x7FFC596E1020: RtlRaiseException
at 0x7FFC596E1020: RtlRaiseException
at 0x7FFC57164B20: RaiseException
at 0x7FFC38E063F0: CxxThrowException
at 0x7FFC119DAC30: std::_Xbad_function_call
at 0x7FFC11590370: Aws::Monitoring::InitMonitoring
at 0x7FFC1151CFC0: Aws::InitAPI
at 0x7FF7DA3C1B40: main(C:\projects\awsencrypt1\awsencrypt1.cpp:12)
at 0x7FF7DA3C5150: invoke_main(d:\agent_work\4\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl:79)
at 0x7FF7DA3C4F00: __scrt_common_main_seh(d:\agent_work\4\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl:288)
at 0x7FF7DA3C4EE0: __scrt_common_main(d:\agent_work\4\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl:331)
at 0x7FF7DA3C5210: mainCRTStartup(d:\agent_work\4\s\src\vctools\crt\vcstartup\src\startup\exe_main.cpp:17)
at 0x7FFC57CB7020: BaseThreadInitThunk
at 0x7FFC596E2630: RtlUserThreadStart

Metadata

Metadata

Assignees

Labels

closed-for-stalenessguidanceQuestion that needs advice or information.response-requestedWaiting on additional info and feedback. Will move to "closing-soon" in 10 days.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions