Search Unity

  1. Unity Asset Manager is now available in public beta. Try it out now and join the conversation here in the forums.
    Dismiss Notice

Bug Missing method on IL2CPP build

Discussion in '2021.2 Beta' started by Kunnogi, Jun 15, 2021.

  1. wbourchier

    wbourchier

    Joined:
    Feb 4, 2018
    Posts:
    6
    Thanks @JoshPeterson, I have submitted a bug report (1398042), with the below details.

    -------------------------------------------------------------------------------------------------------------------------------------------------

    "Sqlite - Missing method on IL2CPP builds Android and iOS

    This bug is discussed here: https://forum.unity.com/threads/missing-method-on-il2cpp-build.1126085/#post-7828335

    1. What happened
    Android and iOS il2cpp builds using Sqlite libraries will not launch due to missing method exception (known to affect 2021.2.7 and 2021.2.8) - see below stacktrace:

    2022-01-25 15:12:35.474 17872-17893/? E/Unity: MissingMethodException: System.Runtime.InteropServices.Marshal::SetLastWin32Error(System.Int32)
    at System.Runtime.InteropServices.CriticalHandle.Cleanup () [0x00000] in <00000000000000000000000000000000>:0
    at Mono.Data.Sqlite.SqliteStatement.Dispose () [0x00000] in <00000000000000000000000000000000>:0
    at Mono.Data.Sqlite.SqliteCommand.ClearCommands () [0x00000] in <00000000000000000000000000000000>:0
    at Mono.Data.Sqlite.SqliteCommand.set_CommandText (System.String value) [0x00000] in <00000000000000000000000000000000>:0
    at Mono.Data.Sqlite.SqliteConnection.Open () [0x00000] in <00000000000000000000000000000000>:0
    at sqltest.Start () [0x00000] in <00000000000000000000000000000000>:0

    2. How can we reproduce it using the example you attached
    To reproduce use the attached SQLite test project, it contains 2 things:

    1) a small sqltest script that creates a database, opens a database connection, creates a table and inserts some values into that table.
    2) SQLite plugins for different platforms and cpu archirtectures

    The player settings for android are set to build using il2cpp for android and ARM64 as the target architecture, when the build is launched it will error.

    Before upgrading to 2021.2.8 this worked on 2020.1.9."
     
    pKallv likes this.
  2. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    6,930
  3. wbourchier

    wbourchier

    Joined:
    Feb 4, 2018
    Posts:
    6
    Thanks for letting us know, that in all likelihood looks to be the same bug, will keep an eye out in future releases :).
     
  4. pKallv

    pKallv

    Joined:
    Mar 2, 2014
    Posts:
    1,191
    Thanks Josh,
    Google removed my non-free app by mistake a couple of weeks ago and I cannot upload it again due to this bug so can you please predict in what release and when this will be fixed?

    I did follow the work-around regarding IOS but still cannot upload Android @ Unity 2021.2.8f1

    Well I know we all seen it but here is my current error:
    Code (CSharp):
    1. 2022/01/27 15:39:26.297 28004 28099 Error Unity MissingMethodException: System.Runtime.InteropServices.Marshal::SetLastWin32Error(System.Int32)
    2. 2022/01/27 15:39:26.297 28004 28099 Error Unity   at System.Runtime.InteropServices.CriticalHandle.Cleanup () [0x00000] in <00000000000000000000000000000000>:0
    3. 2022/01/27 15:39:26.297 28004 28099 Error Unity   at Mono.Data.Sqlite.SqliteStatement.Dispose () [0x00000] in <00000000000000000000000000000000>:0
    4. 2022/01/27 15:39:26.297 28004 28099 Error Unity   at Mono.Data.Sqlite.SqliteCommand.ClearCommands () [0x00000] in <00000000000000000000000000000000>:0
    5. 2022/01/27 15:39:26.297 28004 28099 Error Unity   at Mono.Data.Sqlite.SqliteCommand.set_CommandText (System.String value) [0x00000] in <00000000000000000000000000000000>:0
    6. 2022/01/27 15:39:26.297 28004 28099 Error Unity   at Mono.Data.Sqlite.SqliteConnection.Open () [0x00000] in <00000000000000000000000000000000>:0
    7. 2022/01/27 15:39:26.297 28004 28099 Error Unity   at FQ_Database.ReadDatabaseNS.CreateDiffQueues (System.Int32 _nrOfPlayers, System.Int32 _nrOfQuestions, System.Boolean _allRecords, System.Boolean _obsoleteCheck, System.Boolean p0VeryEasy, System.Boolean p0Easy, System.Boolean p0Medium, System.Boolean p0Hard, System.Boolean p0Professor, System.Boolean p1VeryEasy, System.Boolean p1Easy, System.Boolean p1Medium, System.Boolean p1Hard
    8.  
     
    Last edited: Jan 27, 2022
  5. pKallv

    pKallv

    Joined:
    Mar 2, 2014
    Posts:
    1,191
  6. Baydogan

    Baydogan

    Joined:
    Mar 22, 2018
    Posts:
    54
    I have tested, the bug still exists on version 2021.2.9f1
     
    pKallv likes this.
  7. pKallv

    pKallv

    Joined:
    Mar 2, 2014
    Posts:
    1,191
    hmmm not good
     
  8. pKallv

    pKallv

    Joined:
    Mar 2, 2014
    Posts:
    1,191
    I also tried with the same result as you. Hmmm not being able to upload the build error should be a top priority issue IMHO.
     
  9. LeonhardP

    LeonhardP

    Unity Technologies

    Joined:
    Jul 4, 2016
    Posts:
    3,136
    The fix that @JoshPeterson mentioned just landed in the 2021.2 branch and should be in 2021.2.11f1.
     
    jacksonkr and pKallv like this.
  10. pKallv

    pKallv

    Joined:
    Mar 2, 2014
    Posts:
    1,191
    Just saw the 2021.2.11f1 in the hub but no release notes, anyone tested if the problem is solved?
     
    jacksonkr likes this.
  11. LeonhardP

    LeonhardP

    Unity Technologies

    Joined:
    Jul 4, 2016
    Posts:
    3,136
    Thanks for highlighting this. The release notes have been updated and this fix should be mentioned now.
     
    jacksonkr and Baydogan like this.
  12. Baydogan

    Baydogan

    Joined:
    Mar 22, 2018
    Posts:
    54
    Wow more than
    241 days
    and it is finally solved.

    Thanks for the fix :)

     
    jacksonkr likes this.
  13. pKallv

    pKallv

    Joined:
    Mar 2, 2014
    Posts:
    1,191
    Yes I just tested and now I can get my app uploaded again. Problem is that Google took it down by mistake prior to Christmas and then asked me to upload immediately. I, and probably others, have lost revenue on this bug taking so long time to fix and I guess no-one is going to compensate me for that..

    Anyhow, thanks Unity.