Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

System.NullReferenceException #40

Open
fireport opened this issue Sep 5, 2020 · 6 comments
Open

System.NullReferenceException #40

fireport opened this issue Sep 5, 2020 · 6 comments

Comments

@fireport
Copy link

fireport commented Sep 5, 2020

I'd installed version 1.67 of this lovely tools on my windows 10 Blue Iris Machine but i'm unable to use it.
In the log i only sse this error

51.023]: Starting analysis of C:\ai_images\laterale.20200905_141251250.jpg
[05.09.2020, 14:12:51.042]: (1/6) Uploading image to DeepQuestAI Server
[05.09.2020, 14:12:51.064]: (2/6) Waiting for results
[05.09.2020, 14:12:51.080]: (3/6) Processing results:
[05.09.2020, 14:12:51.097]: System.NullReferenceException | Riferimento a un oggetto non impostato su un'istanza di oggetto. (code: -2147467261 )
[05.09.2020, 14:12:51.116]: ERROR: Processing the following image 'C:\ai_images\laterale.20200905_141251250.jpg' failed. Failure in AI Tool processing the image.

Deepstack is installed on a linux machime using docker and, with demo code, works like a charms.
Can you help me ?

@VorlonCD
Copy link

VorlonCD commented Sep 5, 2020

Try my fork of the AI Tool: https://github.com/VorlonCD/bi-aidetection/releases

@feene
Copy link

feene commented Oct 3, 2020

I am getting the same code. code: -2147467261 - running deepstack noavx

Log from Deepstack
[GIN] 2020/10/03 - 02:30:50 | 200 | 153.12µs | 172.16.1.211 | POST /v1/vision/detection
[GIN] 2020/10/03 - 02:31:53 | 200 | 23.891µs | 172.16.1.211 | POST /v1/vision/detection

From AI
[02.10.2020, 20:29:33.655]: Starting analysis of F:\AI-Snaps\Garage1.20201002_202933533.jpg
[02.10.2020, 20:29:33.655]: System.IO.IOException | The process cannot access the file 'F:\AI-Snaps\Garage1.20201002_202933533.jpg' because it is being used by another process. (code: -2147024864 )
[02.10.2020, 20:29:33.655]: Could not access file - will retry after 10 ms delay
[02.10.2020, 20:29:33.667]: Retrying image processing - retry 1
[02.10.2020, 20:29:33.669]: System.IO.IOException | The process cannot access the file 'F:\AI-Snaps\Garage1.20201002_202933533.jpg' because it is being used by another process. (code: -2147024864 )
[02.10.2020, 20:29:33.669]: Could not access file - will retry after 20 ms delay
[02.10.2020, 20:29:33.691]: Retrying image processing - retry 2
[02.10.2020, 20:29:33.691]: System.IO.IOException | The process cannot access the file 'F:\AI-Snaps\Garage1.20201002_202933533.jpg' because it is being used by another process. (code: -2147024864 )
[02.10.2020, 20:29:33.693]: Could not access file - will retry after 30 ms delay
[02.10.2020, 20:29:33.725]: Retrying image processing - retry 3
[02.10.2020, 20:29:33.725]: (1/6) Uploading image to DeepQuestAI Server
[02.10.2020, 20:29:33.733]: (2/6) Waiting for results
[02.10.2020, 20:29:33.735]: (3/6) Processing results:
[02.10.2020, 20:29:33.735]: System.NullReferenceException | Object reference not set to an instance of an object. (code: -2147467261 )
[02.10.2020, 20:29:33.735]: ERROR: Processing the following image 'F:\AI-Snaps\Garage1.20201002_202933533.jpg' failed. Failure in AI Tool processing the image.

@feene
Copy link

feene commented Oct 3, 2020

-e VISION-SCENE=True -e VISION-DETECTION=True

Add to your Docker Start up. Was Missing the Detection Piece.

@mazcoder
Copy link

mazcoder commented Oct 18, 2020

I’ve been having the same problem/error code with my set up. Turns out I had a “true” instead of a “True” in the VISION-DETECTION Env in portainer.

@Thermaltech
Copy link

Thermaltech commented Oct 22, 2020

This error seems to be due to the lack of a null object trap on response.predictions before line 246 in Shell.cs.

Although I have not spent more than 5 mins looking at the code and deepstack API examples, it seems that if there are no objects detected in a picture, the response would be NULL or an empty JSON object, which the code does not account for prior to the FOR / EACH loop. I may be wrong, but hopefully it points in the right direction. The deepstack API does not seem to be well documented / published, only examples given, so hard to say for sure.

After a little more testing, and adding the VISION-SCENE=True environment variable to docker, the error seems to have gone away, but I think the reason, is that when VISION-SCENE is enabled, you never get a empty object returned, as there is always some type of scene in front of the camera, but the object is discarded / ignored as it is not one of the AI Tools standard relavent object types...

@kozoke
Copy link

kozoke commented Oct 31, 2020

Same issue.
I added:
-e VISION-SCENE=True
I had this already: -e VISION-DETECTION=True

However, I had true instead of a capitalized, True

Good luck! I'm up and running!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants