You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Android <4.3] AOT + SO_MAX=128 limitation leads to crash on start. #1146
OS + Runtime normally load about 65 libraries even before first line of code executes.
Other libs like mscorlib, System.Core, System.Net.Http take other ~20.
If your solution has ~20-25 projects (which isn't too much if you have proper architecture), and has another 10-15 nuget references - app won't load.
Log will contain entries like that, and crash with some DllNotFoundException
D/Mono ( 6456): DllImport error loading library './libUnluckyLibName.so': 'Cannot load library: alloc_info[268]: 195 too many libraries when loading libUnluckyLibName.so'.
There is a cool solution that embeds all .dll files into one app_bundle.so.
If something like that was implemented for AOT mode (for .so files), that would be great.
@Belorus: Looking at your Repro project, even if/when mono supports emitting a single AOT .so for all assemblies, your repro project will still fail, as ClassLibrary1/ClassLibrary1.csproj contains 135 native libraries, none of which can be merged/unified as part of AOT.
It might be more useful to create a repro which actually results in AOT native libraries preventing the launching of the app, not ~arbitrary native libraries packaged with the app.
True, repro only shows the OS limitation and was used to calculate amount of hidden libraries loaded even before user code is run, it isn't a real red/green checker for the issue.
I'll create a proper one a bit later.
Activity
jonpryor commentedon Jan 2, 2018
Upstream feature request: mono/mono#6370
jonpryor commentedon Jan 2, 2018
@Belorus: Looking at your Repro project, even if/when mono supports emitting a single AOT
.sofor all assemblies, your repro project will still fail, asClassLibrary1/ClassLibrary1.csprojcontains 135 native libraries, none of which can be merged/unified as part of AOT.It might be more useful to create a repro which actually results in AOT native libraries preventing the launching of the app, not ~arbitrary native libraries packaged with the app.
Belorus commentedon Jan 2, 2018
True, repro only shows the OS limitation and was used to calculate amount of hidden libraries loaded even before user code is run, it isn't a real red/green checker for the issue.
I'll create a proper one a bit later.
Thanks for quick response!
jpobst commentedon Mar 4, 2021
Given that the minimum supported Android in Xamarin.Android is now 4.4, this no longer seems relevant.