dotnet / android

.NET for Android provides open-source bindings of the Android SDK for use with .NET managed languages such as C#
MIT License
1.93k stars 532 forks source link

Invalid stack map table at instruction index 177: invokespecial Ljava/lang/IllegalArgumentException;<init>(Ljava/lang/String;)V, error: Unexpected attempt to initialize initialized java.lang.IllegalArgumentException. #9504

Open rupeshhikeup opened 1 month ago

rupeshhikeup commented 1 month ago
Invalid stack map table at instruction index 177: invokespecial Ljava/lang/IllegalArgumentException;<init>(Ljava/lang/String;)V, error: Unexpected attempt to initialize initialized java.lang.IllegalArgumentException. In later version of R8, the method may be assumed not reachable.
Invalid stack map table at instruction index 31: invokespecial Lmy/com/softspace/reader/internal/kernel/c;<init>(Z[B)V, error: Unexpected attempt to initialize initialized my.com.softspace.reader.internal.kernel.c. In later version of R8, the method may be assumed not reachable.
Invalid stack map table at instruction index 497: invokespecial Lcom/discover/mpos/sdk/data/external/ApplicationCandidateData;<init>(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;ZZZZLjava/util/List;)V, error: Unexpected attempt to initialize initialized com.discover.mpos.sdk.data.external.ApplicationCandidateData. In later version of R8, the method may be assumed not reachable.
Invalid stack map table at instruction index 34: invokespecial Lcom/discover/mpos/sdk/cardreader/config/TerminalConfiguration;<init>(Ljava/lang/String;Lcom/discover/mpos/sdk/cardreader/config/TerminalCapabilitiesQualifiers;Lcom/discover/mpos/sdk/cardreader/config/TerminalType;Ljava/lang/String;Ljava/lang/String;Ljava/util/List;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;ILkotlin/jvm/internal/DefaultConstructorMarker;)V, error: Unexpected attempt to initialize initialized com.discover.mpos.sdk.cardreader.config.TerminalConfiguration. In later version of R8, the method may be assumed not reachable.
Invalid stack map table at instruction index 176: invokespecial Lcom/mastercard/terminalsdk/utility/ByteArrayWrapper;<init>([B)V, error: Unexpected attempt to initialize initialized com.mastercard.terminalsdk.utility.ByteArrayWrapper. In later version of R8, the method may be assumed not reachable.
Invalid stack map table at instruction index 1036: invokespecial Ljava/lang/IllegalArgumentException;<init>(Ljava/lang/String;)V, error: Unexpected attempt to initialize initialized java.lang.IllegalArgumentException. In later version of R8, the method may be assumed not reachable.
Invalid stack map table at instruction index 15: invokespecial Ljava/lang/IllegalArgumentException;<init>(Ljava/lang/String;)V, error: Unexpected attempt to initialize initialized java.lang.IllegalArgumentException. In later version of R8, the method may be assumed not reachable.
Invalid stack map table at instruction index 109: invokespecial Ljava/lang/IllegalArgumentException;<init>(Ljava/lang/String;)V, error: Unexpected attempt to initialize initialized java.lang.IllegalArgumentException. In later version of R8, the method may be assumed not reachable.
Invalid stack map table at instruction index 21: invokespecial Ljava/lang/RuntimeException;<init>(Ljava/lang/String;)V, error: Unexpected attempt to initialize initialized java.lang.RuntimeException. In later version of R8, the method may be assumed not reachable.
Invalid stack map table at instruction index 55: ifne L?, error: Could not assign '[uninitialized new, uninitialized new, int]' to '[Initialized(java.lang.IllegalArgumentException), Initialized(java.lang.IllegalArgumentException), int]'. The stack value at index 0 (from top) with 'uninitialized new' not being assignable to 'Initialized(java.lang.IllegalArgumentException)'. In later version of R8, the method may be assumed not reachable.
Invalid stack map table at instruction index 52: invokespecial Ljava/lang/IllegalArgumentException;<init>(Ljava/lang/String;)V, error: Unexpected attempt to initialize initialized java.lang.IllegalArgumentException. In later version of R8, the method may be assumed not reachable.
Invalid stack map table at instruction index 9: invokespecial Ljava/lang/IllegalArgumentException;<init>(Ljava/lang/String;)V, error: Unexpected attempt to initialize initialized java.lang.IllegalArgumentException. In later version of R8, the method may be assumed not reachable.
Invalid stack map table at instruction index 188: invokespecial Landroid/nfc/TagLostException;<init>(Ljava/lang/String;)V, error: Unexpected attempt to initialize initialized android.nfc.TagLostException. In later version of R8, the method may be assumed not reachable.
Invalid stack map table at instruction index 175: ifne L?, error: Could not assign '[uninitialized new, uninitialized new, int]' to '[Initialized(com.mastercard.terminalsdk.exception.L1RSPException), Initialized(com.mastercard.terminalsdk.exception.L1RSPException), int]'. The stack value at index 0 (from top) with 'uninitialized new' not being assignable to 'Initialized(com.mastercard.terminalsdk.exception.L1RSPException)'. In later version of R8, the method may be assumed not reachable.
Invalid stack map table at instruction index 17: invokespecial Lmy/com/softspace/reader/internal/nfc/NfcCommunicatorManager$NfcConnectStatus;<init>(Ljava/lang/String;I)V, error: Unexpected attempt to initialize initialized my.com.softspace.reader.internal.nfc.NfcCommunicatorManager$NfcConnectStatus. In later version of R8, the method may be assumed not reachable.
Invalid stack map table at instruction index 16: invokespecial Lmy/com/softspace/reader/internal/kernel/PaymentNetwork;<init>(Ljava/lang/String;ILjava/lang/String;)V, error: Unexpected attempt to initialize initialized my.com.softspace.reader.internal.kernel.PaymentNetwork. In later version of R8, the method may be assumed not reachable.
Invalid stack map table at instruction index 17: invokespecial Lmy/com/softspace/reader/internal/kernel/ConfigurationBaseKernel$Type;<init>(Ljava/lang/String;I)V, error: Unexpected attempt to initialize initialized my.com.softspace.reader.internal.kernel.ConfigurationBaseKernel$Type. In later version of R8, the method may be assumed not reachable.
Invalid stack map table at instruction index 14: invokespecial Ljava/lang/IllegalArgumentException;<init>(Ljava/lang/String;)V, error: Unexpected attempt to initialize initialized java.lang.IllegalArgumentException. In later version of R8, the method may be assumed not reachable.
Invalid stack map table at instruction index 42: invokespecial Lmy/com/softspace/reader/internal/kernel/Tags;<init>(Ljava/lang/String;ILjava/lang/String;)V, error: Unexpected attempt to initialize initialized my.com.softspace.reader.internal.kernel.Tags. In later version of R8, the method may be assumed not reachable.
Invalid stack map table at instruction index 21: invokespecial Lmy/com/softspace/reader/internal/nfc/NfcCommunicator$ConnectStatus;<init>(Ljava/lang/String;I)V, error: Unexpected attempt to initialize initialized my.com.softspace.reader.internal.nfc.NfcCommunicator$ConnectStatus. In later version of R8, the method may be assumed not reachable.
Invalid stack map table at instruction index 54: ifne L?, error: Could not assign '[Initialized(my.com.softspace.reader.internal.kernel.eftpos.EFTPOSHandler), uninitialized new, uninitialized new, Initialized(java.lang.String[]), Initialized(java.lang.String[]), int]' to '[Initialized(my.com.softspace.reader.internal.kernel.eftpos.EFTPOSHandler), Initialized(java.util.ArrayList), Initialized(java.util.ArrayList), Initialized(java.lang.String[]), Initialized(java.lang.String[]), int]'. The stack value at index 1 (from top) with 'uninitialized new' not being assignable to 'Initialized(java.util.ArrayList)'. In later version of R8, the method may be assumed not reachable.
Invalid stack map table at instruction index 20: invokespecial Lmy/com/softspace/reader/internal/kernelconfig/Tag$TagType;<init>(Ljava/lang/String;I)V, error: Unexpected attempt to initialize initialized my.com.softspace.reader.internal.kernelconfig.Tag$TagType. In later version of R8, the method may be assumed not reachable.
Invalid stack map table at instruction index 37: invokespecial Lmy/com/softspace/reader/internal/kernelconfig/Tag$TagClass;<init>(Ljava/lang/String;I)V, error: Unexpected attempt to initialize initialized my.com.softspace.reader.internal.kernelconfig.Tag$TagClass. In later version of R8, the method may be assumed not reachable.
Invalid stack map table at instruction index 17: invokespecial Lmy/com/softspace/reader/internal/nfc/NfcCommunicatorManager$NfcType;<init>(Ljava/lang/String;I)V, error: Unexpected attempt to initialize initialized my.com.softspace.reader.internal.nfc.NfcCommunicatorManager$NfcType. In later version of R8, the method may be assumed not reachable.

Got the above error while running .net android binding project . Please help to solve this issues

rupeshhikeup commented 1 month ago

Sample_demo.zip

rupeshhikeup commented 1 month ago

I have attached empty project demo with the issues . Can you please have a look and assist me . Note: the native aar file works fine in native android

rupeshhikeup commented 2 weeks ago

Any update on above issues solution

jpobst commented 6 days ago

@jonpryor @jonathanpeppers @grendello I'm not sure where this error is coming from and who to assign this to. Feel free to assign the right person(s).

grendello commented 4 days ago

This is clearly coming from Java, since invokespecial is a Java instruction, but I can't find the error message in any source I grepped. The error messages suggest R8 is involved, @jonathanpeppers, any idea?

jonathanpeppers commented 3 days ago

@rupeshhikeup the error above looks like a build error, coming from the <D8/> or <R8/> task.

I tried and got no build errors:

> dotnet build -bl "D:\Downloads\Sample_demo (1)\Sample_demo\Sample\Sample.csproj"
...
Build succeeded with 235 warning(s) in 29.0s

If this command is failing for you, can you add -bl and share the msbuild.binlog file here? https://aka.ms/binlog

dotnet-policy-service[bot] commented 3 days ago

Hi @rupeshhikeup. We have added the "need-info" label to this issue, which indicates that we have an open question for you before we can take further action. This issue will be closed automatically in 7 days if we do not hear back from you by then - please feel free to re-open it if you come back to this issue after that time.