Page 1 of 1

Problems on G5 processor based Macs

Posted: Fri Jan 05, 2007 6:13 am
by andres
Hello. I have developed a 9-ball game which works fine G3, G4 and Intel Macs, however on G5 Macs the game freezes without explanation (to me).

I am building the executable in a MacBookPro (Intel) and the RunRev version is 2.7.2. I will appreciate any guidance on how to solve this problem. Thanks.

Posted: Tue Feb 06, 2007 5:37 pm
by oliverk
Hi Andreas,

I can't think off the top of my head what the problem might be.

Is there anything in particular that triggers the freeze or does it appear to be random? Does the problem happen in the IDE or only in standalone mode?

If there is some way to reproduce the problem then I would suggest trying to isolate it by creating a copy of your program and removing objects / commenting out code until you can find the exact place where the freeze is caused.

If this doesn't succeed, you can find the cause of the freeze using logging messages to a file. Ie insert a handler "on log pMessage" into your main stack or library start using it to log where the scrpit is getting to. If you have any suspicions about what might be the cause, start around here, then perhaps at the beginning and end of handlers etc.

Let me know how you get on.

Regards

Oliver

Posted: Sun Feb 18, 2007 7:15 am
by andres
Hello Oliver

Thanks for your suggestions. The problem has not showed up again so I will focus on solveing other issues.

But I am interested in knowing how can I implement a logging mechanism like the one you propose. Can you please give me a few lines of code I can use?

Regards,
Andres

Posted: Sun Feb 18, 2007 12:10 pm
by marielle
andres wrote:But I am interested in knowing how can I implement a logging mechanism like the one you propose. Can you please give me a few lines of code I can use?
Hi Andres,

Something I discovered only very recently is "the params" or params(). If you put this in any handler or function, it returns the name of the handler or function that this command is within along with all parameter values that were sent to this handler or function.

Code: Select all

on somehandler param1, param2, param3
   put params() & cr after URL ("file:" & "log.txt")
   ... processing ...
end somehandler
The implication is that you need to put that within each single handler or function that you want to track. I am sure there is a way, at a higher level, to capture the fact that a message has been transmitted. I haven't put my finger on the way to do that yet. I am highly interested in figuring that one out.

Something else to check in the dictionary is "pendingmessages", which "Returns a list of messages that have been scheduled with the send command, but not yet delivered."

Hopefully, Oliver will chime in again as I believe he knows a lot more on this topic than I do.

Posted: Sun Feb 18, 2007 4:19 pm
by andres
Thanks a lot Marielle

This is what I was looking for.

Best regards,
Andres