• Welcome to Forum.Deepsoftware.Com. Please login or sign up.
 

BSOD (Stop error) when Closing TnrComm

Started by Eelco, March 30, 2010, 09:16:31 am

Previous topic - Next topic

Eelco

We noticed that when using a "Silicon Labs CP210x USB to UART Bridge" or "BlueTooth communication port"
the computer would crash after closing the port.

After modifying the code in methode "TnrBaseIO.Close" to first destroy the thread and then release the handle
the crashes occur less often.
Does anyone else have the same problem? Is there some solution?

Kind regards,
Eelco

Roman Novgorodov

Hello

Thank you for your information.

Please we need more details:

1) Windows version
2) Delphi version
3) nrComm Lib version
4) CPU model (cores, HT?).

Three years ago we had such trouble with Broadcom BT adapter, after its removing. But this trouble were fixed with new BT drivers.

Roman Novgorodov
DeepSoftware.Com
DeepSoftware llc - The professional components for Delphi/CBuilder/.NET. The high quality custom software development.
Forums.nrCommLib.Com - DeepSoftware Tech Support Forum.

Eelco

Good morning Roman,

Here is the information you asked for.

1) Windows version: Microsoft XP Professional SP3
2) Delphi version:  CodeGearâ,,¢ RAD Studio 2007  Version 11.0.2902.10471
3) nrComm Lib version: nrcomm pro 9.04
4) CPU model (cores, HT?): Intel Core DUO CPU E7200 @ 2.53GHz, 2GB memory
                                     Intel i7 920, 3GB memory
5) Broadcom driver version: 5.5.0.2300
6) Silicon Labs CP210x USB to UART Bridge: 5.4.29.0

If you need more info please let me know. Hope you find a solution.

Eelco



Eelco

Good morning Roman,

This morning I had an other BSOD this are the fault reports of windows.

Regards Eelco

Roman Novgorodov

Hello

Thank you for your information.

We can't reproduce trouble on our hardware.
We are trying to repeat BSOD.

Can you upload simple sample of application (with sources) that raises BSOD? I want to look into your code.

Can you test on other versions of Windows? I think that BSOD should appear on Win7 too.

We don't see your code, but you can try:
1) Check that Close() call is in same thread that opens port
2) Call methods for clear serial port buffer before closing:
    ClearDeviceBuffers();
    FlushOutputBuffer();

3) Possible you can try to play with COM control lines before close connection:
    SetStateDTR();
    SetStateRTS();

Please understand that BSOD is kernel error. Kernel exception is raised by driver always. nrComm works in user mode only.
In most cases if it raises BSOD, this means that something is wrong in driver.

Thanks for dump, we will try analyze it.

Roman Novgorodov
DeepSoftware.Com
DeepSoftware llc - The professional components for Delphi/CBuilder/.NET. The high quality custom software development.
Forums.nrCommLib.Com - DeepSoftware Tech Support Forum.

Eelco

Hello Roman

Wrote a small test program that will cause the BSOD most of the time
at run 30 or so. (the program is attached)
Error also happens on Windows 7.
Last time it failed on the "Silicon Labs CP210x USB to UART Bridge version 5.4.29.0".
The error occurs when closing the port.
Also attached last Windows XP error report.

Regards Eelco


Roman Novgorodov

Thank you for sample application.
We are testing it now.
It is 298 of 1000 and all is ok.
Unfortunately, whilst We can't reproduce BSOD.

We will try to find different BT adn USB serial port adapters and test more.

I have analyzed your crash dump.
And At first view It shows kernel exception in Wdf01000.sys driver.
DeepSoftware llc - The professional components for Delphi/CBuilder/.NET. The high quality custom software development.
Forums.nrCommLib.Com - DeepSoftware Tech Support Forum.

Roman Novgorodov

Hello

Please try to set UseMainThread property in False and test again.

Roman Novgorodov
DeepSoftware.Com
DeepSoftware llc - The professional components for Delphi/CBuilder/.NET. The high quality custom software development.
Forums.nrCommLib.Com - DeepSoftware Tech Support Forum.

Eelco

Setting the UseMainThread property to False does not work either.
We still get the BSOD.

Regards Eelco

Roman Novgorodov

Hello

You need to try the latest release v9.06 or higher.

Roman Novgorodov
DeepSoftware.Com
DeepSoftware llc - The professional components for Delphi/CBuilder/.NET. The high quality custom software development.
Forums.nrCommLib.Com - DeepSoftware Tech Support Forum.