Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
0
Question by origonn · Apr 02, 2014 at 08:59 PM · crashvector2problem during runtimepolygoncollider2d

Unity crashes on PolygonCollider2D setPath

Hi, while working on a deformable collapsible 2D terrain, I have a problem with the Unity desktop editor crashing only at certain times (have not been reliably able to reproduce the bug, just random).

Here is the stack dump

 ========== OUTPUTING STACK TRACE ==================
 
 
 (0x00B1B5D7) c:\buildagent\work\d3d49558e4d408f4\runtime\physics2d\polygoncolliderbase2d.cpp (301 + 0x7): PolygonColliderBase2D::ValidatePolygonShape + 0x807
 (0x00B1C370) c:\buildagent\work\d3d49558e4d408f4\runtime\physics2d\polygoncolliderbase2d.cpp (163 + 0xa): PolygonColliderBase2D::ExtractConvexShapes + 0x490
 (0x00B1C583) c:\buildagent\work\d3d49558e4d408f4\runtime\physics2d\polygoncolliderbase2d.cpp (68 + 0x16): PolygonColliderBase2D::Create + 0xf3
 (0x00B1C63F) c:\buildagent\work\d3d49558e4d408f4\runtime\physics2d\polygoncollider2d.cpp (98 + 0x0): PolygonCollider2D::RefreshPoly + 0xf
 (0x150A41E9) (Mono JIT code): (filename not available):  (wrapper managed-to-native) UnityEngine.PolygonCollider2D:SetPath (int,UnityEngine.Vector2[]) + 0x89 (150A4160 150A4239) [09B96BD0 - Unity Child Domain] + 0x0
 (0x15038C4B) (Mono JIT code): (filename not available):  NetworkManager:Update () + 0x6b3 (15038598 15038CD2) [09B96BD0 - Unity Child Domain] + 0x0
 (0x0AFBBE1F) (Mono JIT code): (filename not available):  (wrapper runtime-invoke) object:runtime_invoke_void__this__ (object,intptr,intptr,intptr) + 0x8f (0AFBBD90 0AFBBEEA) [09B96BD0 - Unity Child Domain] + 0x0
 (0x09A4FEDE) c:\buildslave\monoandruntimeclasslibs\build\mono\mini\mini.c (4889 + 0xc): mono_jit_runtime_invoke + 0x214
 (0x099BD680) c:\buildslave\monoandruntimeclasslibs\build\mono\metadata\object.c (2618 + 0x10): mono_runtime_invoke + 0x51
 (0x00706EF8) c:\buildagent\work\d3d49558e4d408f4\runtime\scripting\backend\mono\scriptingbackendapi_mono.cpp (183 + 0x1a): scripting_method_invoke + 0xb8
 (0x0082740C) c:\buildagent\work\d3d49558e4d408f4\runtime\scripting\backend\scriptinginvocationnoargs.cpp (97 + 0x0): ScriptingInvocationNoArgs::Invoke + 0x6c
 (0x00826BC5) c:\buildagent\work\d3d49558e4d408f4\runtime\scripting\backend\scriptinginvocation.cpp (94 + 0x0): ScriptingInvocation::Invoke + 0x15
 (0x006F4F94) c:\buildagent\work\d3d49558e4d408f4\runtime\mono\monobehaviour.cpp (529 + 0xb): MonoBehaviour::CallMethodIfAvailable + 0xf4
 (0x006F52B9) c:\buildagent\work\d3d49558e4d408f4\runtime\mono\monobehaviour.cpp (611 + 0xb): MonoBehaviour::CallUpdateMethod + 0xf9
 (0x006F52D7) c:\buildagent\work\d3d49558e4d408f4\runtime\mono\monobehaviour.cpp (617 + 0x0): MonoBehaviour::Update + 0x7
 (0x007DD887) c:\buildagent\work\d3d49558e4d408f4\runtime\misc\player.cpp (1927 + 0x0): PlayerLoop + 0x4a7
 (0x00F654FC) c:\buildagent\work\d3d49558e4d408f4\editor\src\application.cpp (2286 + 0xb): Application::UpdateScene + 0x21c
 (0x00F69577) c:\buildagent\work\d3d49558e4d408f4\editor\src\application.cpp (2216 + 0x0): Application::UpdateSceneIfNeeded + 0x37
 (0x0100C682) c:\buildagent\work\d3d49558e4d408f4\editor\platform\windows\wineditormain.cpp (336 + 0x0): MainMessageLoop + 0x1c2
 (0x0100D5C7) c:\buildagent\work\d3d49558e4d408f4\editor\platform\windows\wineditormain.cpp (848 + 0x0): WinMain + 0xe37
 (0x01125C34) f:\dd\vctools\crt_bld\self_x86\crt\src\crt0.c (275 + 0x1c): __tmainCRTStartup + 0x11a
 (0x75A3495D) (KERNEL32): (filename not available): BaseThreadInitThunk + 0xe
 (0x770698EE) (ntdll): (filename not available): RtlInitializeExceptionChain + 0x84
 (0x770698C4) (ntdll): (filename not available): RtlInitializeExceptionChain + 0x5a
 
 
 ========== END OF STACKTRACE ===========


What I have is a custom set of vertices (Vector2 points) I'm generating a collider with, and then changing the Vector2's that are affected by an explosion before using setPath to update the collider. The updating itself works fine and forms to the terrain without problems, with the exception of the crashes.

As this is somewhat likely to be a problem with the generated path, what are the specifics for a PolygonCollider2D path, generated from vertices? The only thing I've been able to gather is that the path needs to fully encircle / enclose a shape, which it is doing. Any suggestions?

Comment
Add comment · Show 1
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image Jaczehack · Apr 28, 2014 at 08:30 PM 0
Share

I have the same problem. Replaced my polygon collider with an edge collider and the crashes vanished. Also running on android.

1 Reply

· Add your reply
  • Sort: 
avatar image
0

Answer by iileychen · Jan 16, 2017 at 03:06 PM

I have encounter similar issue, it seems when your path shapes has intersects, it crash, i have shrinked all the paths a little, then it will be fine.

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

22 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

A node in a childnode? 1 Answer

Asset Store Crashes Unity. Help needed! 1 Answer

Unity Crashes when opened 1 Answer

Unity crashes when executing a script onMouseDown 1 Answer

HELP!! My Unity Crashed and scenes and objects are gone 1 Answer


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges