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

BOOST_NO_EXCEPTIONS feature not building #7725

Open
XITRIX opened this issue Aug 7, 2024 · 2 comments
Open

BOOST_NO_EXCEPTIONS feature not building #7725

XITRIX opened this issue Aug 7, 2024 · 2 comments

Comments

@XITRIX
Copy link

XITRIX commented Aug 7, 2024

Please provide the following information

libtorrent version (or branch): 2.0.10 and RC_2_0

platform/architecture: iOS/arm64 (should be the same for any platform)

compiler and compiler version: xCode 15 / 16Beta

I try to build LibTorrent with BOOST_NO_EXCEPTIONS feature enabled, but looks like the code cannot be build with it.

At least, load_torrent.cpp has std::make_shared<torrent_info>(torrent_file, cfg); function call, which does not exist if BOOST_NO_EXCEPTIONS flag is enabled

I would like to avoid C++/Boost exceptions because in Crashlytics they have no stack trace and it is impossible to understand where crash happened to fix it

Thanks in advance!

@arvidn
Copy link
Owner

arvidn commented Sep 30, 2024

libtorrent no longer supports building without exceptions. The support there was (many years ago by now) was still somewhat broken, where errors were simply not reported when exceptions were disabled.

If you have an unhandled exception, you definitely have the stack trace in your crash handler. The runtime detects whether the exception is handled or not before unwinding the stack.

Once you catch the exception, it's no longer a crash, but intended behavior.

@XITRIX
Copy link
Author

XITRIX commented Sep 30, 2024

My problem with exceptions is that in Crashlytics they reports like this
image

I've already handled a lot of exceptions when I was able to reproduce them with debugger attached to my phone, but I had to add breakpoints to the places where exceptions was going to happen, but when app was already crashed because of exception, there was no any stacktrace like in the screenshot above.

Not sure what is wrong with c++ exception stacktrace on iOS, but I'm stuck with app crashes and I have no idea where it happens to fix it.

Maybe you have any ideas or suggestions how to find the reasons of this exceptions?

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

2 participants