Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Bug / Crash  Importing Obi Rope in Unity 2020.1.0b1 fails
#1
Hello everybody,

System: macOS 10.15.13
Unity: 2020.1.0b1
Obi Rope: 5.1.0

I just tried to import Obi Rope 5.1.0 through the Package Manager. It start's normal with the import progress bar. Unity then asks after a while if it can do an "API Update" (it doesn't matter if I click "no thanks" or "Go Ahead!") and a couple of seconds after that, the Unity window just vanishes. I checked the Editor.log file and it ends with the following lines: 
Code:
Start importing Assets/Obi/Samples/RopeAndRod/SampleResources/Blueprints/Tearable cable.asset using Guid(61d053dd5abd943919947f833abd0569) Importer(-1,00000000000000000000000000000000) Serialization depth limit 7 exceeded at 'Obi::ObiConstraints`1.actor'. There may be an object composition cycle in one or more of your serialized classes.

Serialization hierarchy:
8: Obi::ObiConstraints`1.actor
7: Obi::ObiConstraints`1.source
6: Obi::ObiConstraints`1.source
5: Obi::ObiConstraints`1.source
4: Obi::ObiConstraints`1.source
3: Obi::ObiConstraints`1.source
2: Obi::ObiConstraints`1.source
1: Obi::ObiConstraints`1.source

(Filename: ./Runtime/Mono/SerializationBackend_DirectMemoryAccess/ShouldTransferField.cpp Line: 121)

Stack overflow in unmanaged: IP: 0x14532690c, fault addr: 0x7ffeea7a8ff8
Stack overflow in unmanaged: IP: 0x14540456d, fault addr: 0x7ffeea7a6ff8
Stack overflow in unmanaged: IP: 0x10673fea1, fault addr: 0x7ffeea7a5ff0
Stack overflow in unmanaged: IP: 0x10570a50e, fault addr: 0x7ffeea7a4ff8
Stack overflow in unmanaged: IP: 0x106755031, fault addr: 0x7ffeea7a3fc8
Stack overflow in unmanaged: IP: 0x145326237, fault addr: 0x7ffeea7a2f98
Stack overflow in unmanaged: IP: 0x145326914, fault addr: 0x7ffeea7a1ff8
Stack overflow: IP: 0x10570a621, fault addr: 0x7ffeea79ffac
Stacktrace:
[Unity Package Manager (Upm)]
Parent process [5067] was terminated

After that, I cannot open the project (it crashes while importing) until I manually delete the Obi folder from the assets folder not using Unity.

Unchecking "Tearable Cable.asset" before importing also leads to a crash, where the offending asset seems to be 
Assets/Obi/Samples/RopeAndRod/SampleResources/Blueprints/Crane.asset

After that, I didn't investigate this further. I hope this is useful for troubleshooting this issue.

Thanks!
Reply
#2
(13-03-2020, 10:44 AM)fiasko Wrote: Hello everybody,

System: macOS 10.15.13
Unity: 2020.1.0b1
Obi Rope: 5.1.0

I just tried to import Obi Rope 5.1.0 through the Package Manager. It start's normal with the import progress bar. Unity then asks after a while if it can do an "API Update" (it doesn't matter if I click "no thanks" or "Go Ahead!") and a couple of seconds after that, the Unity window just vanishes. I checked the Editor.log file and it ends with the following lines: 
Code:
Start importing Assets/Obi/Samples/RopeAndRod/SampleResources/Blueprints/Tearable cable.asset using Guid(61d053dd5abd943919947f833abd0569) Importer(-1,00000000000000000000000000000000) Serialization depth limit 7 exceeded at 'Obi::ObiConstraints`1.actor'. There may be an object composition cycle in one or more of your serialized classes.

Serialization hierarchy:
8: Obi::ObiConstraints`1.actor
7: Obi::ObiConstraints`1.source
6: Obi::ObiConstraints`1.source
5: Obi::ObiConstraints`1.source
4: Obi::ObiConstraints`1.source
3: Obi::ObiConstraints`1.source
2: Obi::ObiConstraints`1.source
1: Obi::ObiConstraints`1.source

(Filename: ./Runtime/Mono/SerializationBackend_DirectMemoryAccess/ShouldTransferField.cpp Line: 121)

