Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Bug / Crash  ClearTasks / GetPointCloudAnisotropy
#1
Hi,

We've been experiencing a bug with Obi for the past few weeks. It is really hard to reproduce, but sometimes it happens out of the blue. It mostly happens in scenes where we have two solvers. Sometimes at startup, sometimes when we're instantiating a GameObject with an ObiCloth.

The stack trace indicates the issues is with GetPointCloudAnisotropy, but this method is only used in the SoftBody script, which we're not using. I even tried to comment the line in Oni.cs but it is still trying to call it. Here is the stack trace:

0x00007FFE554D0805 (libOni) ClearTasks
0x00007FFE554D6FF5 (libOni) ClearTasks
0x00007FFE55504399 (libOni) GetPointCloudAnisotropy
0x00007FFE5550A28A (libOni) GetPointCloudAnisotropy
0x00007FFE5550A579 (libOni) GetPointCloudAnisotropy
0x00007FFE5552D470 (libOni) GetPointCloudAnisotropy
0x00007FFE876D7E94 (KERNEL32) BaseThreadInitThunk
0x00007FFE887CA251 (ntdll) RtlUserThreadStart

Do you have any indications of what this could be caused by? Our timestep is 0.04 and the max allowed timestep is also 0.04, which works fine for our simulations.

We're running Unity 2019.1.7 and we're using HDRP, but that shouldn't affect Obi(?).

Best, 
Sune
Reply
#2
(25-06-2019, 07:57 AM)yoke_sune Wrote: Hi,

We've been experiencing a bug with Obi for the past few weeks. It is really hard to reproduce, but sometimes it happens out of the blue. It mostly happens in scenes where we have two solvers. Sometimes at startup, sometimes when we're instantiating a GameObject with an ObiCloth.

The stack trace indicates the issues is with GetPointCloudAnisotropy, but this method is only used in the SoftBody script, which we're not using. I even tried to comment the line in Oni.cs but it is still trying to call it. Here is the stack trace:

0x00007FFE554D0805 (libOni) ClearTasks
0x00007FFE554D6FF5 (libOni) ClearTasks
0x00007FFE55504399 (libOni) GetPointCloudAnisotropy
0x00007FFE5550A28A (libOni) GetPointCloudAnisotropy
0x00007FFE5550A579 (libOni) GetPointCloudAnisotropy
0x00007FFE5552D470 (libOni) GetPointCloudAnisotropy
0x00007FFE876D7E94 (KERNEL32) BaseThreadInitThunk
0x00007FFE887CA251 (ntdll) RtlUserThreadStart

Do you have any indications of what this could be caused by? Our timestep is 0.04 and the max allowed timestep is also 0.04, which works fine for our simulations.

We're running Unity 2019.1.7 and we're using HDRP, but that shouldn't affect Obi(?).

Best, 
Sune

Hey Sune,

I'm seeing this also (2018.4.2f1) - For me this happens when spawning a prefab with a solver via the editor.

========== OUTPUTTING STACK TRACE ==================

0x00007FFCBC9A0033 (libOni) ClearTasks
0x00007FFCBC99DE75 (libOni) ClearTasks
0x00007FFCBC99D611 (libOni) ClearTasks
0x00007FFCBCA04399 (libOni) GetPointCloudAnisotropy
0x00007FFCBCA090C9 (libOni) GetPointCloudAnisotropy
0x00007FFCBCA09EB8 (libOni) GetPointCloudAnisotropy
0x00007FFCBC99BEB5 (libOni) ClearTasks
0x00007FFCBCA02F95 (libOni) GetPointCloudAnisotropy
0x00007FFCBCA080D8 (libOni) GetPointCloudAnisotropy
0x00007FFCBCA0A28A (libOni) GetPointCloudAnisotropy
0x00007FFCBCA0A579 (libOni) GetPointCloudAnisotropy
0x00007FFCBCA2D470 (libOni) GetPointCloudAnisotropy
0x00007FFCF7184034 (KERNEL32) BaseThreadInitThunk
0x00007FFCF84E3691 (ntdll) RtlUserThreadStart

========== END OF STACKTRACE ===========

A crash has been intercepted by the crash handler. For call stack and other details, see the latest crash report generated in:
 * C:/Users/Tom/AppData/Local/Temp/Unity/Editor/Crashes
