The segment fault is usually caused by memory manage issues.
When I debugged my issue, I found that:
One class called "new S3Client", which is passed to a unique_ptr. However, when ShutdownAPI(options) function is called, the S3Client somehow gets destroyed. Then when the unique_ptr tries to destroy S3Client, a segment fault happened.
The fix is to put a section bracket { } before calling ShutdownAPI so that the unique_ptr destroys the pointer before ShutdownAPI.
No comments:
Post a Comment