This is a read-only archive of the old Scratch 1.x Forums.
Try searching the current Scratch discussion forums.

#1 2008-09-07 01:59:27

randrus
Scratcher
Registered: 2008-09-06
Posts: 11

Upgraded to 1.3, scratch slamming my system [Intel iMac, OSX 1.5.4]

I upgraded today from 1.2.1 to 1.3 and really like the new list feature... but I've got a problem.

The symptom is that I walked away from my project for a few hours and when I came back, the system was behaving badly - very sluggish.

I ran the "Activity Monitor" and it showed me that syslogd was getting TONS of cpu time - like 90%. So I looked in /var/log/system.log, and found half a million lines of messages from Scratch - nearly all of them being messages about non-aligned pointers. There are a couple forms - here's one:

Sep  6 16:25:15 oxygen [0x0-0x250c50a].edu.mit.scratch[26545]: Scratch(26545,0xa07e8fa0) malloc: *** error for object 0xbfffca58: Non-aligned pointer being freed

and here's another:

Sep  6 16:25:14 oxygen Scratch[26545]: Scratch(26545,0xa07e8fa0) malloc: *** error for object 0xbfffca08: Non-aligned pointer being freed\n*** set a breakpoint in malloc_error_break to debug

I presume syslogd was busy because it was working to flush a big backlog of syslog messages - so I rebooted the system to see what's going on. I find that I can generated a flood of these just by starting Scratch.

Flipping back to Scratch 1.2.1 - there's no such problem reported.

Thoughts? Suggestions?

Offline

 

#2 2008-09-07 09:22:04

andresmh
Scratch Team at MIT
Registered: 2007-03-05
Posts: 1000+

Re: Upgraded to 1.3, scratch slamming my system [Intel iMac, OSX 1.5.4]

Could you post a link to the project that was running while you got those errors?


Andres Monroy-Hernandez | Scratch Team at the MIT Media Lab
on identi.ca and  twitter

Offline

 

#3 2008-09-07 14:06:43

randrus
Scratcher
Registered: 2008-09-06
Posts: 11

Re: Upgraded to 1.3, scratch slamming my system [Intel iMac, OSX 1.5.4]

I'll work on doing that, but I don't think its strictly necessary: I can generate tons of these messages by simply opening Scratch and moving the mouse around over the application. In this case there's no script running, and only the initial sprite loaded.

I've got a console window open running

   tail -f /var/log/system.log

which allows me to visually correlate these errors with actions in the application - I haven't found anything that doesn't produce errors. That is, each movement of the cursor from button to button or pane to pane generates dozens of these.

Offline

 

#4 2008-09-07 14:20:52

randrus
Scratcher
Registered: 2008-09-06
Posts: 11

Re: Upgraded to 1.3, scratch slamming my system [Intel iMac, OSX 1.5.4]

Here you go:

   http://scratch.mit.edu/projects/randrus/260296


r

Offline

 

#5 2008-09-08 10:02:42

randrus
Scratcher
Registered: 2008-09-06
Posts: 11

Re: Upgraded to 1.3, scratch slamming my system [Intel iMac, OSX 1.5.4]

Of the (by now) nearly 10M lines of this stuff in system.log, nearly all are the kinds I've already described. It occurs to me the 39 lines that are different might be more interesting - signal to noise and all that.

So, of those 39 lines,

3 look like this:

