I am starting a QGuiApplication (Qt 5.12) and using a remote desktop connection to a Windows 10 PC. Everything works fine while the remote desktop connection is open, but when I disconnect and let the application run during the week-end, I can see in the logs that it stops processing Qt events (mostly network related in my case). The last thing the logs show is an "activation change" event.
When I connect again after the weekend, the Qt event loop starts again (the logs show again "Activation Change event") and of course there is a huge amount of queued events and the application gets in a non responding state (I am logging the number of Qt events queue in the loop using qGlobalPostedEventsCount).
This used to work correctly but stopped working, I think due to an update of Windows on the machine (maybe same root-cause than this thread ?).
Is this the expected behavior for applications when the windows remote connection is terminated? Is there a known fix for this?
I have not managed to properly fix the issue. As a work-around, using Microsoft "Remote Desktop" application instead of using the "Remote Desktop Connection" application avoids the issue.
Related
I install Win7 at my virtualbox, setup the guest end a standard "bcdedit"s. (debugtype=serial, port=1, baudrate=115200 /debug=on)
following steps took:
In the host end, I alloc a virtual serial port to the guest system
set the it with named-pipe "\.\pipe\debug".
I start Windbg to connect "\.\pipe\debug", I get "Could not open the pipe Win32 error 0n2"
After I power on the guest machine, I reopen Windbg, it works fine, but just saying "Opend \.\pipe\debug Waiting to reconnect...", It seems that no debugging data communicated with Guest Machine.
I try "bcdedit /bootdebug on", and reboot the machine. this time I see several output by Windbg during booting.
BD: Boot Debugger Initialized Connected to Windows Boot Debugger 7601
x64 target at (Sat Mar 17 17:28:46.559 2018 (UTC + 8:00)), ptr64 TRUE
Kernel Debugger connection established.
************* Path validation summary ************** Response Time (ms) Location Deferred
srvC:\Symbolshttp://msdl.microsoft.com/download/symbols Symbol
search path is:
srvC:\Symbolshttp://msdl.microsoft.com/download/symbols Executable
search path is: ReadVirtual() failed in GetXStateConfiguration()
first read attempt (error == 997. Windows Boot Debugger Kernel Version
7601 UP Free x64 Machine Name: Primary image base =
0x000000000052d000 Loaded module list = 0x00000000005df9e0 System
Uptime: not available Shutdown occurred at (Sat Mar 17 17:28:53.382
2018 (UTC + 8:00))...unloading all symbol tables.
It proves "\.\pipe\debug" is OK to transfer output of Guest VM's COM1.
When entering to login console, I see such message, and previous outputs turn to gray:
************* Path validation summary ************** Response Time (ms) Location Deferred
srvC:\Symbolshttp://msdl.microsoft.com/download/symbols Waiting to
reconnect...
I login and check the Device Manager, I can't find device COM1. but if I turn off /debug, I can.(Indeed, I used putty to check Guest'COM1 with Host's rawfile, I found it worked too, with the input of putty written to Host's file)
I tried many times with different COMs and baudrate, always got same outputs.
I tried a similar VMware Station, and got the same result.
Problem disappeared after I changed a Host machine and redid above steps.(:
Questions:
WHY can't I see the COM1 device with /debug on In the guest machine?
Does the Baudrate matters? (mismatch among Host's windbg setting, Guest's Device setting and Guest's debug setting), I tried to "Cycle BaudRate "In Windbg, it said Net COM port baud is ignored.
How to diagnose the problem?
_EDIT:
I found a similar post stuck on "reconnecting"
and this issue My Kernel Debugger Won’t Connect which refered there was a hot key "Ctrl+Alt+D" to show details of Windbg's I/O instead of a black-box. And it's normal and reasonable that COM1 disappear when "/debug=on" as the post said.
I could see the efforts windbg payed to sync the guest. After I pressed "ctrl+break", I saw windbg said "Send Sync", and still stuck... And, I would going to power off the guest by pressing "Host+Q". Miracle took place. Windbg came to alive and succeeded to break in.
I tried several times, with no failure. Now I can work happily... But WHY???
when I press "Ctrl+break", the windbg says
Send sync break
Send Break in ...
and stuck, and target machine is paused too. And I press "Host+Q" the "Esc" then it works.
install vbox in physical machine (the physical machine is Host henceforth)
install os inside vbox ( the os inside vbox is Target henceforth)
reboot Target and see if things go well a few times
open a elevated command prompt inside Target
since you have not created a Debug BootEntry create one first
run bcdedit /copy /? for syntax
to copy current bootentry to a new one you will be using
bcddedit /copy {current} /d "MyPipeDream"
{current} is alias for the current boot entry ID a GUID
MyPipeDream is a descriptive string
if you reboot now you should get two boot entries to choose from
choose the new bootentry to boot with so that you can operate with {current} well known ID instead of copy pasting or mistyping long unintuitive guids
assuming you booted MyPipeDream
you can check and enable debugging on the current id with
bcdedit /debug {current} on
you should reboot again to MyPipeDream which would be debug enabled now as in screen shots below
but before rebooting set the Serial Interface in vbox settings
also uncheck the connect to existing so that vbox creates the pipe
instead of trying to connect to an existing pipe
all setting on target are over now
on the host create a bat file with contents below and execute it
notice the pipename it is pipedream exactly matching the name we gave in vbox settings and not MyDreamPipe which is the ID descriptive string
start windbg -k com:port=\\.\pipe\pipedream,baud=115200,pipe,reconnect,resets=0
windbg should open up and say witing to reconnect
press ctrl+break a few times in the HOST WINDBG and vbox should connect to windbg or press ctrl+print screen in the TARGET
please see if you require Function keys (some wireless keyboards like logitech
needs ctrl+fn+pause / break key combos instead of plain ctrl+break
else open the Debug menu and select the Break in UI
When using a DNX(core) ASP.NET 5 application, the Configure() method can be used to subscribe to the following cancellation events:
IApplicationLifetime::ApplicationStarted
IApplicationLifetime::ApplicationStopping
IApplicationLifetime::ApplicationStopped
However, the only way I can see ATM to properly terminate an application is to call
IApplicationLifetime::StopApplication()
from within the application or press CTRL+C using Kestrel and running in a console.
Obviously the target here is to host the application as a background application (ideally as a cloud deployment).
Unfortunately I haven't been able to get a demo application to run on IIS.
When using IBM BlueMix, I've noticed that the stopping and stopped events are never fired and apparently the application is just stopped.
What is the proper way to deal with this? Are these events unreliable or am I doing something wrong?
Help is greatly appreciated. Thanks in advance!
Right now, it's not possible to detect when the process is being killed.
There's 2 ways that even is going to fire as of now.
CTRL-C in the console window of Kestrel
The Application is being disposed.
As far as it seems, they will have something ready when they hit RTM.
As for when a process gets killed, if BlueMix is closing on windows, it should send the proper WM_Close (0x0010) event and SIGTERM if you are under a Linux/OSX system.
If BlueMix is sending SIGKILL, then there's nothing that can be done about events.
LIBUV Update:
After digging a bit deeper, if you have any control over the signals that are sent, I recommend not sending any of those: SIGILL, SIGABRT, SIGFPE, SIGSEGV, SIGTERM and SIGKILL.
ASP.NET 5 is based on libuv and they might be limited to SIGINT or SIGHUP to terminate the application since libuv will not allow you to handle SIGTERM.
An Eclipse RCP application crashes in the jprofilerti.dll code once I move the app from relatively idle status to full operation.
Some initial profile results are available back on the remote GUI session. This suggests that the configuration of Jprofiler GUI, Jprofiler agent, and network settings is ok.
I wonder if the crash occurs due to buffer overruns. I ask because the network link between the remote JVM and the near laptop JProfiler GUI is very poor with a very low effective bit rate. Is it possible that the target JVM will crash if the remote GUI is too slow about consuming buffered profiling data?
I try to create Asynchronous(non-blocking) request in my J2me application.
I write code as per this tutorial: Ajax-like Asynchronous SOA Calls with Java ME.
Code run successfully on emulator on Netbeans.
But when app deploy and device it fails on multiple connection.
When two connection open. then first connection tread kill and execute second only.
This problem only on device. It works fine on PC
According to this article http://developers.sun.com/mobility/midp/articles/mmapioverview/index.html "Note also that MIDP limits the number of HTTP connections open simultaneously to four.", but your device seems to only allow one connection.
In this case you should create a queue and execute one thread at a time.
On my Win7-PC the network takes up to 10 minutes until it's shown as ready (through network icon). The weird thing is that even in the meantime (blue circle is spinning) network activities like mail, internet and access to network shares are working.
How does Win7 decide that a network is ready?
The issue is that one of my installed apps which uses the IP stack (runs on localhost) doesn't work until the network is in ready-state. I found out that if I disable the Windows Management Instrumentation service the network state switches to ready immediately. However, this prevents a couple of other services from starting what could lead to a security issue. (To me it seems like my PC waits until it gets a GO from our network... but no evidence here)
Any hints?
Try to apply this hotfix, sometimes it works:
http://support.microsoft.com/kb/2617858
When it happens to me I have to kill the process tree of two services:
SMS Agent Host
Winmgmt
(select the service, right click, select "go to process", right click on the process, select "end process tree"; if you cannot see the process remember to click the "show processes from all the users" button).
Finally delete the "c:\windows\system32\wbem\repository" folder as fast as possible.
The "repository" folder will be re-created and the network will start working properly.
This worked for me.
Click on run dialog and type msconfig.
In the pop up click on services.
Then check/tick Hide Microsoft services.
In the ensuing dialog uncheck/untick Nividia Network service.
Finally click Apply. restart computer.
Your problem will be solved.
Disabling NVidia Network services stopped that for me.
While updating drivers etc. is good practice, it is usually just a wild goosechase.