Hello Berry,
It was good to talk to you at MEDC.
We are still having occasional lockup problems with the serial port under the emulator. We have verified the problem does not exist with the test program (C#) running on the desktop under the full framework. I talked to A. Wong as we suspected the Compact Framework may be the problem. I now also have a CE 5.0 image running on our target hardware device and preliminary testing does not show the same problem (with CF2sp1). The same test program (and CF2sp1) under the emulator still shows the problem. It seems to be random and I do not have a good test program that I can reproduce the problem repeatedly (I'am working on it).
A couple of thing we have observed:
It is related to the TX write as this function get blocked and never returns (with TX time out default, infinite).
If we set TX timeout 5 sec, it will block for 5 sec then return but characters will not be sent.
We can aggravate the problem by transfering a large file via ActiveSync (cradled) while communication is taking place.
We are also using seperate TX and RX threads.
We suspect a resource lock problem or memory allocation problem in the serial port driver
I am working on getting more definitive information about the problem. The random nature makes it tough.
David Vescovi

Serial port lockup
Jemima
Thanks Barry, I try some of your suggestions. The image I am using is one I created with your BSP (generated with pretty much the default PB settings). We saw the same symptoms with the PPC image. I have not done a debug build but its something I could try. Stay tuned...
CyanBlue
I'm sorry that you're still having troubles with this. When you see the lockup, is just your app locked up, or does the whole OS lock up inside the emulator
Since your app runs on CE 5.0, have you tried downloading the CE 5.0 DeviceEmulator BSP and running your app there That'd give you full source/symbols in Platform Builder for the emulator's serial driver.
I understand that the hang is not easily reproduced. If you can get one to happen, can you do the following steps for me
- attach the NTSD.EXE debugger to DeviceEmulator.exe. You can use NT's tasklist.exe to dump the list of runnings processes, then run "ntsd -p YYYY" where YYYY is the process ID of the DeviceEmulator.exe
- at the NTSD "0:000>" prompt, type ".dump -f c:\barrybo.dmp". This will create a full memory dump of the DeviceEmulator.exe process. It'll be a big file - a few hundred mb in size.
- then send me a mail at barrybo@microsoft.com and I'll arrange a way for you to send me the file. From there, I'll try to work backwards from the emulator's state, to see why serial I/O hangs.
Barry