Naios / continuable

C++14 asynchronous allocation aware futures (supporting then, exception handling, coroutines and connections)
https://naios.github.io/continuable/
MIT License
815 stars 44 forks source link

CONTINUABLE_WITH_UNHANDLED_EXCEPTION #36

Closed wenqzheng closed 3 years ago

wenqzheng commented 3 years ago

@Naios

Hello, when I apply a continuable_base to_future(),"Illegal instruction" happens! Then I find it's something about CONTINUABLE_WITH_UNHANDLED_EXCEPTION. Now, I'm confused about CONTINUABLE_WITH_UNHANDLED_EXCEPTION. Why this happen? Thanks!


Commit Hash

{Please write here}

Expected Behavior

{Please write here}

Actual Behavior

{Please write here}

Steps to Reproduce

{Please write here}

Your Environment

Naios commented 3 years ago

Your issue is missing important information such as:

Please make sure to fill the required fields of the issue template. Otherwise your issue can't be processed, thank you in advance.

Also make sure to link against pthread on linux.

Naios commented 3 years ago

Since there was no further activity on this issue I'm marking it as resolved. If you encounter any new bugs or questions open a new issue please.

Spongman commented 1 year ago

I just ran into this and it's caused by allowing unhandled exceptions to leak out of the end of your coroutine chain. this can be avoided by adding final .fail() clause to trap these unhandled exceptions.

Naios commented 1 year ago

@Spongman could you open a separate ticket for this issue please?

Spongman commented 1 year ago

I don't actually think it's an issue in the library. I was just using it wrong (not handling all exceptions correctly), and that was what was causing the Illegal Instruction (which is triggered by CTI_DETAIL_TRAP()) and I wanted to add comment to this issue in case anyone else ran into the same thing.