Pages: 1
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
Could you post a link to the project that was running while you got those errors?
Offline
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
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
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...
Offline
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
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
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)"
Offline
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
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
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
Offline
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 100 )y 100
<glide(1 )secs to x -100 )y -100
[/blocks]
ross
Last edited by randrus (2008-09-18 09:15:31)
Offline
Pages: 1