Hang while running script

Here is a Sample and Spindump of a hang I have had a few times after pressing the Run button on the Script Editor window. Does not happen every time, but this just started happening with macOS 15.4, did not happen before upgrading.

Neal

Archive.zip (359.7 KB)

Looks like the JavaScript runtime is not handing back control to the GarageSale. When this occurs again, can you please check if there’s any output from GarageSale in the macOS Console.app around the time of the lock up?

Just happened again… There does not appear to be any output in the system.log related to GarageSale nor Java/JavaScript… Probably a bug in macOS 15.4???

Neal

This hang is now happening frequently, about every 3rd time I Run a script.
Must Force Quit the GarageSale app… Just started with macOS 15.4.1, or 15.4???

Neal

Could this have anything to do with the specific scripts you are using? Any chance you could post one of your scripts in question so I can try it here?

Hi Kristian,

Here is the script I am using and it has been working for many months, until recently.

The price and tags actually do get changed, then the script hangs.

Maybe something changed in macOS 15.4 with the consoleLog command???

Neal
changeBuyItNowPrice.txt.zip (1.6 KB)

Thank you for sharing the script.
I wasn’t able to reproduce the hang or any other issues with your script yet. For me it seems to work perfectly fine.
I am using macOS 15.4.1 and GarageSale 9.9.2b3.

Is there anything unusual about your listings?
Perhaps you can comment out parts of your script to find out what is causing the hang.

Me too.

Not that I know of. Same listings I have been using for years. And the script has also been working for many many months. The only thing that I can recall has changed is GS 9.9.2beta3 and also macOS 15.4, and 15.4.1 updates…

Neal

I do recall that back when the GS script functionality was in development, there were issues with the consoleLog command hanging… But that was a LONG time ago…

It does not hang every time, but after every 3 or 4 script runs.
Just seems like something changed in macOS 15.4 or 15.4.1

Neal

Here are some more Sample and Spindump. This hang is happening frequently and after pressing the Run button and after the script manually runs, and after it clears the consoleLog window output and before it actually re-draws the new output from this run. Did not happen at all for months, now started with macOS 15.4.1, or possibly macOS 15.4.

Neal

GarageSale Sample and Spindump.zip (1.8 MB)

Even running this simple script 3 or 4 times in a row now causes a hang… See attached Sample and Spindump. It clears the log output from the previous runs, but never draws the new output from the current run and hangs.

function run() {
    consoleLog("allListings: " + allListings.length);
    consoleLog("selectedListings: " + selectedListings.length);
}

Neal

GarageSale Sample and Spindump.zip (490.0 KB)

Hi Neal,

sorry, the content of the sample/spindump does not help as there is no GarageSale code involved there (only JS interpreter code that hangs in some sort of locks).

Can you tell me how many lines you have in the console log? Does it help to clean it up?

As this is all about console logs, maybe Apple did changed something to the TextView we are using to show the logs?

Thanks,
Paul

Hi Paul,

Sometime 2, sometimes 8-10…

Well… Maybe doing a “clear Log” prior to every Run seems to work…

I’ll try to get more data on exactly when it happens, and what triggers it…

Seems likely that they changed something in macOS 15.4.1…

Neal

I just upgraded to macOS 15.5 and now this hang still happens and nearly every single time I try to run even this simple script multiple times in a row (Sample and Spindump below):

// <https://manual.iwascoding.com/gs8/en/Custom_JavaScript_Actions-Running_Scripts.html>

function run() {
    consoleLog("selectedListings: " + selectedListings.length);
    for (const listing of selectedListings) {
        consoleLog(listing.title);
		    // consoleLog("watchers: " + listing.watchers);
		    // consoleLog("views: " + listing.views);
    }
}

Neal

GarageSale hang.zip (680.8 KB)

Here are 2 movies…

Neal

Screen Recording (GarageSale)1
Screen Recording (GarageSale)2

And a 3rd movie…

Neal

Screen Recording (GarageSale)3

Hi,

do not see the beachball or a hang in the movies you posted. Do you mean that the console gets cleared occasionally?

Regards,
Paul

Hi,

can still not reproduce this.

Do you have any scripts with methods like

listingAdded
listingRelisted
listingRevised
validateListing

Defined and set up to run at these special events (in the background via scheduler)? Is this maybe causing your issues?

Regards,
Paul

Hi Paul,

Unfortunately, the beachball is not recorded in the movie…

Yes, both a hang AND the beachball, when the text SHOULD be re-displayed in the console log.

Well… I THINK the console gets “cleared” and then usually re-displayed at the end of each script.
But… In the last case the console clears and then DOES not redisplay and hangs with the beachball instead.

Neal

Hi Paul,

Dang.

Not the first 3. Yes, validateListing. But not in the movies, and all the scripts in the movies are very short and simple. When the hang/beachball, I have to Fore Quit GarageSale. All these scripts have been working great for many, many months.

Nope. NO scheduled events at all. And nothing shows in the Activity Viewer when I manually Run these scripts.

It is kinda random, as it does not happen every time on the same script or on the same sequence, but it does happen frequently, as shown in the 3 movies. Each of which was recored after GarageSale was just started up and had finished loading/refreshing the listings from eBay.

Neal