StackOverflowException: The requested operation caused a stack overflow.
  at (wrapper managed-to-native) Oni.WaitForAllTasks()
  at Obi.ObiArbiter.WaitForAllSolvers () [0x00031] in C:\Users\Tom\Documents\Programming\Unity\Kingfisher\Assets\Externals\Obi\Scripts\Solver\ObiArbiter.cs:41 
  at Obi.ObiSolver.WaitForAllSolvers () [0x0001c] in C:\Users\Tom\Documents\Programming\Unity\Kingfisher\Assets\Externals\Obi\Scripts\Solver\ObiSolver.cs:784 
  at Obi.ObiSolver.SimulateStep (System.Single stepTime) [0x000b1] in C:\Users\Tom\Documents\Programming\Unity\Kingfisher\Assets\Externals\Obi\Scripts\Solver\ObiSolver.cs:672 
  at Obi.ObiSolver.FixedUpdate () [0x00020] in C:\Users\Tom\Documents\Programming\Unity\Kingfisher\Assets\Externals\Obi\Scripts\Solver\ObiSolver.cs:866 
 
(Filename: Assets/Externals/Obi/Scripts/Solver/ObiArbiter.cs Line: 41)

<RI> Initialized touch support.

ObiArbiter appears to be the culprit...
Reply
#3
(25-06-2019, 11:22 PM)jabza Wrote: Hey Sune,

I'm seeing this also (2018.4.2f1) - For me this happens when spawning a prefab with a solver via the editor.

========== OUTPUTTING STACK TRACE ==================

0x00007FFCBC9A0033 (libOni) ClearTasks
0x00007FFCBC99DE75 (libOni) ClearTasks
0x00007FFCBC99D611 (libOni) ClearTasks
0x00007FFCBCA04399 (libOni) GetPointCloudAnisotropy
0x00007FFCBCA090C9 (libOni) GetPointCloudAnisotropy
0x00007FFCBCA09EB8 (libOni) GetPointCloudAnisotropy
0x00007FFCBC99BEB5 (libOni) ClearTasks
0x00007FFCBCA02F95 (libOni) GetPointCloudAnisotropy
0x00007FFCBCA080D8 (libOni) GetPointCloudAnisotropy
0x00007FFCBCA0A28A (libOni) GetPointCloudAnisotropy
0x00007FFCBCA0A579 (libOni) GetPointCloudAnisotropy
0x00007FFCBCA2D470 (libOni) GetPointCloudAnisotropy
0x00007FFCF7184034 (KERNEL32) BaseThreadInitThunk
0x00007FFCF84E3691 (ntdll) RtlUserThreadStart

========== END OF STACKTRACE ===========

A crash has been intercepted by the crash handler. For call stack and other details, see the latest crash report generated in:
 * C:/Users/Tom/AppData/Local/Temp/Unity/Editor/Crashes
StackOverflowException: The requested operation caused a stack overflow.
  at (wrapper managed-to-native) Oni.WaitForAllTasks()
  at Obi.ObiArbiter.WaitForAllSolvers () [0x00031] in C:\Users\Tom\Documents\Programming\Unity\Kingfisher\Assets\Externals\Obi\Scripts\Solver\ObiArbiter.cs:41 
  at Obi.ObiSolver.WaitForAllSolvers () [0x0001c] in C:\Users\Tom\Documents\Programming\Unity\Kingfisher\Assets\Externals\Obi\Scripts\Solver\ObiSolver.cs:784 
  at Obi.ObiSolver.SimulateStep (System.Single stepTime) [0x000b1] in C:\Users\Tom\Documents\Programming\Unity\Kingfisher\Assets\Externals\Obi\Scripts\Solver\ObiSolver.cs:672 
  at Obi.ObiSolver.FixedUpdate () [0x00020] in C:\Users\Tom\Documents\Programming\Unity\Kingfisher\Assets\Externals\Obi\Scripts\Solver\ObiSolver.cs:866 
 
(Filename: Assets/Externals/Obi/Scripts/Solver/ObiArbiter.cs Line: 41)

<RI> Initialized touch support.

ObiArbiter appears to be the culprit...

