CartoDB / mobile-sdk

CARTO Mobile SDK core project
https://carto.com/docs/carto-engine/mobile-sdk/
BSD 3-Clause "New" or "Revised" License
184 stars 65 forks source link

Application Hang when navigating back in UWP Xamarin.Forms #495

Closed l4nk4b3l closed 2 years ago

l4nk4b3l commented 2 years ago

Hi,

i have an app with two pages. The first page shows the MapView and has a button to navigate to the second page. The second page has just a button to navigate back to the first page.

Sometimes the app gets stuck after navigating back from the second page. The problem seems to happen more often on slow hardware. But i do not have a safe way to reproduce this problem.

I already tried to debug this issue but all i can say is the following.

There are two threads. Thread#1 is waiting for signal https://github.com/CartoDB/mobile-sdk/blob/master/winphone/csharp/UI/MapView.cs#L257 Thread#2 is waiting for lock (_renderSurfaceLock) to release. https://github.com/CartoDB/mobile-sdk/blob/master/winphone/csharp/UI/MapView.cs#L209

Here is a sample app where i can reproduce this problem sometimes. SampleApp.zip

Another way to reproduce this problem seems to be the following:

  1. Start the app
  2. Navigate to second Page
  3. Set a Breakpoint on https://github.com/CartoDB/mobile-sdk/blob/master/winphone/csharp/UI/MapView.cs#L174
  4. Wait for about 15 to 20 seconds
  5. Resume app
  6. App is hanging.

Plattform: UWP CartoMobileSDK.UWP: 4.4.5

mtehver commented 2 years ago

@l4nk4b3l Indeed, I managed to reproduce this. The sample and instructions you provided were very helpful, thanks. Will fix this in SDK 4.4.6, first RC is planned for the end of May.

mtehver commented 2 years ago

@l4nk4b3l 4.4.6-rc.1 is now released and includes a fix for this.

l4nk4b3l commented 2 years ago

Thank you! The Issue seems to be solved!