【问题标题】:Fatal error condition occurred in c:209: allocator != ((void *)0) - aws-sdk-cppc:209 中发生致命错误情况:allocator != ((void *)0) - aws-sdk-cpp
【发布时间】:2022-12-15 02:27:52
【问题描述】:

更新后我遇到问题:使用 AWS SDK 将对象上传到 Amazon S3 存储桶:(https://docs.aws.amazon.com/AmazonS3/latest/userguide/example_s3_PutObject_section.html)

int main(int, char **)
{
    Aws::SDKOptions options;
    classB::initAwsApi(options);
    
        while (true)
    {

        
        //...
        
        if (threadApi.joinable())
        threadApi.join();
        
        threadApi = std::thread(request, &connection, &headers);
        std::this_thread::sleep_for(std::chrono::seconds(5));
        // if I close the stream, the error doesn't appear. But I would like to close the stream
        stream_.release();
    }
    
    if (threadApi.joinable())
            threadApi.join();

    // when closing the SDK, the error appears
    classB::shutdownAwsApi(options);
}

输出: /home/x/x/deps/aws-sdk-cpp/crt/aws-crt-cpp/crt/aws-c-common/source/allocator.c:209: allocator != ((void *)0) 退出应用程序 没有可用的调用堆栈信息 中止(核心转储)

【问题讨论】:

    标签: amazon-web-services aws-sdk aws-sdk-cpp


    【解决方案1】:

    错误出在新版本的 aws 中。我降低了版本并再次编译它并且它有效

    【讨论】:

      猜你喜欢
      • 2017-01-31
      • 2012-10-11
      • 2017-08-21
      • 2021-05-16
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多