I frequently encounter the problem, that Toad suddenly encounters an error when using the Code Template feature. I am working as usual (i.e. executing SQLs, programming some stuff in packages, ...) and suddently creating a code template in the editor (e.g. ifte -> IF THEN ELSE statement) throws an error.
The stacktrace from the details:
There are several workarounds to this issue (like opening a new editor and then doing a code template there), but it's still annoying.
Until Dev chimes in here, do you notice a pattern with specific steps that lead up to this issue? Is ifte the only code template that throws the error?
I'm not able to reproduce yet.
Nope, unfortunately I wasn't able to identify a pattern yet, else I would have mentioned it.
One thing that maybe plays a role could be custom templates, which I use far more often than the default templates that come with Toad.
I could keep track of which templates throw an error, but I think it's relatively even spread.
Yesterday I had a similar issue:
When closing multiple editor windows in quick succession, I wanted to save one of them and then I had an exception when trying to save (CTRL + S). So maybe Johns suspicion that the code template window forgets to which editor it belongs also applies to buttons (and thus hotkeys)?
The CTRL+S problem is fixed in the beta that was released yesterday, version 15.0.66. The Code Templates bug is still a mystery to me.
The issue described above was with the current release (Toad 18.104.22.1689), not with the Beta Version. That's why I posted it here.
I usually have three Toad instances open, production and staging use the normal version, development has the beta version.
Oh, you had the access violation from CTRL+S in 14.2?
If so, will you send me your Toad.el file?
It is located at C:\Users\YOUR_WINDOWS_USERNAME\AppData\Roaming\Quest Software\Toad for Oracle\14.2\Toad.el
So maybe Johns suspicion that the code template window forgets
Maybe "forgets" isn't quite the right description (I know, it was my word to begin with...). It's more like - when you switch from one editor to another, we assign the code template popup to that editor. That should always happen. But I think somehow, an editor closes and then when the next editor gains focus, the code template popup does not get the message of which editor it now belongs to...it thinks it still belongs to the editor that closed. Then when it pops up, it tries to access the editor that no longer exists, and the access violation happens. I've been trying to reproduce this scenario but without luck.