Author Topic: BSOD (Stop error) when Closing TnrComm  (Read 2136 times)

Eelco

  • Newbie
  • *
  • Posts: 5
    • View Profile
BSOD (Stop error) when Closing TnrComm
« on: March 30, 2010, 12:16:31 pm »
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

  • Engineer
  • Administrator
  • Hero Member
  • *****
  • Posts: 994
  • we will win
    • View Profile
    • Forums.nrCommLib.Com
Re: BSOD (Stop error) when Closing TnrComm
« Reply #1 on: March 30, 2010, 04:08:28 pm »
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

  • Newbie
  • *
  • Posts: 5
    • View Profile
Re: BSOD (Stop error) when Closing TnrComm
« Reply #2 on: March 31, 2010, 07:01:35 am »
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

  • Newbie
  • *
  • Posts: 5
    • View Profile
Re: BSOD (Stop error) when Closing TnrComm
« Reply #3 on: March 31, 2010, 08:47:27 am »
Good morning Roman,

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

Regards Eelco

Roman Novgorodov

  • Engineer
  • Administrator
  • Hero Member
  • *****
  • Posts: 994
  • we will win
    • View Profile
    • Forums.nrCommLib.Com
Re: BSOD (Stop error) when Closing TnrComm
« Reply #4 on: April 02, 2010, 03:21:23 am »
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

  • Newbie
  • *
  • Posts: 5
    • View Profile
Re: BSOD (Stop error) when Closing TnrComm
« Reply #5 on: April 02, 2010, 12:27:26 pm »
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

  • Engineer
  • Administrator
  • Hero Member
  • *****
  • Posts: 994
  • we will win
    • View Profile
    • Forums.nrCommLib.Com
Re: BSOD (Stop error) when Closing TnrComm
« Reply #6 on: April 02, 2010, 05:55:48 pm »
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

  • Engineer
  • Administrator
  • Hero Member
  • *****
  • Posts: 994
  • we will win
    • View Profile
    • Forums.nrCommLib.Com
Re: BSOD (Stop error) when Closing TnrComm
« Reply #7 on: April 04, 2010, 11:21:56 am »
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

  • Newbie
  • *
  • Posts: 5
    • View Profile
Re: BSOD (Stop error) when Closing TnrComm
« Reply #8 on: April 19, 2010, 09:33:16 am »
Setting the UseMainThread property to False does not work either.
We still get the BSOD.

Regards Eelco

Roman Novgorodov

  • Engineer
  • Administrator
  • Hero Member
  • *****
  • Posts: 994
  • we will win
    • View Profile
    • Forums.nrCommLib.Com
Re: BSOD (Stop error) when Closing TnrComm
« Reply #9 on: April 19, 2010, 09:41:45 am »
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.