The Omni Group
These forums are now read-only. Please visit our new forums to participate in discussion. A new account will be required to post in the new forums. For more info on the switch, see this post. Thank you!

Go Back   The Omni Group Forums > OmniPlan > OmniPlan General
FAQ Members List Calendar Search Today's Posts Mark Forums Read

 
How to crash OmniPlan with one line of Applescript Thread Tools Search this Thread Display Modes
If you want to automatically close a large number of windows opened in OmniFocus, you might be tempted to write a single line of Applescript like this:

Code:
tell application "OmniFocus" to close windows
This does indeed work well if you run it from the OmniFocus script menu, or from a script editor.
If, however, you install a button for it on the OF toolbar, this innocuous script becomes a danger - it is likely (more than 7 times out of 10 on my system, for example) to crash OF completely.

This is symptomatic of a general defect in the applescript-launching mechanism of omni toolbars - some scripts behave incorrectly when run from the toolbar, others exit with error messages, even though they run perfectly well from the application's script menu.

I first drew attention to this particular crasher two years ago.
As the toolbar applescript-launching mechanism has again proved frustrating with a couple of recent scripts, I tested the issue again in the last few days. Troy has just written to say: this is a known issue that we have filed in our database. I'll add your vote to the list so we know you'd like to see it fixed!

Analogous scripts also crash OmniPlan and OmniOutliner (I had thought OmniOutliner was fixed, but it has just crashed on me ...).

If, like me, you find it helpful to install applescripts on the OF toolbar, find crashing disconcerting, and would like to see this issue (and the general launching of applescripts from the toolbar) fixed, do use Help > Send Feedback in the OF menu, and let the OF development team know ...

--

Last edited by RobTrew; 2010-06-18 at 12:31 AM.. Reason: Had thought OmniOutliner was fixed, but exception = 0x00000001, code = 0x00000001;0xc613584b;
 
Quote:
Originally Posted by RobTrew View Post
If, like me, you find it helpful to install applescripts on the OF toolbar, find crashing disconcerting, and would like to see this issue (and the general launching of applescripts from the toolbar) fixed, do use Help > Send Feedback in the OF menu, and let the OF development team know ...
Maybe it's just my background as an O/S and networking engineer speaking, but I've always considered any bug that causes a program to crash when presented with well-formed input or proper operation to be a bug that has a very high priority for fixing by default. I can see lowering that priority if the crash is caused by a truly unusual set of events or actions or the fix is too destabilizing, but in general, more people will suffer from a crasher than will report it, and one so easily reproducible ought to be fixed at least to the point where no crash takes place, and any reduced functionality documented. In my experience, the unspoken feature request at the top of everyone's list is "Program should not crash!"
 
Quote:
Originally Posted by whpalmer4 View Post
Maybe it's just my background as an O/S and networking engineer speaking, but I've always considered any bug that causes a program to crash when presented with well-formed input or proper operation to be a bug that has a very high priority for fixing by default.
I absolutely agree with you.

I also think that the location of this crash-inducing defect in code that is shared between several Omni products (and prevents the correct execution of scripts that work perfectly well from script menus) means that any time and thought devoted to it will have very useful leverage.

Perhaps crashers and shared code are a slight blind patch in the generally rational system of simply counting votes ?
 
Yes! Likewise, I have often found it impossible to run scripts from the OmniOutliner toolbar, whereas the same scripts always work fine from the scripts menu or even the Finder.
 
If you want to automatically close several windows opened in OmniPlan, you might be tempted to write a single line of Applescript like this:

Code:
tell application "OmniPlan" to close windows
This does indeed work well if you run it from the OmniPlan script menu, or from a script editor.
If, however, you install a button for it on the OP toolbar, this innocuous script becomes a danger - it is likely to crash OP completely, particularly if you change focus to another app just after running, it seems.

This is symptomatic of a general defect in the applescript-launching mechanism of Omni toolbars - some scripts behave incorrectly when run from the toolbar, others exit with error messages, even though they run perfectly well from the application's script menu.

I first drew attention to this particular crasher two years ago.
As the toolbar applescript-launching mechanism has again proved frustrating with a couple of recent scripts, I tested the issue again in the last few days. Aaron has just written to say: I'll file this in our bug database for consideration.

Analogous scripts also crash OmniFocus and OmniOutliner (I had thought OmniOutliner was fixed, but it has just crashed on me ...).

If, like me, you find it helpful to install applescripts on the OP toolbar, find crashing (and misbehaving scripts) disconcerting, and would like to see this issue fixed, do use Help > Send Feedback in the OP menu, and let the OP development team know ...

--

Last edited by RobTrew; 2010-06-18 at 12:43 AM..
 
This crash has been fixed in the most recent sneaky peek build.
 
Quote:
Originally Posted by Ken Case View Post
This crash has been fixed in the most recent sneaky peek build.

Excellent !

Thank you Ken, I really appreciate your putting time into this, an enormously welcome change ... (not just the elimination of crashing, but the correction of global variable persistence too).

(I really look forward to this propagating, before too long, into the toolbar applescript-launching code of OmniPlan, and especially, OmniOutliner 3)

Thank you again for this swift solution,

Rob

--
 
Ken Case has just fixed this problem, in the last few hours, for the latest sneaky-peek build of OmniFocus.

As I believe that the problem resides in code that is shared between several Omni applications, I hope that the fix will propagate, before too long, to OmniPlan ...
 
I understand that you were trying to do something positive here, but please don't create multiple forum threads on the same topic. I really don't want to set an example for other folks to use for less-savory purposes.

Merged threads.
 
Hi Brian,

I think I know what you mean, and the code is certainly shared, but a fix for OmniFocus does not automatically (or immediately) entail a fix for OmniPlan ...

Or are you, perhaps, saying that OmniPlan will now benefit from the work that was done on OmniFocus ?
 
 


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Applescript and Omniplan olmedilla OmniPlan Extras 2 2013-11-23 07:51 AM
OmniPlan to TaskPaper AppleScript psidnell OmniPlan Extras 0 2012-02-05 10:34 AM
Applescript - 2 problems in linking two shapes with a line RobTrew OmniGraffle General 4 2011-06-09 11:38 AM
Export from the command line or AppleScript for specific contexts/projects? xuinkrbin. OmniFocus Extras 1 2010-09-30 04:21 PM
Applescript first steps. Joining shapes with a curvy line ivanrostas OmniGraffle General 0 2007-10-31 04:08 AM


All times are GMT -8. The time now is 09:54 AM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2017, vBulletin Solutions, Inc.