Weird Issue with Garbage Collection

Topics: Bugs
Jul 30, 2011 at 1:18 PM
Edited Jul 30, 2011 at 1:40 PM

I'm having a really strange issue that I'm having trouble nailing down the exact cause of.

What I'm seeing is that I have a page (that is four pages into the navigation stack) that invokes a CameraCaptureTask using the new EventAggregator in 1.1. Once that task is complete I press the hardware back button two times, at this point I would expect the application to be displaying the second page in the stack, however at that point that app crashes (with no exception) to the application list screen.

I've narrowed the line that causes this to the GC.Collect call in FrameAdapter.OnNavigated but I really have no idea why. Commenting out the Garbage Collection fixes the issues.

I've tried simplifying the code, removing the EventAggregator entirely and just invoking "new CameraCaptureTask().Show()" (and therefore skipping the handler code as well) still causes the same problem.

I'm truly perplexed by this one, it appears as if the entire application is being garbage collected. Why it's the second page back after the task I have no idea about sorry.

Edit: I've also found the replacing the CameraCaptureTask with PhotoChooserTask also prevents collection.

Coordinator
Jul 30, 2011 at 4:21 PM

I think this is the same as the following issue: http://caliburnmicro.codeplex.com/workitem/143

I'll probably just remove the call to GC.Collect. But, I'd love to know what is really happening there. Let me know if you find out anything more.

Jul 30, 2011 at 8:02 PM

Is this on 7712?