Javascript error causing repeat crashing when I re-open QC app

usefuldesign.au's picture

I think I have a Javascript error crashing the QC editor. Each time I force quit and restart QC it re-opens the problem composition and crashes.

Dumb question but I've forgotten how to ditch the re-opening. Delete the QCeditor pref plist?

cwright's picture
Re: Javascript error causing repeat crashing when I re-open ...

It's usually easier to just rename the offending .qtz to something that has a different extension (.foo should work).

Otherwise, you should edit the QC editor plist -- set "startupAction" to "4" (do nothing).

usefuldesign.au's picture
Re: Javascript error causing repeat crashing when I re-open ...

Thanks, cwright.

I tried the file renaming and "startupAction" was already set to "4" (?) still crashing QC. Logged out (which usually solves QC oddities) and restart and still crashing.

Any other options before I trash pref?

gtoledo3's picture
Re: Javascript error causing repeat crashing when I re-open ...

Is the qtz contingent on a plugin? Have you tried removing 3rd party patches and plug-ins before start up?

usefuldesign.au's picture
Re: Javascript error causing repeat crashing when I re-open ...

Yes, it is using Image PixelS plugin.

I disabled the plugin and I got QC up and running thanks very much, George.

Weird, even though I renamed the culprit file (as suggested by CW) QC opened it under the new renamed name — if that is grammatical. On account of disabled pluggin it couldn't run so I can edit the file and resave, lucky it was my only save version of file and without the plugin dependancy I would have been stitched as autosave was bad too I imagine.

Anyhoo, thanks to both of you.

usefuldesign.au's picture
Re: Javascript error causing repeat crashing when I re-open ...

And as a postscript just to show how screwy Javascript in QC can be (under Leopard at least) I had a "should be a number value" error when I assigned a variable to a result.output. The variable was working in the Javascript before I tried to export it.

Multiplying the variable by 1 solved the error ie result.out = total // gives 'not a number' error result.out = total *1 // works

(This had nothing to do with the crashing problem :) )

cwright's picture
Re: Javascript error causing repeat crashing when I re-open ...

in this case, total was perhaps a string (or some other non-number type). JS isn't strongly typed, but when interfacing with QC/ObjC, it sorta has to be (there's some flexibility, but still quirks like this that have no real good solution). When you multiply by a number, it'll automatically convert a string (for example) into a number.

cwright's picture
Re: Javascript error causing repeat crashing when I re-open ...

when using the rename trick, you have to change the extension (so the file isn't associated with QC anymore). Just changing the name doesn't break the association. OS X's "recently used" file associations aren't based on file names, but on file IDs (FSRefs, I believe?), so just renaming the file without changing the extension won't actually remove it from the last-opened list.