WinBatch® Technical Support Forum

All Things WinBatch => WinBatch => Topic started by: domvalle@comcast.net on October 29, 2019, 01:20:05 PM

Title: Dialog Crashing only on terminal server
Post by: domvalle@comcast.net on October 29, 2019, 01:20:05 PM
Hi,
I have a dialog that works perfectly on the desktop but on the terminal server has been recently crashing at the very end.
Right after the last dialog line and does not get to the ButtonPushed=Dialog("MyDialog")
No error or message and nothing in the www.batch.ini either.
How can I further troubleshoot as this is affecting our sales force...
thanks!

domvalle@comcast.net
Title: Re: Dialog Crashing only on terminal server
Post by: domvalle@comcast.net on October 29, 2019, 01:26:08 PM
...actually exe is still running, dialog never appears.
debug file stops at last line: MyDialog010
here is the dialog that opens an excel file:

MyDialogFormat=`WWWDLGED,6.2`

MyDialogCaption=`%title% CUST:[%filecust% ][%doct%] %tmsg%`
MyDialogX=500
MyDialogY=500
MyDialogWidth=492
MyDialogHeight=340
MyDialogNumControls=010
MyDialogProcedure=`SubdCallbackProc`
MyDialogFont=`DEFAULT`
MyDialogTextColor=`DEFAULT`
MyDialogBackground=`DEFAULT,DEFAULT`
MyDialogConfig=0

MyDialog001=`061,323,064,012,PUSHBUTTON,"PushButton_OK",DEFAULT,"SAVE/CONTINUE",1,10,32,DEFAULT,DEFAULT,"0|255|0"`
MyDialog002=`001,001,486,318,COMCONTROL,"ComControl_1",DEFAULT,"%docx%",DEFAULT,30,DEFAULT,DEFAULT,DEFAULT,DEFAULT`
MyDialog003=`125,323,036,012,PUSHBUTTON,"PushButton_save",DEFAULT,"SAVE",2,20,DEFAULT,DEFAULT,DEFAULT,DEFAULT`
MyDialog004=`161,323,042,012,PUSHBUTTON,"customer",DEFAULT,"CUSTOMER",3,20,DEFAULT,DEFAULT,DEFAULT,DEFAULT`
MyDialog005=`203,323,046,012,PUSHBUTTON,"salesforce",DEFAULT,"SALESFORCE",4,20,DEFAULT,DEFAULT,DEFAULT,DEFAULT`
MyDialog006=`249,323,038,012,PUSHBUTTON,"date",DEFAULT,"DATE",5,20,DEFAULT,DEFAULT,DEFAULT,DEFAULT`
MyDialog007=`287,323,044,012,PUSHBUTTON,"pcodes",DEFAULT,"PRICE GUIDE",6,20,DEFAULT,DEFAULT,DEFAULT,DEFAULT`
MyDialog008=`331,323,038,012,PUSHBUTTON,"clipx",DEFAULT,"CLIP LIST",7,20,DEFAULT,DEFAULT,DEFAULT,DEFAULT`
MyDialog009=`369,323,052,012,PUSHBUTTON,"dslx",DEFAULT,"DELINQUENT",8,40,DEFAULT,DEFAULT,DEFAULT,DEFAULT`
MyDialog010=`001,319,486,018,GROUPBOX,"GroupBox_1",DEFAULT,"Helper Buttons",DEFAULT,100,DEFAULT,DEFAULT,DEFAULT,DEFAULT`

ButtonPushed=Dialog("MyDialog")
Title: Re: Dialog Crashing only on terminal server
Post by: domvalle@comcast.net on October 29, 2019, 01:54:06 PM
Well after all that a server reboot seems to have corrected the issue.
Hmmm...
Title: Re: Dialog Crashing only on terminal server
Post by: td on October 29, 2019, 02:08:45 PM
Based on your description, your dialog was not "crashing" nor was the script not getting to the 'ButtonPushed=Dialog("MyDialog")' line.  What is more likely the case is that the dialog function is waiting for user-input but none is forthcoming because the dialog is not visible.   The DebugTrace function would not add the Dialog line to the trace file until after line finished and the line would not finish until a user dismissed the dialog in some fashion. 

You seem to be implying that your script did work in when running in RD session but is not now working.  If that is the case, you will need to consider what might have changed on the session host. 
Title: Re: Dialog Crashing only on terminal server
Post by: domvalle@comcast.net on October 31, 2019, 08:31:34 AM
thank you,
yes, a bit of a mystery.
so the screen goes blank in the remote session when this dialog is called for all users on Remote Desktop.
After a reboot it works normally again.
So what could upset the server in this way?
Title: Re: Dialog Crashing only on terminal server
Post by: td on October 31, 2019, 01:58:02 PM
I have had sessions become detached from the desktop because of buggy router firmware and because of the lock screen (screen saver) kicking in.   However, I have no idea what is causing your particular problem.  You might want to search Microsoft's site (assuming you are using there terminal client and server) for some insite.
Title: Re: Dialog Crashing only on terminal server
Post by: td on November 01, 2019, 01:41:07 PM
Here is a link to MSFT's RD troubleshooting page for server 2008.  It's probably still applicable to 2012:

https://support.microsoft.com/en-us/help/2477176/troubleshoot-remote-desktop-disconnected-errors-in-windows-server-2008 (https://support.microsoft.com/en-us/help/2477176/troubleshoot-remote-desktop-disconnected-errors-in-windows-server-2008)