RTTSoftware Support Forum

PDF-ShellTools => Bug reports => Topic started by: conrad.drake on October 02, 2016, 11:14:13 PM

Title: Scripts manager crashes with stack overflow when new/edit selected
Post by: conrad.drake on October 02, 2016, 11:14:13 PM
Ver 2.6.3.0  (still trying to get IT to install 3.0  >:(  for the last three months)

Been happily working away on a large set of PDFs until yesterday when, for the first time in a few days, I needed to edit a script.   I can happily open the manager but the moment I click on new or edit (in the scripts view) the manager seizes up.  And I have to reach for TaskManager to stop PDFShell tools.

About half the time I get a "stack overflow" message when I do this.  Occasionally there's a "discard changes" pop up that Windows is waiting for.

Trying to get into the editor via Ctrl-click on a script results in a "hidden" window - it exists but I can't select it in Windows.

Is this just a result of being so far out of date?
Title: Re: Scripts manager crashes with stack overflow when new/edit selected
Post by: RTT on October 03, 2016, 12:21:45 AM
Must be some state specific to your system that is triggering the bug. Try backup rename the file %appdata%\PDF-ShellTools\MyScripts.dat, to see if it is your list of scripts. Doing so will remove all your custom scripts from being listed.
If you have access to, backup rename also the HKEY_CURRENT_USER\SOFTWARE\PDFShellTools\MyScripts registry key, to check if the problem is related to any scripts editor saved settings.
If the problem persist, better try with version 3.0 (three months!!) before we can test other possibilities.
Title: Re: Scripts manager crashes with stack overflow when new/edit selected
Post by: conrad.drake on October 03, 2016, 02:58:22 AM
Thanks once again for the prompt response.   I

t's not a problem in the my scripts.dat (shame) so I'll have to hunt down my IT  people
Title: Re: Scripts manager crashes with stack overflow when new/edit selected
Post by: conrad.drake on October 05, 2016, 06:26:26 AM
Now at Rev 3.0.  Problem solved. :)
Title: It's baaaaaaack
Post by: conrad.drake on October 01, 2017, 02:15:14 AM
Strangely, a similar behaviour has returned.  I am up-to-date except for one chinese language update.

Now, when I click "edit" (or "new") the button goes blue and that's where everything stops.   Task manager says shelltools is runnin but it is unresponsive.

It is using 0% CPU, which briefly pops up to 3% if I click on the window, and 2.036K memory.

When I stop shelltools running in New mode it says "stack overflow". When I stop if from "edit" is says "save changes (yes/no)"

