Bug 40847 - Crash when pusing fast
Summary: Crash when pusing fast
Status: RESOLVED NORESPONSE
Alias: None
Product: Forms
Classification: Xamarin
Component: Forms ()
Version: 2.2.0
Hardware: PC Windows
: --- normal
Target Milestone: ---
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2016-05-04 02:51 UTC by Alexander Bakanov
Modified: 2017-06-19 16:33 UTC (History)
6 users (show)

Tags:
Is this bug a regression?: ---
Last known good build:

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.


Please create a new report on Developer Community or GitHub with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:
Status:
RESOLVED NORESPONSE

Description Alexander Bakanov 2016-05-04 02:51:59 UTC
Hello, looks like I found the bug in the xamarin forms navigator. Tested it on android (4.4.4 KitKat).

I'am using ZXing.Forms component to scan barcodes, so I wrote wrapper for scanning it returns the scan result, but the bug isn't into ZXing component, look:

1.var result = await App.FastScan();
2.
3.var item = await DepotManager.GetItem(result.Item2);
4.var page = new ScannedItemPage(item);
5.//await page.FadeTo(1.0, 500);
6.await Navigation.PushAsync(page);

App.FastScan - creating new MobileBarcodeScanner() and scanning the barcode, that's right, I can get result, and go further, call the DepotManager.GetItem(itemBarcode), it asking network for info from server then caching result, then creating new Page for item representation and pushing it.

If the GetItem() calling slow (awaiting for network result e.t.c) then it's okay, I see ScannedItemPage, but after caching GetItem() doesn't waiting, returning item immediately from cache and I get exception:

"Can not perform this action after onSaveInstanceState".

It happens ONLY if I calling 6th line, also if I'll uncommend 5th line (actually waiting 0.5s) then it's okay too, I'll not get a crash. 

Please, help me, what I'am doing wrong? 

Best regards,
Alex.
Comment 1 Paul DiPietro [MSFT] 2016-05-04 14:25:06 UTC
A minimized reproduction project would be very much appreciated in helping to investigate this issue.
Comment 2 Alexander Bakanov 2016-05-04 15:26:33 UTC
Uploaded reproduce project:

https://www.dropbox.com/s/auugd911ldeelaq/bug40847reproduce.zip?dl=0
Comment 3 Rui Marinho 2016-07-04 17:22:50 UTC
404 on that dropbox link
Comment 4 Samantha Houts [MSFT] 2016-09-23 17:38:10 UTC
@Alexander Bakanov,

Are you still experiencing this issue, and if so, are you able to resend the reproduction project?

Warm regards,
Xamarin Forms Team
Comment 5 Chris Hardy [MSFT] 2017-06-19 16:33:04 UTC
Because we have not received a reply to our request for more information we are closing this issue. If you are still encountering this issue, please reopen the ticket with the requested information. Thanks!