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
Can not Export CREATOR Field for IParcelable instance #1149
@fullmetaltac: Does this happen in the Debug configuration or when linking is disabled?
@radekdoulik: I suspect that this is a linker bug, and that Player.InitializeCreator() is being linked away, which would explain why it can't be found.
@jonpryor I tried with Visual Studio Tools for Xamarin v4.9.0.669 and v4.8.0.753 both with Release and Debug configurations. I tested on real device Xiaomi Redmi 3S (v6.0.1) and with Nexus One (API:27) emulator. Result the same in each case.
Here is crash info from device. The same error I was getting spontaneously and was not able to write concrete steps to reproduce. This error getting periodically and I hope has the same root cause.
I also doubt that it's dotnet/java-interop@429dc2a, as the bug is reported against d15-6, and the referenced Java.Interop commit should only be in d15-7/master, not d15-6. (At least it better not be in d15-6; I wanted it to get more testing!)
In particular, Creator<T> does not implement IJniNameProviderAttribute -- nor should it.
If the TypeDefinition (typeof(Creator<>)) does not implement IJniNameProviderAttribute, then JavaNativeTypeManager.ToJniNameFromAttributes(TypeDefinition) will return null, which means JavaNativeTypeManager.ToJniName(TypeDefinition) will return java/lang/Object, which explains the new signature you're seeing for InitializeCreator().
Activity
jonpryor commentedon Jan 2, 2018
This does not crash on d15-5/Xamarin.Android 8.1.
@fullmetaltac: Does this happen in the Debug configuration or when linking is disabled?
@radekdoulik: I suspect that this is a linker bug, and that
Player.InitializeCreator()is being linked away, which would explain why it can't be found.Could this be related to PR #1059?
fullmetaltac commentedon Jan 3, 2018
@jonpryor I tried with Visual Studio Tools for Xamarin v4.9.0.669 and v4.8.0.753 both with Release and Debug configurations. I tested on real device Xiaomi Redmi 3S (v6.0.1) and with Nexus One (API:27) emulator. Result the same in each case.
Here is crash info from device. The same error I was getting spontaneously and was not able to write concrete steps to reproduce. This error getting periodically and I hope has the same root cause.

fullmetaltac commentedon Jan 3, 2018
@jonpryor Should I close this duplicate?
dotnet/android-samples#254
radekdoulik commentedon Jan 8, 2018
Looks like it is not Linker related. Happens in Debug configuration as well.
I will try to find out why it fails.
radekdoulik commentedon Jan 8, 2018
@jonathanpeppers Looks like it might be related to dotnet/java-interop@429dc2a
Do you know what might be wrong here? Looks like we might be looking for wrong signature?
jonpryor commentedon Jan 8, 2018
@radekdoulik: @jonathanpeppers is OOF until ~march, so don't expect much from him. :-)
I also doubt that it's dotnet/java-interop@429dc2a, as the bug is reported against d15-6, and the referenced Java.Interop commit should only be in d15-7/master, not d15-6. (At least it better not be in d15-6; I wanted it to get more testing!)
I don't see that commit in https://github.com/xamarin/Java.Interop/commits/d15-6.
@radekdoulik: Do you have any additional information to bring to the table?
radekdoulik commentedon Jan 8, 2018
@jonpryor Indeed. Another candidate might be dotnet/java-interop@cb161d2
Trying to find out more about it.
radekdoulik commentedon Jan 8, 2018
The above mentioned commit indeed caused the regression.
The signature for the
InitializeCreatorsignature is now()Ljava/lang/Object;while it was()Lmd59b7a7576784821ea63294fbca8600da1/Creator_1;before.jonpryor commentedon Jan 8, 2018
@radekdoulik: I think I have a theory. Consider
JavaNativeTypeManager.ToJniNameFromAttributes(TypeDefinition). What happens if theTypeDefinitiondoes not implementIJniNameProviderAttribute?In particular,
Creator<T>does not implementIJniNameProviderAttribute-- nor should it.If the
TypeDefinition(typeof(Creator<>)) does not implementIJniNameProviderAttribute, thenJavaNativeTypeManager.ToJniNameFromAttributes(TypeDefinition)will returnnull, which meansJavaNativeTypeManager.ToJniName(TypeDefinition)will returnjava/lang/Object, which explains the new signature you're seeing forInitializeCreator()....which doesn't actually make sense; shouldn't the
IJavaObjectcheck inJavaNativeTypeManager.ToJniName(TypeDefinition, ExportKind)catchCreator<T>? In which case we should be hittingToJniName<T>(), which should create themd5.../Creator_1name.More digging is needed. :-(
[Java.Interop] Fix JNI signature generating
[Java.Interop] Fix JNI signature generating
[Java.Interop] Fix JNI signature generation (#249)
Bump to Java.Interop/master/d8862d89
Bump to Java.Interop/d15-6/eb6e3c4f
Bump to Java.Interop/master/d8862d89 (#1166)
Bump to Java.Interop/d15-6/eb6e3c4f (#1167)
fullmetaltac commentedon Jan 9, 2018
Fix Verified. Issue in not reproduced.
MP91 commentedon Nov 14, 2019
Hi @ALL!
I am using Visual Studio for Mac and still have this error. I am on the latest stable release (16-3).
Is there anything I have to do?
Bump to xamarin/monodroid@ad19471 (#5508)
[Java.Interop] Fix JNI signature generation (#249)
[Java.Interop] Fix JNI signature generation (dotnet#249)