Glad to hear that i'm not completely lost, but also unfortunate you're facing the same issue. Sonrisa

Are you using multiple solvers?

I also spawn a GameObject, and i figured it was because of this. The weird thing is that i have it running on another larger PC where it does not crash. This pc has an i7 8700k and it seems to crash more frequently on a NUC with a i7 8809g with fewer cores (6 vs 4).

I can't really get a proper stack trace since i do not have the pdb for libOni. I cannot attach the crash dump here for some reason, but let me know and i'll gladly send it.
Reply
#4
Hi,

I recently fixed an issue that resulted in the same stack trace you guys posted, and it was related to having more than 1 solver in a 64 bit editor scene. Here's the original thread:
http://obi.virtualmethodstudio.com/forum...p?tid=1196

Replace ObiParticleActorEditor.cs and ObiSolver.cs with the ones I'm attaching. Let me know how it goes for you.


Attached Files
.cs   ObiSolver.cs (Size: 31.12 KB / Downloads: 12)
.cs   ObiParticleActorEditor.cs (Size: 33.87 KB / Downloads: 12)
Reply
#5
(26-06-2019, 12:53 PM)josemendez Wrote: Hi,

I recently fixed an issue that resulted in the same stack trace you guys posted, and it was related to having more than 1 solver in a 64 bit editor scene. Here's the original thread:
http://obi.virtualmethodstudio.com/forum...p?tid=1196

Replace ObiParticleActorEditor.cs and ObiSolver.cs with the ones I'm attaching. Let me know how it goes for you.

Hi José,

Thanks for getting back.

I did find that post as well, and i have applied the fix with no luck. It only happens in the build versions of the app. I have no crashes in the editor. I'm building with both il2cpp and mono with the same result.
Reply
#6
(26-06-2019, 03:21 PM)yoke_sune Wrote: Hi José,

Thanks for getting back.

I did find that post as well, and i have applied the fix with no luck. It only happens in the build versions of the app. I have no crashes in the editor. I'm building with both il2cpp and mono with the same result.

Hi there,

That's strange, since all code paths used in builds are also used in-editor, but not the other way around. I'd expect a crash to happen either only in editor, or both in editor and standalone, not just only in standalone.

What platform are you targeting? Do you happen to have a standalone build that I can try myself?
Reply
#7
(26-06-2019, 03:45 PM)josemendez Wrote: Hi there,

That's strange, since all code paths used in builds are also used in-editor, but not the other way around. I'd expect a crash to happen either only in editor, or both in editor and standalone, not just only in standalone.

What platform are you targeting? Do you happen to have a standalone build that I can try myself?

Yeah i'll build an app that works for you. We're targeting Windows 64 bit standalone. It's for a museum exhibition, where we use Intel NUC Hades Canyon PCs and one custom built i7 8700 pc that runs 3 apps, so it's very limited what we actually target. It crashes on both platforms.

It happens more often when we instantiate mulitple cloths of different topologies at the same time, but it also happens quite randomly during x amount of minutes in idle - both with the same stack trace as i posted.

Can i send it to you on via email?
Reply
#8
(27-06-2019, 10:27 AM)yoke_sune Wrote: Yeah i'll build an app that works for you. We're targeting Windows 64 bit standalone. It's for a museum exhibition, where we use Intel NUC Hades Canyon PCs and one custom built i7 8700 pc that runs 3 apps, so it's very limited what we actually target. It crashes on both platforms.

It happens more often when we instantiate mulitple cloths of different topologies at the same time, but it also happens quite randomly during x amount of minutes in idle - both with the same stack trace as i posted.

Can i send it to you on via email?

Yes, send it to support(at)virtualmethodstudio.com.
Reply
#9
(27-06-2019, 11:02 AM)josemendez Wrote: Yes, send it to support(at)virtualmethodstudio.com.

I sent it yesterday. Did you have a chance to look at it? We're a bit pressed for time since we're opening soon.
Reply
#10
(28-06-2019, 11:08 AM)yoke_sune Wrote: I sent it yesterday. Did you have a chance to look at it? We're a bit pressed for time since we're opening soon.

Hi,

Sorry, I didn't have a chance to look at it yet. Will do later today, and get back to you asap.
Reply