Windows 7 professional, SP-1 on Intel I7-6600U CPU with 8G RAM.   I have no rights on this machine under our group policy:  doing anything at all requires an Administrator to remotely log in (e.g. installing updates; adding a new printer; adjusting time and date)
Title: Re: Scripts manager crashes with stack overflow when new/edit selected
Post by: RTT on October 01, 2017, 10:01:41 PM
If you don't mind sharing your PDF-ShellTools settings, send me by email, or attach to a forum PM, a backup file of your settings. Maybe we get lucky and I can get the issue to fire here too. Create the settings backup from the manager bottom left "settings" named button.
(http://www.rttsoftware.com/Manuals/ST/English/images/ManagerSettingsBtn.png)
Title: Re: Scripts manager crashes with stack overflow when new/edit selected
Post by: conrad.drake on October 01, 2017, 10:31:18 PM
I don't have options to attach to PM so zip file is attached.  I've PM'd the password.  Hope there's a "smoking gun" in there!
Title: Re: Scripts manager crashes with stack overflow when new/edit selected
Post by: RTT on October 02, 2017, 12:43:56 AM
No issues here, configured with your settings (you only have one script in your My Scripts list?), so I'm still clueless.
Check if you can run this process explorer tool (https://docs.microsoft.com/en-us/sysinternals/downloads/process-explorer) (no installation needed). If yes, run it when the manager is stuck, locate and select the manager.exe process and create a minidump file, menu Process>CreateDump>CreateMiniDump, and send me that file.
Title: Re: Scripts manager crashes with stack overflow when new/edit selected
Post by: conrad.drake on October 02, 2017, 01:09:37 AM
‘Curiouser and curiouser!” Cried Alice (she was so much surprised, that for the moment she quite forgot how to speak good English).’

I can do a dump for Chrome (local install) and Paint.net (needs admin to install) but not shell tools.

Error is "can't find the file" after telling it which file to dump to.

Interesting Manager.exe is in dark purple, the only process like that (rest are white, pink or blue)
Title: Re: Scripts manager crashes with stack overflow when new/edit selected
Post by: RTT on October 02, 2017, 01:45:14 AM
I get that error if I run the 64-bit process explorer (procexp64.exe). It runs fine if I run the 32-bit (procexp.exe) instead.

That color is because the manager.exe is packed (the .exe is compressed). You can check the color meanings from the menu Options>ConfigureColors
Title: Re: Scripts manager crashes with stack overflow when new/edit selected
Post by: conrad.drake on October 02, 2017, 03:03:27 AM
Sent by email as it's too large to attach (3MB compressed).  Hopefully that'll shed some light on whatever stupid thing I've done.
Title: Re: Scripts manager crashes with stack overflow when new/edit selected
Post by: RTT on October 02, 2017, 11:27:57 PM
Nothing suspicious from the mini dump. The main thread is just running OnIdle tasks, waiting for input, and there isn't evidence of any unhandled exception.

I suspect you have the scripts editor window placed off-screen. If that's the case, after clicking the manager script edit button, hold down the Windows key and press the up-arrow, to maximize, or the right or left-arrow a few times to bring the window to the active screen.
Title: Re: Scripts manager crashes with stack overflow when new/edit selected
Post by: conrad.drake on October 03, 2017, 12:19:03 AM
Nothing suspicious from the mini dump. The main thread is just running OnIdle tasks, waiting for input, and there isn't evidence of any unhandled exception.

I suspect you have the scripts editor window placed off-screen. If that's the case, after clicking the manager script edit button, hold down the Windows key and press the up-arrow, to maximize, or the right or left-arrow a few times to bring the window to the active screen.
No joy.  I agree with your analysis, it's like it's waiting for input.  And stopping from "edit" gets a "can't, program is waiting for input" message from Task Manager.   

Still getting "stack overflow" if I click "new" and stop with TaskManager, though.

I wonder if I've got a display driver problem which is causing this behaviour? 

I'll play with a few things later this week (got some promises to keep before then) and report back.

Thanks again.
Title: Re: Scripts manager crashes with stack overflow when new/edit selected
Post by: RTT on October 03, 2017, 12:39:44 AM
Try inspecting the windows with this WinSpy++ tool (https://www.catch22.net/software/winspy-17), to check, and eventually edit, the state and position of the window with "Scripts editor" as caption, under the Manager.exe process.
Title: Re: Scripts manager crashes with stack overflow when new/edit selected
Post by: RTT on October 03, 2017, 01:12:59 AM
Instead of opening the scripts editor from the manager, try open it directly to see if anything changes. To do this, hold down the CTRL key, while clicking a script menu item from the shell context PDF-ShellTools>My Scripts sub menu. This will open the clicked script directly in the editor, from where you can edit, run or create new ones (if the editor indeed shows up this way).
Title: Re: Scripts manager crashes with stack overflow when new/edit selected
Post by: conrad.drake on October 03, 2017, 01:21:27 AM
Instead of opening the scripts editor from the manager, try ...
Interesting - I get a RTT icon on the taskbar and task manager shows a task (as does ALT-TAB ) called PDF-ShellTools- My Scripts but I can't switch to it.

I can close it from the task bar, in which case I get a "save changes?" message if I've ALT-TAB'd to the not-there window.

I'm leaning towards your suggestion that the display is popping up somewhere off screen. 
Title: Re: Scripts manager crashes with stack overflow when new/edit selected
Post by: RTT on October 03, 2017, 01:47:53 AM
You can reset/set the position by deleting/editing the values under the HKEY_CURRENT_USER\Software\PDFShellTools\MyScripts registry key, but you probably don't have permission to run the regedit tool on your system? But you can use the linked above WinSpy++ tool to manually set the window position.

But if indeed the problem is the window being off-screen, it's strange the Windows Key+arrow-up, arrow-left or arrow-right shortcuts are not working!
Title: Re: Scripts manager crashes with stack overflow when new/edit selected
Post by: conrad.drake on October 03, 2017, 01:50:20 AM
I'm leaning towards your suggestion that the display is popping up somewhere off screen.
Bingo!

Rebooted. No joy.
Borrowed a screen from my client, fired up in "duplicate mode".  No Joy.
Changed to Extended Desktop.  No Joy.
Re-arranged the position of the screens (from side to side to top/bottom).  Hit "apply". 

Bingo!  There's the editor.  On the second screen.
 :o
At the moment I'm blaming my display driver. later this week (or early next) I'll see if I can reproduce the problem.

Observation: if I fire up the editor from the manager, I have only one RTT app on the task bar.  If I do it via CTRL-click, then I end up with two instances.

(As you suspect, I'm not allowed to play with HKEYs.)
Title: Re: Scripts manager crashes with stack overflow when new/edit selected
Post by: RTT on October 04, 2017, 02:10:30 AM
Re-arranged the position of the screens (from side to side to top/bottom).  Hit "apply". 

Bingo!  There's the editor.  On the second screen.
Great!
Don't the Windows key+arrow_left/arrow_right work to move windows across screens oriented top/bottom? Never tested.
Quote
At the moment I'm blaming my display driver. later this week (or early next) I'll see if I can reproduce the problem.
Let me know if I need to fix something.
Quote
Observation: if I fire up the editor from the manager, I have only one RTT app on the task bar.  If I do it via CTRL-click, then I end up with two instances.
Two buttons in the taskbar, but only one scripts editor window, or two windows also?