Sep  6 16:21:41 oxygen [0x0-0x24f84f6].org.mozilla.firefox[0]: Sat Sep 06 16:21:41 PDT 2008 JEP creating applet ScratchApplet (http://scratch.mit.edu/static/misc/)

27 look like this:

Sep  6 16:25:14 oxygen Scratch[26545]: *** _NSAutoreleaseNoPool(): Object 0x10a460 of class NSPathStore2 autoreleased with no pool in place - just leaking\nStack: (0x904bccdf 0x903ca767 0x903f0831 0x36c22)

and 9 look like this:

Sep  6 16:28:39 oxygen Scratch[26591]: *** _NSAutoreleaseNoPool(): Object 0x1094f0 of class NSCFString autoreleased with no pool in place - just leaking\nStack: (0x904bccdf 0x903c9562 0x903d1dde 0x903ed90a 0x903f086b 0x903c9a0a 0x903f07ee 0x36c22)

Hope this helps.

I don't know enough about Squeak to know where to start looking. I did try running the scratch.image under the 3.8.19betaU squeak release, and it worked without throwing the log events. I didn't find a good way to quit - quitting squeak does nothing, apparently - I had to reach for "force quit". So, clearly it's not a replacement, but maybe a useful datapoint.

Did I mention I really like the list feature and don't want to go back to 1.2.1?

Is there anything else I can do for diagnosis?

tia

ross

Last edited by randrus (2008-09-08 10:03:50)

Offline

 

#6 2008-09-08 16:08:12

MasterOfMac
Scratcher
Registered: 2008-02-01
Posts: 62

Re: Upgraded to 1.3, scratch slamming my system [Intel iMac, OSX 1.5.4]

This happened to me, but in 1.2.1, and it turns out the culprit was a wacom tablet. I thought it was the driver, but the VM was at fault.
Not sure about your situation, I'm not very familiar with OSX's log.
I suppose you could try and minimize variables here... Any changes other than 1.3 upgrade? Did you test going back to 1.2.1 to see if this persists? Downloaded a new VM from Squeak's page and running the image on that?
Sorry, my username implies I'm a bit more savvy than my experience demonstrates...


*sarcasm*

Offline

 

#7 2008-09-08 21:56:00

randrus
Scratcher
Registered: 2008-09-06
Posts: 11

Re: Upgraded to 1.3, scratch slamming my system [Intel iMac, OSX 1.5.4]

So, I did try some of those things.

I don't see the problem at all under 1.2.1. The same script won't run because it uses some 1.3-specific features, but ... I don't even have to run a script at all - I can generate the errors by starting Scratch and simply moving the mouse.

I did download a different squeak vm and the problem does not occur, but there seem to be other issues - like I couldn't quit Scratch  wink

But the broader hint I think is to look beyond Scratch proper. I poked around a little trying to figure out which build of Squeak is included w/ Scratch - it's not obvious - but perhaps I should focus there.

Thanks for the ideas...

ross

Offline

 

#8 2008-09-08 22:42:53

MasterOfMac
Scratcher
Registered: 2008-02-01
Posts: 62

Re: Upgraded to 1.3, scratch slamming my system [Intel iMac, OSX 1.5.4]

Right click the title bar, or hit "F2" and it'll bring up a menu, click display version information. Of course, you're on the OSX VM. I'm assuming it's the same release.
I'm stuck on my mom's Pavilion though, so not too sure. lol

Here's what I get:
"Squeak 3.10.6 (release) from Aug 30 2007
Compiler: gcc 2.95.2 19991024 (release)"


*sarcasm*

Offline

 

#9 2008-09-09 02:15:48

randrus
Scratcher
Registered: 2008-09-06
Posts: 11

Re: Upgraded to 1.3, scratch slamming my system [Intel iMac, OSX 1.5.4]

Thanks - didn't know that trick.

r

Offline

 

#10 2008-09-09 02:17:58

randrus
Scratcher
Registered: 2008-09-06
Posts: 11

Re: Upgraded to 1.3, scratch slamming my system [Intel iMac, OSX 1.5.4]

BTW - did a fresh install on a MBP 10.5.4 - no special projects loaded, etc.. I get the noise in system.log doing nothing more than moving the mouse around over the running application - no script, nada.

Offline

 

#11 2008-09-09 08:46:27

johnadmin
Scratch Team
Registered: 2007-03-13
Posts: 100+

Re: Upgraded to 1.3, scratch slamming my system [Intel iMac, OSX 1.5.4]

Hi, randrus.

Thanks for reporting this problem. I had seen the occasional warning in the log, but I thought they were pretty harmless. We'll look into it.

    -- John

Offline

 

#12 2008-09-16 20:39:48

fsmscratch
Scratcher
Registered: 2008-09-16
Posts: 1

Re: Upgraded to 1.3, scratch slamming my system [Intel iMac, OSX 1.5.4]

I am having the exact same syslog error. The rate of errors increases to the point where the syslogd is consuming as much as 90 percent of the CPU cycles. It appears to be triggered by any clicking, dragging or dropping within the Scratch interface.  If I make Scratch active without clicking on the interface (such as using command-tab) it does not trigger an error event. Also, key up and key down do not appear to trigger the error. Only mouse clicks and movement.  I set up a script to continuously loop, but this does not trigger or exacerbate the error. Occasionally it does seem to log an error on its own without any interaction and even if it is not the frontmost application. I hope this helps.

Chris Dart

The error I get is
9/16/08 7:37:27 PM [0x0-0x6e06e].edu.mit.scratch[1550] Scratch(1550,0xa003bfa0) malloc: *** error for object 0xbfffca58: Non-aligned pointer being freed

Offline

 

#13 2008-09-18 08:44:12

randrus
Scratcher
Registered: 2008-09-06
Posts: 11

Re: Upgraded to 1.3, scratch slamming my system [Intel iMac, OSX 1.5.4]

FWIW I upgraded to OSX 10.5.5 and it does not help.

ross

Offline

 

#14 2008-09-18 08:54:11

randrus
Scratcher
Registered: 2008-09-06
Posts: 11

Re: Upgraded to 1.3, scratch slamming my system [Intel iMac, OSX 1.5.4]

Chris - your experience seems a little different - in my case, if I run the "motion" script attached to sprite 2 (in the project I uploaded), running the script DOES generated the log noise.

Which means that if I run the script for any period of time, like overnight, I can end up not only with my CPU pegged (as syslogd falls behind and tries harder and harder to keep up with the flood) but with tons of junk in the syslog file. I'm not worried about filling up the disk, but it's annoying and it makes it hard to spot "real" problems in the logs.

What I"m curious about is whether anybody is running successfully - i.e. is it just you and me and I guess JohnAdmin? Or does the average Scratch/OSX user just not notice the slowdown?

Does anybody keep track of download stats? How many OSX downloads have there bin for 1.3? AFAIK all these users are having this problem - but the forums seem kinda quiet.

Which raises the thought that it's some environment/configuration issue. I'll be happy to send along the output of SystemProfiler if that's interesting - bit noisy to post in the forum  wink

Offline

 

#15 2008-09-18 09:07:51

randrus
Scratcher
Registered: 2008-09-06
Posts: 11

Re: Upgraded to 1.3, scratch slamming my system [Intel iMac, OSX 1.5.4]

I was wondering if there was something about my script that was causing the problem - it uses the new "list" mechanism to play an animation loop.

But it turns out I don't need to do anything tricky to see the problem: running the following script with the default "Scratch" sprite and the messages are streaming into syslog without any further mouse or keyboard interaction.

[blocks]

<forever>
<glide(1 )secs to x sad  100 )y sad  100
<glide(1 )secs to x sad  -100 )y sad  -100

[/blocks]

ross

Last edited by randrus (2008-09-18 09:15:31)

Offline

 

#16 2008-09-19 09:28:44

natalie
Scratch Team
Registered: 2007-03-07
Posts: 100+

Re: Upgraded to 1.3, scratch slamming my system [Intel iMac, OSX 1.5.4]

The Mac version on the download page has been updated (even though the version number is the same) and fixes this problem.

Offline

 

#17 2008-09-23 01:03:46

randrus
Scratcher
Registered: 2008-09-06
Posts: 11

Re: Upgraded to 1.3, scratch slamming my system [Intel iMac, OSX 1.5.4]

Downloaded and verified!

Thank you VERY much!

ross

Offline

 

Board footer