m_ThreadCheck && !Thread::EqualsCurrentThreadID(m_Th

Post here all your questions related with SmartFoxServer .Net/Unity3D API

Moderators: Lapo, Bax

Fishypants
Posts: 57
Joined: 26 Oct 2010, 14:03
Location: South Pasadena California
Contact:

m_ThreadCheck && !Thread::EqualsCurrentThreadID(m_Th

Postby Fishypants » 30 Dec 2010, 20:22

Hey, I am getting this error:

m_ThreadCheck && !Thread::EqualsCurrentThreadID(m_ThreadID)
Error in file: ..\..\Runtime\Utilities\MemoryPool.cpp at line 117

What I am doing is basically recreating the island demo piece by piece. I have created a custom login and I get this error after I switch scenes. Unfortunately I have no idea of what or where this error belongs to.

One hunch I am having is that I know I need to assign myUserName and myUserId if I am using a custom login, right? Could this be the culprit?
ThomasLund
Posts: 1297
Joined: 14 Mar 2008, 07:52
Location: Sweden

Postby ThomasLund » 30 Dec 2010, 21:55

One hunch I have would be that you do not run the API in threadsafe mode (the queue mode, where you poll the API for responses in e.g. FixedUpdate)

Unity is not thread safe, and the API uses a separate thread to handle the network communication.

Basically all Unity usage of the SFS1 API should run in the queue mode. SFS2X defaults to this - but SFS1 doesnt due to historical reasons.

/T
Fishypants
Posts: 57
Joined: 26 Oct 2010, 14:03
Location: South Pasadena California
Contact:

Postby Fishypants » 30 Dec 2010, 21:57

Thanks for the reply Thomas,
How would I go about running it in threadsafe mode?
ThomasLund
Posts: 1297
Joined: 14 Mar 2008, 07:52
Location: Sweden

Postby ThomasLund » 31 Dec 2010, 08:35

You need to do something like

smartFox = new SmartFoxClient();
smartFox.runInQueueMode = true;

void FixedUpdate() {
smartFox.ProcessEventQueue();
}

Return to “.Net / Unity3D API”

Who is online

Users browsing this forum: No registered users and 17 guests