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 burnumd · May 27, 2010 at 08:28 PM · errorosxthreadsquithttpwebrequest

System.Threading.Thread use causing error on player exit in OSX

I'm using System.Threading.Thread to handle HttpWebRequests and in OSX standalone builds a system-level error occurs (complete with a "Report to Apple" window). No noticeable errors occur in Windows standalone builds or in the Editor (in OSX). I added a check in OnApplicationQuit that checks if any of the threads I've created are still alive, and it reports that there aren't any. The relevant area of the console log is presented below:

Total Object count 291 (Before unload 135)

Live threads at quit: 0 out of 1 created. UnityEngine.Debug:Log(Object) DatabaseConnection:OnApplicationQuit()

(Filename: /Users/build/builds/unity-26/unity-2.6.x/Projects/../Runtime/Export/Generated/BaseClass.cpp Line: 1783)

Cleanup player

  • ERROR **: file error.c: line 62 (SetLastError): assertion failed: (ret == 0) aborting...

  • ERROR **: file error.c: line 62 (SetLastError): assertion failed: (ret == 0) aborting...

Again, I don't see this error in the Editor or Windows standalone builds. Suggestions on how I can properly clean up my program on exit would be appreciated.

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 Josh 4 · Oct 07, 2010 at 09:28 PM 0
Share

I would recommend not using .net threading in Unity. It causes more problems than it's worth. Use coroutines ins$$anonymous$$d.

1 Reply

· Add your reply
  • Sort: 
avatar image
1
Best Answer

Answer by Lucas Meijer 1 · May 28, 2010 at 10:01 AM

We have quite a few issues with HttpWebRequest (allthough most are in the webplayer, not in the standalone). I'd suggest using the WWW class instead. Also, please be aware that Unity2.6 has a bug where exceptions thrown on the non-main thread will crash the application. I'm currently working on this bug for the next version of Unity.

Comment
Add comment · Show 3 · 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
avatar image burnumd · May 28, 2010 at 12:58 PM 0
Share

Ah, okay. Thanks. We were using WWW until we found out we needed to have Proxy support (http://answers.unity3d.com/questions/6780/how-do-i-use-the-www-class-using-a-proxy-server). I haven't run into any problems while the game was running (as I said, the error only occurs when quitting an OSX standalone), so I'll just mark it as a known issue for the time being. Thanks again for the info!

avatar image burnumd · Jun 10, 2010 at 03:57 PM 0
Share

Is the problem with HttpWebRequest endemic to all $$anonymous$$ono System.Net classes? That is, would I get the same result using WebClient?

avatar image Lucas Meijer 1 ♦♦ · Jun 11, 2010 at 02:38 PM 0
Share

Yes, it applies to all System.Net classes

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

No one has followed this question yet.

Related Questions

MySql compiler error help~ (OSX) 0 Answers

Game Quits Unexpectedly on Launch 0 Answers

Thread assert error message when using SmartFoxServer 2 Answers

"Assertion failed: Error querying default thread scheduling params: 3" 0 Answers

Build Problem (Mac) 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