[C#] Access violation random

General information about Neurotechnology and its software

[C#] Access violation random

Postby huypl » Jan 06, 2018 15:58

Hi All !
I use Neurotec SDK to develop an application by C# (window form application)
Function is:
- create subject
- create face and assign to a faceview.
- capture a face and identify via Neuro Server.
When i run, sometime it throw Access violation exception and crash (Cannot try/catch this exception).
This is my code
Code: Select all
//create client
NBiometricClient _biometricClient = new NBiometricClient { BiometricTypes = NBiometricType.Face, UseDeviceManager = true };
NClusterBiometricConnection nClusterBiometricConnection = new NClusterBiometricConnection(ConfigureObject.SERVER_IP, ConfigureObject.CLIENT_PORT, ConfigureObject.ADMIN_PORT);
//create subject
NSubject _subject = new NSubject();
NFace _face = new NFace { CaptureOptions = NBiometricCaptureOptions.Stream };
facesView.Face = _face;
var status = _biometricClient.Capture(_subject); //It crash here.
if (status == NBiometricStatus.Ok) {
NBiometricStatus status2 = _biometricClient.Identify(_subject);

- The code run under BackgroundWorker.
- I use visual sudio 2017, build under x86, .Net Framework 4.6.1
- Lastest neuro sdk.

Please give to me some suggest.
Posts: 6
Joined: Dec 12, 2017 13:40

Re: [C#] Access violation random

Postby MartynasV » Jan 08, 2018 12:57

Hello huypl,

Send source code of application, which would reproduce the same issue on our side to support@neurotechnology.com with issue description, also provide following information:
Can you reproduce it using our unmodified samples?
Full crash log.
SDK revision number(can be found in SDK root directory, in Revision.txt file).

P.S. Since .NET version 4 you can't catch Access Violation Exception by default, but with little modification you can catch it, read https://msdn.microsoft.com/en-us/library/system.accessviolationexception(v=vs.110).aspx .
Martynas V
Posts: 498
Joined: Feb 27, 2015 11:24
Location: Vilnius, Lithuania

Return to Public

Who is online

Users browsing this forum: Bing [Bot] and 1 guest