Xamarin-CrossDownloadManager icon indicating copy to clipboard operation
Xamarin-CrossDownloadManager copied to clipboard

[Android] Error Code : 2062 (SQLITE_CANTOPEN_EMFILE)

Open RuddyOne opened this issue 6 years ago • 2 comments
trafficstars

Steps to reproduce

  1. Queue a lot image files (jpg/pngs) (400+)

Expected behavior

It downloads all files added to the queue

Actual behavior

Crash on the following line:

 _downloadManager.Start(file, false);

that throws the following error:

unable to open database file (code 2062)
#################################################################
Error Code : 2062 (SQLITE_CANTOPEN_EMFILE)
Caused By : Application has opened too many files. Maximum of available file descriptors in one process is 1024 in default.
	(unable to open database file (code 2062))
#################################################################

Configuration

Platform:

  • [ ] iOS
  • [x] Android
  • [ ] UWP
  • [ ] Other

Device:

  • [ ] Simulator
  • [X] Samsung Galaxy Tab S4

Sometimes this can cause android.process.media to crash.

RuddyOne avatar May 21 '19 14:05 RuddyOne

Strongly related to #24. Because you only experience it on Android, I'd blame it on the native implementation.

As a solution I propose to start on #34. I won't have time to take it on. Please let me know if you are and I'll provide you with the needed insights to this library to get the implementation straight.

SimonSimCity avatar May 22 '19 06:05 SimonSimCity

@SimonSimCity It does appear to be Android crashing on this one.

I may have to start looking into #34. Any info you can give me would be a great help, both iOS and UWP downloader do not have issues within these plugins so I would like to keep it all together if possible.

RuddyOne avatar May 23 '19 14:05 RuddyOne