Author Topic: Access Violation  (Read 6376 times)

Ivaylo

  • Guest
Access Violation
« on: October 05, 2009, 01:15:21 PM »
Hello,

We using Lite version of wcl and get the access violation when we try to close out .net application.

Here is the error exception:

System.AccessViolationException was unhandled
  Message="Attempted to read or write protected memory. This is often an indication that other memory is corrupt."
  Source="wcl"
  StackTrace:
       at EnterCriticalSection(_RTL_CRITICAL_SECTION* )
       at wcl.wcl_int.CwclAPI.Unload(CwclAPI* )
       at wcl.wcl_int.CwclAPI.__vecDelDtor(CwclAPI* , UInt32 )
       at wcl.wclAPI.!wclAPI()
       at wcl.wclAPI.Dispose(Boolean )
       at System.ComponentModel.Component.Finalize()
  InnerException:

Offline Mike Petrichenko

  • Bluetooth Framework Developer
  • Administrator
  • Hero Member
  • *****
  • Posts: 3055
  • Karma: 1000
    • Soft Service Company
Re: Access Violation
« Reply #1 on: October 05, 2009, 01:28:10 PM »
Hi,

You should call wclAPI.Unload before closing the app (in Form_Close event handler). If you did so then it's good to have your exe which cause the exception. Then I can debug and fix the problem.

Ivaylo

  • Guest
Re: Access Violation
« Reply #2 on: October 05, 2009, 01:32:08 PM »
Hi,

yes I call UnLoad on application close event. Do you want me to send the c# project to you?
Also wclClient.Write is not return the count of byte send to the bluetooth device.

Offline Mike Petrichenko

  • Bluetooth Framework Developer
  • Administrator
  • Hero Member
  • *****
  • Posts: 3055
  • Karma: 1000
    • Soft Service Company
Re: Access Violation
« Reply #3 on: October 05, 2009, 01:35:13 PM »
Project would be better than exe.

Write method write ALL the buffer passed to it.

Ivaylo

  • Guest
Re: Access Violation
« Reply #4 on: October 05, 2009, 01:46:41 PM »
Here is the code: http://www.btframework.com/BlueToothLibrary.zip

sorry but I can't attach ZIP to post.

Ivaylo

  • Guest
Re: Access Violation
« Reply #5 on: October 05, 2009, 01:52:12 PM »
ops:) sorry

here is the right url

http://pirin-bg.net/BlueToothLibrary.zip

Offline Mike Petrichenko

  • Bluetooth Framework Developer
  • Administrator
  • Hero Member
  • *****
  • Posts: 3055
  • Karma: 1000
    • Soft Service Company
Re: Access Violation
« Reply #6 on: October 05, 2009, 01:59:08 PM »
Downloaded, going to check

Offline Mike Petrichenko

  • Bluetooth Framework Developer
  • Administrator
  • Hero Member
  • *****
  • Posts: 3055
  • Karma: 1000
    • Soft Service Company
Re: Access Violation
« Reply #7 on: October 05, 2009, 02:16:52 PM »
Here is the problem:

this.owclAPI = new wcl.wclAPI();           
this.owclAPI.Load();
-->>> this.owclAPI = new wcl.wclAPI();

Ivaylo

  • Guest
Re: Access Violation
« Reply #8 on: October 05, 2009, 03:33:09 PM »
Thank you. That fix the problem.

Offline Mike Petrichenko

  • Bluetooth Framework Developer
  • Administrator
  • Hero Member
  • *****
  • Posts: 3055
  • Karma: 1000
    • Soft Service Company
Re: Access Violation
« Reply #9 on: October 05, 2009, 04:24:09 PM »
You are very welcome.

Offline fabio.santini

  • Newbie
  • *
  • Posts: 26
  • Karma: 0
Re: Access Violation
« Reply #10 on: January 08, 2010, 05:34:58 PM »
I'm posting up this thread cause I'm having the same problem in different PCs during normal working. Error was the same (access violation) but closing invocation occurred.

I also reproduced the problem starting API and breaking project (during debug) without unloading it.

Version I'm using is 6.6.3.0 (complete - developer)

Offline Mike Petrichenko

  • Bluetooth Framework Developer
  • Administrator
  • Hero Member
  • *****
  • Posts: 3055
  • Karma: 1000
    • Soft Service Company
Re: Access Violation
« Reply #11 on: January 08, 2010, 05:39:33 PM »
Hi,

First, try the latest WCL version (6.7.1.0). If it does not fix the problem, send us project which reproduces the problem, we will take a look and fix.

 

Sitemap 1 2 3 4 5 6 7 8 9