[texworks] Scripting-related hangs & crashes
st_loeffler at hotmail.com
Mon Dec 6 14:13:32 CET 2010
On 2010-12-06 00:46, Paul A Norman wrote:
> Ok, I've had problems for a while with Script Reload, and put an
> issue, or a note to an existing Issue, up some time ago.
I guess you're referring to issue 422
problematic word that made it hard to react to it there was "SOMETIMES" ;).
> I started to wonder if it had anything to do with conflicting Alt key
> combinations in scripts, and some problem for reload in resolving
> these that does not happen on Tw start-up for some reason, so I put an
> Issue up about that as well I think.
It shouldn't have anything to do with that. This is handled internally
by Qt, and if there are two or more things sharing the same shortcut
simply none of them gets executed.
In principle, the same functions are used during startup and reloading
the script list, with the one difference that during reloading,
obviously there are scripts present already.
> If I do a Script reload, even just after opening an existing Tw
> document (even though no scripts have been changed or added) and then
> when focus is back (ten to twelve seconds) immediately run a simple
> Alt key script combination (one that normally works well) Tw crashes,
> no error message just this ...
Hm... OK. First, a few questions:
* How many scripts do you have? How complicated is your scripts folder?
* Does it take 10s-12s just to reload the script list?
* Does the problem persist if you wait some time - say, a minute or so
- before using the shortcut?
And second, a speculation:
The only thing that should happen when you hit "reload" right after
starting Tw is that the menu gets recreated. All scripts are checked of
course, but none is modified. So I'd assume the problem is somewhere in
the recreation of the menu. If the menu item is deleted, but the
shortcut still lurks around somewhere, this can cause crashes.
Maybe my just committed r718 fixes this - maybe (I'll hopefully be able
to provide a testing build soon).
> If I rename script folder and reload Scripts, a new script folder
> appears (as expected) and is populated by the default scripts.
> If I then immeadiately try a script Alt key combination - well a
> search shows that there aren't any Alt key combos to try in that
> directory - so unless I modify a default script I can not test that.
OK. What if you modify one script, or copy a single of your other
scripts (that has a shortcut) in there?
> Restore original scripts directory, reload scripts, try alt key combo, Tw crash.
Now, this is weird. If you only add scripts (i.e., copy your other
scripts into the folder), reload, alt-key, Tw crashes, too?
Could you pinpoint when Tw starts crashing? E.g., copy a single
subfolder - reload - try - copy another subfolder - reload - try - ...
Is it a specific script? Or is the number of available scripts crucial?
> Hope this helps narrow it down a bit.
So do I ;).
More information about the texworks