microsoft / project-rome

Code samples and documentation of Microsoft's Project Rome SDK
https://aka.ms/projectrome
Creative Commons Attribution 4.0 International
447 stars 99 forks source link

NearShare sample crashed after send completed #85

Open xingrz opened 4 years ago

xingrz commented 4 years ago

Version: com.microsoft.connecteddevices:connecteddevices-sdk:1.5.0

Log:

W/System.err: java.lang.NoSuchMethodError: no non-static method "Lcom/microsoft/connecteddevices/remotesystems/commanding/nearshare/NearShareSenderEnumAsyncOperation;.complete(ILjava/lang/String;)V"
E/libc++abi: terminating with uncaught exception of type ConnectedDevices::WrappedPlatformSpecificException
A/libc: Fatal signal 6 (SIGABRT), code -6 (SI_TKILL) in tid 13844 (Thread-53), pid 13747 (vices.nearshare)

Inspecting the NearShareSenderEnumAsyncOperation class, there's only a method void complete(int value). Not anything like void complete(int value, String foo).

Tested com.microsoft.connecteddevices:connecteddevices-sdk:1.3.0 is ok but broken since 1.3.2.

cmknox commented 4 years ago

@xingrz Thank you for the information. I've created a bug and we will be investigating.

ShortDevelopment commented 2 years ago

I'm currently experiencing the same bug with version 1.6.1 (Using a Xamarin.Android binding created from the aar file)

[System.err] java.lang.NoSuchMethodError: no non-static method "Lcom/microsoft/connecteddevices/remotesystems/commanding/nearshare/NearShareSenderEnumAsyncOperation;.complete(ILjava/lang/String;)V"
[libc++abi] terminating with uncaught exception of type ConnectedDevices::WrappedPlatformSpecificException

EDIT This error occurs because the c++ „backend” tries to call a non-existing java method via JNI. You can quite easily patch the java bytecode of this lib (See linked issue below)…