Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DropboxWebAuth methods throw exceptions inside slot-lambda -> causes SIGABRT in Android NDK's libstdc++ EHABI #9

Open
barbicels opened this issue Aug 6, 2021 · 0 comments

Comments

@barbicels
Copy link

barbicels commented Aug 6, 2021

Unlike the templated (E, F) exception handling used elsewhere, the methods in DropboxWebAuth.cpp throw a DropboxException from inside a lambda connected to a Qt slot. In macOS Clang's libstdc++, this exception unwinds successfully back to the caller, but in Android NDK r19 (at least), the exception fails to unwind through the EHABI code and SIGABRT is signaled (observed by instruction-level debugging). I have not tried porting my code to iOS, yet, so don't know if the same will happen there.
I worked around this by making DropboxWebAuth do what the templated classes do in dropboxQt's endpoint code — that is, create a std::unique_ptr if an error is detected inside the lambda, then check for it after the QEventLoop exits, and raise it there instead — works fine on both platforms.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant