Search Unity

Unity 2017.2 Import Issue (Segfault)

Discussion in 'Linux' started by DevLaTron, Oct 5, 2017.

  1. DevLaTron

    DevLaTron

    Joined:
    Jan 7, 2016
    Posts:
    24
    Hello,

    EDIT: More details in post below, also happens in 2017.2 f3!
    EDIT2: Last post (Pending moderator approval) contains strace of Unity until it hangs/segfaults. In all scenarios (On load or when importing Unity IAP), it seems to endless- loop trying to read a json file.

    SUMMARY: Unity hangs, then segfaults on importing a project with Unity IAP in the Plugins/Folder or when trying to import Unity IAP via the Asset store trying to endlessly access billingmode.json on Ubuntu 16.04 and 17.04, with Linux Unity 2017.2 (f1 and f3) .

    QUICKFIX/WORKAROUND: It seems only deleting BillingMode.json* can fix the issue at least temporarily. After deleting the files and reopening the project, a GIT DIFF between failing and current version shows differences. For debugging purposes a diff was added to the end of the thread.


    Unity on Ubuntu 16.04 crashes when importing/migrating a project from 2017.1 to 2017.2:
    ~$ /opt/Unity/Editor/Unity

    ** (Unity:1463): WARNING **: Couldn't connect to accessibility bus: Failed to connect to socket /tmp/dbus-coRhVzGgFW: Connection refused
    Segmentation fault (core dumped)

    The Editor.log ends like this:

    Unloading 945 Unused Serialized files (Serialized files now loaded: 0)
    System memory in use before: 45.1 MB.
    System memory in use after: 44.8 MB.

    Unloading 902 unused Assets to reduce memory usage. Loaded Objects now: 1361.
    Total: 7.355000 ms (FindLiveObjects: 0.180000 ms CreateObjectMapping: 0.044000 ms MarkObjects: 6.275000 ms DeleteObjects: 0.854000 ms)

    [Unity Package Manager (Upm)] - Application terminated due to HTTP connection being closed on the other end.

    This causes the Editor to Segfault, it seems.

    (Temp and Library have been deleted, this issue still persists when re-importing).

    The project loads and builds with Unity 2017.1 .
     
    Last edited: Oct 13, 2017
    wenderRondonia likes this.
  2. DevLaTron

    DevLaTron

    Joined:
    Jan 7, 2016
    Posts:
    24
    Update:

    - The same happens in Ubuntu 17.04
    - Fresh projects load fine, two older projects do not load. (They work with Unity 2107.* on Windows 7 & Windows 10)
    - Removing the Plugins/ Folder from Assets makes it possible to load the projects again.
    - Only removing the "UnityPurchasing"- Folder seems to work as well.

    - Importing Unity IAP from the Asset store will create a "UnityPurchasing" directory with two unitypackage files.
    - Importing the UnityIAP.unitypackage will ask to update Assemblies. Clicking "No Thanks" will unpack the package.
    - After a short while, the Editor freezes, possible related output:

    Assets/Plugins/UnityPurchasing/script/IAPDemo.cs(516,29): error CS0246: The type or namespace name `UserInfo' could not be found. Are you missing an assembly reference?

    (Filename: Assets/Plugins/UnityPurchasing/script/IAPDemo.cs Line: 516)

    __AnonStorey1 could not be loaded, used in Stores, Version=1.0.6479.31719, Culture=neutral, PublicKeyToken=null
    The class UnityEngine.Purchasing.UnityChannelBindings could not be loaded, used in Stores, Version=1.0.6479.31719, Culture=neutral, PublicKeyToken=null
    The class <ValidateReceipt>c__AnonStorey0 could not be loaded, used in Stores, Version=1.0.6479.31719, Culture=neutral, PublicKeyToken=null
    The class <ConfirmPurchase>c__AnonStorey1 could not be loaded, used in Stores, Version=1.0.6479.31719, Culture=neutral, PublicKeyToken=null
    The class UnityEngine.Purchasing.UnityChannelBindings could not be loaded, used in Stores, Version=1.0.6479.31719, Culture=neutral, PublicKeyToken=null
    The class <ValidateReceipt>c__AnonStorey0 could not be loaded, used in Stores, Version=1.0.6479.31719, Culture=neutral, PublicKeyToken=null
    The class <ConfirmPurchase>c__AnonStorey1 could not be loaded, used in Stores, Version=1.0.6479.31719, Culture=neutral, PublicKeyToken=null
    The class UnityEngine.Purchasing.UnityChannelBindings could not be loaded, used in Stores, Version=1.0.6479.31719, Culture=neutral, PublicKeyToken=null
    The class <ValidateReceipt>c__AnonStorey0 could not be loaded, used in Stores, Version=1.0.6479.31719, Culture=neutral, PublicKeyToken=null
    The class <ConfirmPurchase>c__AnonStorey1 could not be loaded, used in Stores, Version=1.0.6479.31719, Culture=neutral, PublicKeyToken=null
    The class UnityEngine.Purchasing.UnityChannelBindings could not be loaded, used in Stores, Version=1.0.6479.31719, Culture=neutral, PublicKeyToken=null
    The class <ValidateReceipt>c__AnonStorey0 could not be loaded, used in Stores, Version=1.0.6479.31719, Culture=neutral, PublicKeyToken=null
    The class <ConfirmPurchase>c__AnonStorey1 could not be loaded, used in Stores, Version=1.0.6479.31719, Culture=neutral, PublicKeyToken=null
    The class UnityEngine.Purchasing.UnityChannelBindings could not be loaded, used in Stores, Version=1.0.6479.31719, Culture=neutral, PublicKeyToken=null
    The class <ValidateReceipt>c__AnonStorey0 could not be loaded, used in Stores, Version=1.0.6479.31719, Culture=neutral, PublicKeyToken=null
    The class <ConfirmPurchase>c__AnonStorey1 could not be loaded, used in Stores, Version=1.0.6479.31719, Culture=neutral, PublicKeyToken=null
    The class UnityEngine.Purchasing.UnityChannelBindings could not be loaded, used in Stores, Version=1.0.6479.31719, Culture=neutral, PublicKeyToken=null
    The class <ValidateReceipt>c__AnonStorey0 could not be loaded, used in Stores, Version=1.0.6479.31719, Culture=neutral, PublicKeyToken=null
    The class <ConfirmPurchase>c__AnonStorey1 could not be loaded, used in Stores, Version=1.0.6479.31719, Culture=neutral, PublicKeyToken=null
    The class UnityEngine.Purchasing.UnityChannelBindings could not be loaded, used in Stores, Version=1.0.6479.31719, Culture=neutral, PublicKeyToken=null
    The class <ValidateReceipt>c__AnonStorey0 could not be loaded, used in Stores, Version=1.0.6479.31719, Culture=neutral, PublicKeyToken=null
    The class <ConfirmPurchase>c__AnonStorey1 could not be loaded, used in Stores, Version=1.0.6479.31719, Culture=neutral, PublicKeyToken=null
    The class UnityEngine.Purchasing.UnityChannelBindings could not be loaded, used in Stores, Version=1.0.6479.31719, Culture=neutral, PublicKeyToken=null
    The class <ValidateReceipt>c__AnonStorey0 could not be loaded, used in Stores, Version=1.0.6479.31719, Culture=neutral, PublicKeyToken=null
    The class <ConfirmPurchase>c__AnonStorey1 could not be loaded, used in Stores, Version=1.0.6479.31719, Culture=neutral, PublicKeyToken=null
    The class UnityEngine.Purchasing.UnityChannelBindings could not be loaded, used in Stores, Version=1.0.6479.31719, Culture=neutral, PublicKeyToken=null
    The class <ValidateReceipt>c__AnonStorey0 could not be loaded, used in Stores, Version=1.0.6479.31719, Culture=neutral, PublicKeyToken=null
    The class <ConfirmPurchase>c__AnonStorey1 could not be loaded, used in Stores, Version=1.0.6479.31719, Culture=neutral, PublicKeyToken=null
    The class UnityEngine.Purchasing.UnityChannelBindings could not be loaded, used in Stores, VersiUpdating Assets/Plugins/UnityPurchasing/Icons/LinkBlack.png - GUID: 33d3dd2c39dfd49a3b2d36b20225624a...


    - After this, the project will not load again.
    - Removing Plugins/UnityPurchasing fixes the loading issue again.

    - After Removing, reinstalling Unity IAP from the Store and first importing UnityChannel and THEN UnityIAP will for a short time work, then freeze the Editor *AGAIN*, using up 100% CPU.

    Using the Services Window will result in the same issues.
     
  3. DevLaTron

    DevLaTron

    Joined:
    Jan 7, 2016
    Posts:
    24
    Same issue with a new project, fresh download of Unity IAP, except the two subpackages automatically unpack.

    Also tried deleting .config/unity3d and .local/share/unity3d.
     
  4. DevLaTron

    DevLaTron

    Joined:
    Jan 7, 2016
    Posts:
    24
    More debugging... running a strace on Unity once the freeze begins, this loops endlessly until a segfault (at end) occurrs:

    semop(1507329, [{2, -1, SEM_UNDO}], 1) = 0
    semop(1507329, [{2, 1, SEM_UNDO}], 1) = 0
    close(68) = 0
    stat("Assets/Plugins/UnityPurchasing/Resources/BillingMode.json", {st_mode=S_IFREG|0664, st_size=29, ...}) = 0
    lstat("Assets/Plugins/UnityPurchasing/Resources/BillingMode.json", {st_mode=S_IFREG|0664, st_size=29, ...}) = 0
    stat("Assets/Plugins/UnityPurchasing/Resources/BillingMode.json", {st_mode=S_IFREG|0664, st_size=29, ...}) = 0
    lstat("Assets/Plugins/UnityPurchasing/Resources/BillingMode.json", {st_mode=S_IFREG|0664, st_size=29, ...}) = 0
    getcwd("/home/geiger/git/test", 261) = 22
    stat("/home/geiger/git/test/Assets/Plugins/UnityPurchasing/Resources", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
    lstat("/home/geiger/git/test/Assets/Plugins/UnityPurchasing/Resources", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
    stat("Assets/Plugins/UnityPurchasing/Resources/BillingMode.json", {st_mode=S_IFREG|0664, st_size=29, ...}) = 0
    lstat("Assets/Plugins/UnityPurchasing/Resources/BillingMode.json", {st_mode=S_IFREG|0664, st_size=29, ...}) = 0
    stat("Assets/Plugins/UnityPurchasing/Resources/BillingMode.json", {st_mode=S_IFREG|0664, st_size=29, ...}) = 0
    lstat("Assets/Plugins/UnityPurchasing/Resources/BillingMode.json", {st_mode=S_IFREG|0664, st_size=29, ...}) = 0
    open("Assets/Plugins/UnityPurchasing/Resources/BillingMode.json", O_RDONLY) = 68
    fstat(68, {st_mode=S_IFREG|0664, st_size=29, ...}) = 0
    semop(1507329, [{3, -1, SEM_UNDO}], 1) = 0
    semop(1507329, [{2, -1, SEM_UNDO}], 1) = 0
    semop(1507329, [{2, 1, SEM_UNDO}], 1) = 0
    semop(1507329, [{3, 1, SEM_UNDO}], 1) = 0
    semop(1507329, [{2, -1, SEM_UNDO}], 1) = 0
    semop(1507329, [{2, 1, SEM_UNDO}], 1) = 0
    fstat(68, {st_mode=S_IFREG|0664, st_size=29, ...}) = 0
    read(68, "{\"androidStore\":\"GooglePlay\"}", 4096) = 29
    read(68, "", 4096) = 0
    semop(1507329, [{2, -1, SEM_UNDO}], 1) = 0
    semop(1507329, [{2, 1, SEM_UNDO}], 1) = 0
    close(68) = 0
    stat("Assets/Plugins/UnityPurchasing/Resources/BillingMode.json", {st_mode=S_IFREG|0664, st_size=29, ...}) = 0
    lstat("Assets/Plugins/UnityPurchasing/Resources/BillingMode.json", {st_mode=S_IFREG|0664, st_size=29, ...}) = 0
    stat("Assets/Plugins/UnityPurchasing/Resources/BillingMode.json", {st_mode=S_IFREG|0664, st_size=29, ...}) = 0
    lstat("Assets/Plugins/UnityPurchasing/Resources/BillingMode.json", {st_mode=S_IFREG|0664, st_size=29, ...}) = 0
    getcwd("/home/geiger/git/test", 261) = 22
    stat("/home/geiger/git/test/Assets/Plugins/UnityPurchasing/Resources", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
    lstat("/home/geiger/git/test/Assets/Plugins/UnityPurchasing/Resources", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
    stat("Assets/Plugins/UnityPurchasing/Resources/BillingMode.json", {st_mode=S_IFREG|0664, st_size=29, ...}) = 0
    lstat("Assets/Plugins/UnityPurchasing/Resources/BillingMode.json", {st_mode=S_IFREG|0664, st_size=29, ...}) = 0
    stat("Assets/Plugins/UnityPurchasing/Resources/BillingMode.json", {st_mode=S_IFREG|0664, st_size=29, ...}) = 0
    lstat("Assets/Plugins/UnityPurchasing/Resources/BillingMode.json", {st_mode=S_IFREG|0664, st_size=29, ...}) = 0
    open("Assets/Plugins/UnityPurchasing/Resources/BillingMode.json", O_RDONLY) = 68
    fstat(68, {st_mode=S_IFREG|0664, st_size=29, ...}) = 0
    semop(1507329, [{3, -1, SEM_UNDO}], 1) = 0
    semop(1507329, [{2, -1, SEM_UNDO}], 1) = 0
    semop(1507329, [{2, 1, SEM_UNDO}], 1) = 0
    semop(1507329, [{3, 1, SEM_UNDO}], 1) = 0
    semop(1507329, [{2, -1, SEM_UNDO}], 1) = 0
    semop(1507329, [{2, 1, SEM_UNDO}], 1) = 0
    fstat(68, {st_mode=S_IFREG|0664, st_size=29, ...}) = 0
    read(68, "{\"androidStore\":\"GooglePlay\"}", 4096) = 29
    read(68, "", 4096) = 0
    semop(1507329, [{2, -1, SEM_UNDO}], 1) = 0
    semop(1507329, [{2, 1, SEM_UNDO}], 1) = 0
    close(68) = 0
    --- SIGSEGV {si_signo=SIGSEGV, si_code=SEGV_MAPERR, si_addr=0x7fffef683cb8} ---
    --- SIGSEGV {si_signo=SIGSEGV, si_code=SI_KERNEL, si_addr=0} ---
    +++ killed by SIGSEGV (core dumped) +++
    Segmentation fault (core dumped)
     
  5. DevLaTron

    DevLaTron

    Joined:
    Jan 7, 2016
    Posts:
    24
    GIT DIFF for debugging purposes:
    diff --git a/Assets/Plugins/UnityPurchasing/Bin/Stores.dll b/Assets/Plugins/UnityPurchasing/Bin/Stores.dll
    index fb11c0d..7fc68ed 100644
    Binary files a/Assets/Plugins/UnityPurchasing/Bin/Stores.dll and b/Assets/Plugins/UnityPurchasing/Bin/Stores.dll differ
    diff --git a/Assets/Plugins/UnityPurchasing/Resources/BillingMode.json.meta b/Assets/Plugins/UnityPurchasing/Resources/BillingMode.json.meta
    index 69048ae..a2a1adf 100644
    --- a/Assets/Plugins/UnityPurchasing/Resources/BillingMode.json.meta
    +++ b/Assets/Plugins/UnityPurchasing/Resources/BillingMode.json.meta
    @@ -1,12 +1,9 @@
    fileFormatVersion: 2
    guid: afc7e7f9f509ea64a8b6cf1da846125d
    -labels:
    -- gpm
    -- gpm:client:com.google.unity.playgames:google-playgames-plugin
    -- gpm:key:com.google.unity.playgames:google-playgames-plugin:0.9.36
    -timeCreated: 1485356066
    +timeCreated: 1507917427
    licenseType: Free
    TextScriptImporter:
    + externalObjects: {}
    userData:
    assetBundleName:
    assetBundleVariant:
     
  6. nomatter01

    nomatter01

    Joined:
    Dec 22, 2013
    Posts:
    4
    Any News with respect to this bug? I seem to have identical problems here with version 2017.2 f3 on Linux.
     
  7. Tak

    Tak

    Joined:
    Mar 8, 2010
    Posts:
    1,001
    Sorry for the delay.
    We're investigating - thanks for your patience.
     
    wenderRondonia likes this.
  8. DevLaTron

    DevLaTron

    Joined:
    Jan 7, 2016
    Posts:
    24
    @Tak If you need any more in depth debugging, feel free to message me.
     
  9. nomatter01

    nomatter01

    Joined:
    Dec 22, 2013
    Posts:
    4
    @Tak Thx. I can also provide debugging/testing if needed.
     
  10. wenderRondonia

    wenderRondonia

    Joined:
    Mar 15, 2015
    Posts:
    29
    Removing Unity Purchasing also solved my case!

    Ubuntu 16.04 version 2017.2 f3
     
    Last edited: Oct 27, 2017
  11. tmarki

    tmarki

    Joined:
    May 10, 2015
    Posts:
    4
    One more confirmation, sadly I cannot implement IAP in my game on the Linux editor. Waiting for an update.
     
    wenderRondonia likes this.
  12. mprr

    mprr

    Joined:
    Nov 25, 2017
    Posts:
    1
    Same issue, downgraded to 2017.1.0xf3Linux, with 2017.1.2f1 having the bug too