GameMonkey Script

GameMonkey Script Forums
It is currently Mon Nov 20, 2017 3:35 pm

All times are UTC




Post new topic Reply to topic  [ 4 posts ] 
Author Message
 Post subject: m_frame assert
PostPosted: Mon Jul 18, 2011 10:10 pm 
Offline

Joined: Sun Apr 12, 2009 11:01 pm
Posts: 22
I'm currently having trouble using GameMonkey with the Unreal Development Kit. I made a DLL and up until my Execute loop all goes well. I tried adding a Lock/Mutex around all script-related functions but that doesn't seem to fix it (I tried that because another thread on this forum mentioned the m_frame assert and Greg mentioned that GameMonkey was not thread safe, but I assumed a simple Locking mechanism would solve this... I am not at liberty to call any functions on the thread that created the machine, though. This happens on both the old GM version I was using (which I cannot remember the version of), and the latest version. Any ideas?


Top
 Profile  
Reply with quote  
 Post subject: Re: m_frame assert
PostPosted: Tue Jul 19, 2011 2:44 am 
Offline

Joined: Mon Dec 15, 2003 1:38 pm
Posts: 698
What exactly is the trouble you are having with GM? It is not clear from your description what is occurring and what you expect to occur.

I haven't used the UDK for years and never with GM, so I can't comment further on that. However you should be able to test GM, ignoring thread related issues, by instantiating a single gmMachine and running some script. I'm assuming the latest UDK does not force you to execute function calls from different OS threads concurrently. In a multi threaded environment, the main things to be aware with GM is 1) new script can't be compiled at the same time from mulitple threads. 2) Different gmMachines instances cannot share resources between OS threads.


Top
 Profile  
Reply with quote  
 Post subject: Re: m_frame assert
PostPosted: Tue Jul 19, 2011 8:42 am 
Offline

Joined: Sun Apr 12, 2009 11:01 pm
Posts: 22
Sorry, I probably should have rephrased what I wrote...

Basically, I compile and execute some script functions when initing the GM machine just fine, but I added a Tick event to call the Execute(delta) method on the single gmMachine on the DLL that a single UDK class accesses, the Tick event is called from a different thread apparently, and it asserts on m_frame being NULL @ gmThread.

I have a mutex to prevent any potential corruption on the machine, but it still asserts.


Top
 Profile  
Reply with quote  
 Post subject: Re: m_frame assert
PostPosted: Tue Jul 19, 2011 11:30 am 
Offline

Joined: Mon Dec 15, 2003 1:38 pm
Posts: 698
Just another quick thought...
If the UDK class ticks with the same thread each time (not from a thread pool or such), perhaps you could perform GM initialization on first tick to keep resources on the same thread.


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group