Stack overflow in unmanaged: IP: 0x14532690c, fault addr: 0x7ffeea7a8ff8
Stack overflow in unmanaged: IP: 0x14540456d, fault addr: 0x7ffeea7a6ff8
Stack overflow in unmanaged: IP: 0x10673fea1, fault addr: 0x7ffeea7a5ff0
Stack overflow in unmanaged: IP: 0x10570a50e, fault addr: 0x7ffeea7a4ff8
Stack overflow in unmanaged: IP: 0x106755031, fault addr: 0x7ffeea7a3fc8
Stack overflow in unmanaged: IP: 0x145326237, fault addr: 0x7ffeea7a2f98
Stack overflow in unmanaged: IP: 0x145326914, fault addr: 0x7ffeea7a1ff8
Stack overflow: IP: 0x10570a621, fault addr: 0x7ffeea79ffac
Stacktrace:
[Unity Package Manager (Upm)]
Parent process [5067] was terminated

After that, I cannot open the project (it crashes while importing) until I manually delete the Obi folder from the assets folder not using Unity.

Unchecking "Tearable Cable.asset" before importing also leads to a crash, where the offending asset seems to be 
Assets/Obi/Samples/RopeAndRod/SampleResources/Blueprints/Crane.asset

After that, I didn't investigate this further. I hope this is useful for troubleshooting this issue.

Thanks!

ObiConstraint's "source" member variable is protected and generic. So it should not be serialized under any circumstances. Unity complaining about a serialization loop in something that is not serialized (not marked for serialization, and even if it were, not serializable at all) is very probably a bug.

So it looks like a bug in Unity to me. Given that 2020 is still in beta this is not surprising. Same package in 2019.2 or 2019.3 imports and works just fine.
Reply
#3
Alright, understood. But how should we go about this so that this bug is addressed? Should I file a bug report, also sending "Tearable cable.asset" although this part of your paid asset? Am I allowed to do so? Would you rather do that, being able to better explain what's behind this?
Reply
#4
(13-03-2020, 01:37 PM)fiasko Wrote: Alright, understood. But how should we go about this so that this bug is addressed? Should I file a bug report, also sending "Tearable cable.asset" although this part of your paid asset? Am I allowed to do so? Would you rather do that, being able to better explain what's behind this?

Hi,

Tearable cable.asset is probably not the culprit. Any blueprint asset in Obi (including, but not limited to Tearable cable) contains constraints, and Unity can become confused if it tries to serialize them (when obviously it shouldn't, according to its own documentation: https://docs.unity3d.com/Manual/script-S...ation.html)

Quote:To use field serialization you must ensure it:

Is public, or has a SerializeField attribute
Is not static
Is not const
Is not readonly
Has a fieldtype that can be serialized. (See Simple field types that can be serialized, below.)

This particular field is protected and its type cannot be serialized, so it fails two of the conditions for serialization. I will create a post in their forums explaining the issue. Thanks for reporting this!

Edit: Here's the post in the forums. Will stay tuned to it:
https://forum.unity.com/threads/serializ...b1.846049/
Reply
#5
Thanks for addressing this!
Reply
#6
Seems to be fixed with ObiRope 5.2.0. Thanks a bunch!
Reply
#7
(26-03-2020, 10:41 AM)fiasko Wrote: Seems to be fixed with ObiRope 5.2.0. Thanks a bunch!

Yep Sonrisa. Unity 2020 has introduced (yet another) backwards-compatibility breaking change in the way serialization works. Luckily the fix was easy enough. For details, see the post I created in the Unity forums:
https://forum.unity.com/threads/serializ...b1.846049/
Reply
#8
Yeah I followed that thread Sonrisa
Did you end up filing a bug report?
Reply
#9
(26-03-2020, 11:02 AM)fiasko Wrote: Yeah I followed that thread Sonrisa
Did you end up filing a bug report?

I will Sonrisa. I have to prepare a minimum repro scene for them to test, but it has been low priority for me till...today that 5.2 was launched. First fix my stuff, then help others fix theirs Guiño.
Reply
#10
Hi,

I am having the issue - because I am using unity 2020.1. I tried to update to Obi Rope 5.3 and it fix the issue but I need to build for iOS. I have the link issue as described in http://obi.virtualmethodstudio.com/forum...p?tid=2159

Is it possible to get the fixes on 5.1 to work with unity 2020.1 ? or would that be possible to have the 5.3 compiled with Xcode 11.3.1?

Thanks
Reply