Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 12 Next capture
2021 2022 2023
1 capture
12 Jun 22 - 12 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 /
  • Help Room /
avatar image
0
Question by Daviddehoop · Oct 07, 2015 at 12:07 PM · unity 5crashdllpluginsmono

Unity Editor crashes when loading managed Plug-in (external DLL)

I am having this strange problem for a couple of weeks now and I tried a lot of different things that presumeably would fix the problem. But now I am at a loss.

Simply said I am making a 3D map application in Unity and I need to recieve external data over a WebSocket. So I have made a managed plug-in that references a WebSocket library for .Net (http://websocket4net.codeplex.com/). The plug-in itself contains a couple of classes that make a connection with the WebSocket through the WebSocket library and some datastructures for temporary storage. Once I load the plug-in and add the DLL including all the DLL's that my plug-in references and I add a C# script in Unity to query some data by instantiating an object of a public class from the plug-in and run it, the Unity Editor crashes (freezes, process doesn't respond anymore). Things I have already tried/done.

  1. My own plug-in is compiled against .Net 2.0 target with VS2013 compiler. The DLL's my plug-in references are also compiled against .Net 2.0 target with VS compiler. I also tried compiling both in MonoDevelop against Mono / .Net 2.0 target but that didn't fix the error.

  2. I added the UnityEngine DLL to my plug-in as a reference but not into the libraries my plug-in references.

  3. When I run a console application in MonoDevelop that uses my plug-in and it's dependencies the application works and queries the data without crashing.

  4. The DLL's have been configured in Unity for the right target both Editor and Standalone for Windows x86_x64 only.

  5. I am running Windows 7 SP1 x64, the Unity Editor is 64-bit (5.2.0f3) and all my DLL's have been compiled to Any CPU (x86_x64). So no compatibility issues should arise there.

The only thing I could possibly think of is the following. According to this: http://jacksondunstan.com/articles/2949 article. Unity doesn't work well with Events in managed plug-ins. In my plug-in I am using a AutoResetEvent that lets my WebSocket Get Data method wait until the connection is established and all data is recieved. Because the WebSocket pushes data continuously on update. Could this cause any problems inside Unity? For example a crash of the Editor because it runs the Editor and the plug-in in the same thread? Or because it thinks it's unresponsive because the plug-in has to Wait in it's own code?

Any guidance or help would be greatly appreciated! Because I am now at the point that i am thinking that this might not even be possible at all.

Comment
Add comment
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

1 Reply

· Add your reply
  • Sort: 
avatar image
0

Answer by vandupont · May 18, 2016 at 12:28 PM

Hello! Do you find a solution to this problem? I have the same problem, and I couldn't solve it yet.

Thank you!

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

37 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 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

DLL found in editor but not in build version 2 Answers

Unity crash bug after importing Standart Assets into the project 2 Answers

HeyZap iOS symbol(s) not found for architecture arm64 0 Answers

How to create a .jslib file for unity webGl 0 Answers

How I should create the "dll's" that depends on third parts? 0 Answers


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