aliyun / aliyun-openapi-cpp-sdk

Alibaba Cloud SDK for C++
Other
99 stars 77 forks source link

Core dump when using ecs describeInstances #7

Closed hsinyishen closed 5 years ago

hsinyishen commented 5 years ago

Hi, I follow the example in README to make ecs client call describeInstances() function. But the c++ executable got core dump with following error message: terminate called after throwing an instance of 'std::runtime_error' what(): Type is not convertible to string Aborted (core dumped)

With gdb, it seems to me the core dump happened when parsing json response:

0 0x00007faf2fdf8cc9 in __GI_raise (sig=sig@entry=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:56

1 0x00007faf2fdfc0d8 in __GI_abort () at abort.c:89

2 0x00007faf303fd6b5 in __gnu_cxx::__verbose_terminate_handler() () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6

3 0x00007faf303fb836 in ?? () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6

4 0x00007faf303fb863 in std::terminate() () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6

5 0x00007faf303fbaa2 in __cxa_throw () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6

6 0x00007faf2f56f4fd in Json::Value::asString() const () from /usr/lib/x86_64-linux-gnu/libjsoncpp.so.0

7 0x00007faf31e15604 in AlibabaCloud::Ecs::Model::DescribeInstancesResult::parse(std::string const&) () from /usr/local/lib/libalibabacloud-sdk-ecs.so

8 0x00007faf31e12bf6 in AlibabaCloud::Ecs::Model::DescribeInstancesResult::DescribeInstancesResult(std::string const&) ()

from /usr/local/lib/libalibabacloud-sdk-ecs.so

9 0x00007faf318b41eb in AlibabaCloud::Ecs::EcsClient::describeInstances(AlibabaCloud::Ecs::Model::DescribeInstancesRequest const&) const ()

from /usr/local/lib/libalibabacloud-sdk-ecs.so

I also tried other API such describeRegions and also got core dump during parsing json response. Not sure if I miss anything in the setting or hit sdk bug. Could someone take a look or give some suggestion?

nightmeng commented 5 years ago

Thank you for your response, we have fixed this bug in new version, please wait a little longer.

zhangzifa commented 5 years ago

@hsinyishen

Bug already fixed, you may try with 1.34.8.

zhangzifa commented 5 years ago

@hsinyishen I close this issue as fixed, you may reopen it if problem still exists.