Problem with disabled windows on Terminal Server

This forum is for eXpress++ general support.
Message
Author
User avatar
rdonnay
Site Admin
Posts: 4722
Joined: Wed Jan 27, 2010 6:58 pm
Location: Boise, Idaho USA
Contact:

Re: Problem with disabled windows on Terminal Server

#11 Post by rdonnay »

In color!
Wow! Hello World in color?

Elon Musk's AI hasn't even been able to write "Hello Mars" in color.
The eXpress train is coming - and it has more cars.

User avatar
rdonnay
Site Admin
Posts: 4722
Joined: Wed Jan 27, 2010 6:58 pm
Location: Boise, Idaho USA
Contact:

Re: Problem with disabled windows on Terminal Server

#12 Post by rdonnay »

But if you close the session while "TestWindows" ist open and re-open the session, the app will crash somewhere in "_EditProtected"
Tom -

I'm really struggling with trying to make this fail, but I can't.
Using Xbase++ build 1648.
Windows Server 2016

When you get the error, does it write to XppError.log?
The eXpress train is coming - and it has more cars.

skiman
Posts: 1183
Joined: Thu Jan 28, 2010 1:22 am
Location: Sijsele, Belgium
Contact:

Re: Problem with disabled windows on Terminal Server

#13 Post by skiman »

Hi,

I did also the test and I'm getting the error.

I did the following:
- start an RDP session on a Windows 2019 server.
- start the testprogram and click on test button. The modal screen appeared.
- disconnected from the server.
- started the rdp session again. The error appears as soon as the connection is made. Error in _editprotected on line 5229.

Code: Select all

oError:args         :
           -> NIL
oError:canDefault   : N
oError:canRetry     : Y
oError:canSubstitute: N
oError:cargo        : NIL
oError:description  : Unknown/Invalid symbol for alias
oError:filename     : 
oError:genCode      :         66
oError:operation    : kd
oError:osCode       :          0
oError:severity     :          2
oError:subCode      :       8021
oError:subSystem    : BASE
oError:thread       :          1
oError:tries        :          1
------------------------------------------------------------------------------
CALLSTACK:
------------------------------------------------------------------------------
Called from (B)MAIN(31)
Called from _EDITPROTECTED(5229)
Called from DC_GETLIST:EVENTLOOP(4732)
Called from DC_GETLIST:READGUI(3977)
Called from DC_READGUI(113)
Called from TESTWINDOW(45)
Called from (B)MAIN(33)
Called from DC_XBPPUSHBUTTON:ACTION(2835)
Called from (B)DC_XBPPUSHBUTTON:INIT(2354)
Called from XBPPUSHBUTTON:HANDLEEVENT(987)
Called from DC_GETLIST:EVENTLOOP(4805)
Called from DC_GETLIST:READGUI(3977)
Called from DC_READGUI(113)
Called from MAIN(35)
Best regards,

Chris.
www.aboservice.be

User avatar
Tom
Posts: 1165
Joined: Thu Jan 28, 2010 12:59 am
Location: Berlin, Germany

Re: Problem with disabled windows on Terminal Server

#14 Post by Tom »

Wow. If I run the app on a Windows Server 2019, open "TestWindow", close (!) the session and reconnect, I always get this situation. Always.
screen.png
screen.png (380.71 KiB) Viewed 2319 times
Best regards,
Tom

"Did I offend you?"
"No."
"Okay, give me a second chance."

User avatar
rdonnay
Site Admin
Posts: 4722
Joined: Wed Jan 27, 2010 6:58 pm
Location: Boise, Idaho USA
Contact:

Re: Problem with disabled windows on Terminal Server

#15 Post by rdonnay »

The error is occurring when evaluating the editprotect code block: {||kd->name == 'Roger'}
The error handler indicates that the alias KD does not exist.

This means that either KD (kunden) file has been closed or there is a problem with threads.

This doesn't sound like an error than can be easily trapped, but I will look into it.
The eXpress train is coming - and it has more cars.

User avatar
Tom
Posts: 1165
Joined: Thu Jan 28, 2010 12:59 am
Location: Berlin, Germany

Re: Problem with disabled windows on Terminal Server

#16 Post by Tom »

I know that this alias doesn't exist (this is by design), but the EDITPROTECT codeblock should not be evaluated, since the window containing it is disabled. But it gets the display focus for some milliseconds if a RDP-session is reconnected. Besides the alias problem, this window should never get the display focus while "TestWindow" is open. But it gets the focus if a RDP session is reconnected. This is the problem. Not the alias or the missing table. I know this.

Edit: There is no thread. This is plain SDI.
Best regards,
Tom

"Did I offend you?"
"No."
"Okay, give me a second chance."

User avatar
rdonnay
Site Admin
Posts: 4722
Joined: Wed Jan 27, 2010 6:58 pm
Location: Boise, Idaho USA
Contact:

Re: Problem with disabled windows on Terminal Server

#17 Post by rdonnay »

I know that this alias doesn't exist (this is by design),
I just noticed that in the code. I missed that.

Have you tried this to see if the owner window will be disabled?

DCREAD GUI FIT ADDBUTTONS MODAL PARENT @oDialog OWNER oOwner
The eXpress train is coming - and it has more cars.

User avatar
Tom
Posts: 1165
Joined: Thu Jan 28, 2010 12:59 am
Location: Berlin, Germany

Re: Problem with disabled windows on Terminal Server

#18 Post by Tom »

Have you tried this to see if the owner window will be disabled?
No difference.

Just to make clear: There is nothing wrong. The wrong thing is the behaviour of a Windows Server if a RPD session is re-connected - or it's a bug in Xbase++ in that situation. The parent window should never get the display focus, since it's child is modal. This is true in all possible situations, except if a RDP session is getting re-connected. In this situation, the parent window gets the input focus although it's child is modal and the parent window is disabled. All the EDITPROTECT-codeblocks of the parent window are evaluated. Besides my sample code is total bullshit, this is something that may cause other trouble in better designed applications (maybe mine if I get this "Hello World"-stuff working!).
Best regards,
Tom

"Did I offend you?"
"No."
"Okay, give me a second chance."

User avatar
rdonnay
Site Admin
Posts: 4722
Joined: Wed Jan 27, 2010 6:58 pm
Location: Boise, Idaho USA
Contact:

Re: Problem with disabled windows on Terminal Server

#19 Post by rdonnay »

The wrong thing is the behaviour of a Windows Server if a RPD session is re-connected - or it's a bug in Xbase++
I agree with you about this, but I'm hoping to find a workaround.

If I could only reproduce the error, then I could get more information to work with.

Is there a chance that it is the RDP client? I'm running Windows 10.
The eXpress train is coming - and it has more cars.

bwolfsohn
Posts: 648
Joined: Thu Jan 28, 2010 7:07 am
Location: Alachua, Florida USA
Contact:

Re: Problem with disabled windows on Terminal Server

#20 Post by bwolfsohn »

Wow! Hello World in color?

At the Clipper get together in New York at the Marriot Marquis, Bill French and I were spending early morning very inebriated when he got the idea to write a Visual Edlin..

It was done the next day, and I got a gold plated (sprayed) 3.5 disk in the mail a couple of weeks later...

A few lifetimes ago....
Brian Wolfsohn
Retired and traveling around the country to music festivals in my RV.
OOPS.. Corona Virus, so NOT traveling right now...
http://www.breadmanrises.com
FB travel group: The Breadman Rises

Post Reply