Page 2 of 6

Re: Problem with disabled windows on Terminal Server

Posted: Thu Feb 16, 2023 7:09 am
by rdonnay
In color!
Wow! Hello World in color?

Elon Musk's AI hasn't even been able to write "Hello Mars" in color.

Re: Problem with disabled windows on Terminal Server

Posted: Thu Feb 16, 2023 8:52 am
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?

Re: Problem with disabled windows on Terminal Server

Posted: Thu Feb 16, 2023 9:03 am
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)

Re: Problem with disabled windows on Terminal Server

Posted: Thu Feb 16, 2023 9:06 am
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 2489 times

Re: Problem with disabled windows on Terminal Server

Posted: Thu Feb 16, 2023 10:36 am
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.

Re: Problem with disabled windows on Terminal Server

Posted: Thu Feb 16, 2023 10:51 am
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.

Re: Problem with disabled windows on Terminal Server

Posted: Thu Feb 16, 2023 11:05 am
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

Re: Problem with disabled windows on Terminal Server

Posted: Thu Feb 16, 2023 12:10 pm
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!).

Re: Problem with disabled windows on Terminal Server

Posted: Thu Feb 16, 2023 12:34 pm
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.

Re: Problem with disabled windows on Terminal Server

Posted: Thu Feb 16, 2023 4:24 pm
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....