Xamarin.Forms DisplayAlert exception handling issue on Windows 8.1

DanKloDanKlo USUniversity ✭✭

Hi there,

the issue I'm trying to solve is exception handling when DisplayAlert is invoked after alert is already displayed. Debugger is catching System.UnauthorizedAccessException but I cannot catch that exception myself. I have created demo project to demonstrate the issue. I have created dependency which is very simplified version of Xamarin.Forms.Page.DisplayAlert task. My question is if there is any way to avoid using dependency service and handle exceptions thrown inside DisplayAlert task?

Demo project

Posts

  • huangjinshehuangjinshe USMember ✭✭✭

    Same as it? https://bugzilla.xamarin.com/show_bug.cgi?id=43469

    please tell them you have this issue on windows 8.1 (just leave a comment in it)

  • DanKloDanKlo USUniversity ✭✭

    Thanks @huangjinshe, reported

    @huangjinshe said:
    Same as it? https://bugzilla.xamarin.com/show_bug.cgi?id=43469

    please tell them you have this issue on windows 8.1 (just leave a comment in it)

  • huangjinshehuangjinshe USMember ✭✭✭
    edited December 2016

    @DanielKlokov said:
    Thanks @huangjinshe, reported

    @huangjinshe said:
    Same as it? https://bugzilla.xamarin.com/show_bug.cgi?id=43469

    please tell them you have this issue on windows 8.1 (just leave a comment in it)

    The final step is that you need to blame about it in this forums everywhere, :smiley: . Because as you see I was report it on August but until now....

    The Windows of Xamarin.Forms team fix BUG speed very very slow....

  • huangjinshehuangjinshe USMember ✭✭✭
    edited December 2016

    So I give you another advice for fix this problem temporarily, just create a Queue

    private Queue<MessageBoxInfo> MsgList = new Queue<MessageBoxInfo>();

    After finish display one check another one, because that's how I do in this few months. Don't wait Xamarin.Forms for fix this, it will let you old, really.

    The MessageBoxInfojust a class for save your alert message info, include something like: title, content, command...etc.

  • DanKloDanKlo USUniversity ✭✭

    @huangjinshe thanks for advice. The issue is not about crashing the app but about handling exception thrown inside DisplayAlert task which I would like to be able to handle. My demo project which demonstrates the issue includes dependency implementation which enables me to handle exception. But I would like to use default Xamarin.Forms solution instead of using dependency service.

    @huangjinshe said:
    So I give you another advice for fix this problem temporarily, just create a Queue

    private Queue<MessageBoxInfo> MsgList = new Queue<MessageBoxInfo>();

    After finish display one check another one, because that's how I do in this few months. Don't wait Xamarin.Forms for fix this, it will let you old, really.

    The MessageBoxInfojust a class for save your alert message info, include something like: title, content, command...etc.

Sign In or Register to comment.