-
Notifications
You must be signed in to change notification settings - Fork 71
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
WinRT method throws RaiseFailFastException #110
Comments
@azimuthdeveloper To me this looks like one of the exceptions I am trying to prevent in the PR I have up. (I am not sure, what the contribution process is.)
Basically at this My understanding is that the only real way to handle it is a try/catch like in that PR. If the state of the system changes before that call returns, like a device loses connectivity, then it can throw. |
There is a second way it can fail in the same method, which I wrote up here: #104 |
Any proposal on notifying Dart side Now we only notify quick_blue/quick_blue/android/src/main/kotlin/com/example/quick_blue/QuickBluePlugin.kt Lines 140 to 155 in 973784e
|
I do not have a proposal yet. I can look into it next weekend though and see if I can come up with something. I am new to Flutter, so I need to do some more learning about method channels. It looks like they support async messaging, but I need to learn more about it and do some experimentation. |
Feell free to take advantage of
quick_blue/quick_blue/android/src/main/kotlin/com/example/quick_blue/QuickBluePlugin.kt Line 37 in 973784e
quick_blue/quick_blue_windows/windows/quick_blue_windows_plugin.cpp Lines 176 to 179 in 973784e
|
That's okay @kinyoklion , I'm new to C++, only because of Windows integration for Flutter am I getting into it haha. I think with me having a production-ish app using this package and good crash reporting set up, we can hopefully work towards the stability of |
It seems like the ideal for a user would be if they could call a method and handle errors from that method. The way the method channels work it should be possible to provide a return later in the process from within an async method. For the windows implementation, because it uses coroutines (stays on the same thread), this should just be a matter of moving the result to the async method and then calling Success/Error once we know the result. Then a user can use chaining I put a quick example commit together: f6d26f1 Output for the code in the example
I've not looked at the mac/ios code yet, but typically callbacks for results are on the main thread, so maintaining a reference to the result object and then calling the result later should work similarly. Anyway, I want thoughts before I work through it too much more. |
Yep. The main concern is multi-thread handling of
If you're sure about the multi-thread handling, I'm OK with that PR |
I'm not sure about C++ coroutines, especially experimental coroutine support of C++/WinRT patched onto C++ 17
|
Sometimes, quick_blue will throw an error in the WinRT code. This causes the app to crash to desktop.
I've managed to get logging working with my app, so I've got a really good stacktrace of the error here: https://sentry.io/share/issue/07424e3a35e147db9ec78707d2e54678/
Unfortunately, I lack the C++ knowledge to work out why this is happening, but I thought maybe @Sunbreak or @kinyoklion would be able to use this stacktrace to possibly debug and fix the issue, and make quick_blue more stable for all 😊
The text was updated successfully, but these errors were encountered: