RegulatedNoise - trade tool with zxctypo's best-in-class OCR (EliteOCRReader as-was)

This is what I love about the ED community, stuff like this, I pull into a station, get screenshots and carry on with the game. It works well and I am sure I'll be able to start making good money trading soon.

Many thanks for your work on this, As it is, it is great, if it gets better....
 
Did you ever have a chance to test out my screenshot, maxh?

I did and couldn't replicate it, which leads me to guess that it's to do with commodity names already present in your autosave.CSV. can you rename your autosave.csv temporarily so RN can't find it, then restart RN and try OCRing that same screen shot and see if it crashes, plz?
 
I did and couldn't replicate it, which leads me to guess that it's to do with commodity names already present in your autosave.CSV. can you rename your autosave.csv temporarily so RN can't find it, then restart RN and try OCRing that same screen shot and see if it crashes, plz?

autosave.csv is empty except for the header line, but I've renamed it to .bak and will give it a try. (I have to retake the shot; I don't keep them around.)

- - - - - Additional Content Posted / Auto Merge - - - - -

It dies on a different shot now (same system). The "page 2" shot. :/
 
Actually, dies on a page 1 shot at a different station now.

Stack:

s.d.i.Clone()
rn.ocr.ProcessNewScreenshot() (ocr.cs line 95)
at
rn.ocr.ScreenshotCreated() (ocr.cs line 47)
 
The problem seems to be related to the auto delete after import option. With that off, I don't seem to have problems. (But I'd need the option to work, for "production" use; these BMPs are huge.)

I'll keep trying more stations.
 
Confirmed - the "delete after import" option is breaking something for me. Turning that off makes everything work (er, except, needs lots of correction, but that's probably expected). That option is terribly useful though, as E:D uses gigantic BMPs for screenshots.
 
Ok , will do,

http://i.imgur.com/YPsGNYQ.png this is one of the images that didn't work My Res is 1920x1080 32 true @144 hz

https://www.dropbox.com/s/6aijpm1ol9qajos/Calibration.txt?dl=0 calibration.txt file from RegulatedNoise directory,

Hi Sutex... unfortuntely the image you posted (http://i.imgur.com/YPsGNYQ.png) shows Screenshot_0067.bmp running inside IrfanView on your Windows desktop. I need the *exact* Screenshot_0067.bmp itself. You can go to http://imgur.com if you need somewhere to easily upload it.

I did try replicating the problem with your calibration values by taking my own 1920x1080 screenshots, but they didn't line up at all well with your calibration values, which is interesting in and of itself and makes me even more interested to see the exact Screenshot_0067.bmp.

Also, let me ask the obvious - I presume you haven't changed the FOV or anything else? It's best for me to ask and be sure.
 
Actually, dies on a page 1 shot at a different station now.

Stack:

s.d.i.Clone()
rn.ocr.ProcessNewScreenshot() (ocr.cs line 95)
at
rn.ocr.ScreenshotCreated() (ocr.cs line 47)

I can't replicate this at all, but I can see the line of code that's blowing up; I'll tweak that line so that even if it fails to send the screenshot back to the UI for display, it will continue anyway. Hopefully that will a) get you moving again, and b) shed more light on when the problem occurs. When it *does* occur, it shouldn't crash, but it will put a note in the Ocr log in your RN/Logs folder.

- - - - - Additional Content Posted / Auto Merge - - - - -

when correcting the station name I need to leave a space after it before saving, or the formatting is wrong (i.e. no gap is left between station and system which is in brackets). If I don't do this, it is also saved as a new station.

Well spotted, fixed in the next version.
 
I can't replicate this at all, but I can see the line of code that's blowing up; I'll tweak that line so that even if it fails to send the screenshot back to the UI for display, it will continue anyway. Hopefully that will a) get you moving again, and b) shed more light on when the problem occurs. When it *does* occur, it shouldn't crash, but it will put a note in the Ocr log in your RN/Logs folder.

Cool, will try it out when I play next (and hour or so). :)
 
Last edited:
Still throws an exception and the JIT debugging dialog - "process cannot access file because it's held open" (paraphrased, but you know the message I mean). But unlike before clicking "continue" on the JIT dialog allows it to continue where before it crashed completely.
 
Still throws an exception and the JIT debugging dialog - "process cannot access file because it's held open" (paraphrased, but you know the message I mean). But unlike before clicking "continue" on the JIT dialog allows it to continue where before it crashed completely.

Hm I guess we found the problem area even if not the cause then. Next time it crashes, can you open up your most recent Ocr log (in the logs directory) - it should have dumped the exception information there under the heading "Ignoring _bOriginal.Clone() error..." - please post that exception information...
 
Hm I guess we found the problem area even if not the cause then. Next time it crashes, can you open up your most recent Ocr log (in the logs directory) - it should have dumped the exception information there under the heading "Ignoring _bOriginal.Clone() error..." - please post that exception information...

Here:

Code:
2015/01/04 15:36:35: ERROR: Error in ProcessNewScreenshot:2015/01/04 15:36:35: ERROR: System.ArgumentException: Parameter is not valid.
   at System.Drawing.Bitmap..ctor(String filename)
   at RegulatedNoise.Ocr.ProcessNewScreenshot(String screenshot) in d:\git\RN3\RegulatedNoise\RegulatedNoise\Ocr.cs:line 762015/01/04 15:36:35: ERROR: Parameter is not valid.2015/01/04 15:36:35: ERROR:    at System.Drawing.Bitmap..ctor(String filename)
   at RegulatedNoise.Ocr.ProcessNewScreenshot(String screenshot) in d:\git\RN3\RegulatedNoise\RegulatedNoise\Ocr.cs:line 76
 
Last edited:
Actually was more after full crash:

Code:
2015/01/04 15:36:35: ERROR: Error in ProcessNewScreenshot:2015/01/04 15:36:35: ERROR: System.ArgumentException: Parameter is not valid.
   at System.Drawing.Bitmap..ctor(String filename)
   at RegulatedNoise.Ocr.ProcessNewScreenshot(String screenshot) in d:\git\RN3\RegulatedNoise\RegulatedNoise\Ocr.cs:line 762015/01/04 15:36:35: ERROR: Parameter is not valid.2015/01/04 15:36:35: ERROR:    at System.Drawing.Bitmap..ctor(String filename)
   at RegulatedNoise.Ocr.ProcessNewScreenshot(String screenshot) in d:\git\RN3\RegulatedNoise\RegulatedNoise\Ocr.cs:line 762015/01/04 15:37:44: Ignoring _bOriginal.Clone() error...
System.ArgumentException: Parameter is not valid.
   at System.Drawing.Image.Clone()
   at RegulatedNoise.Ocr.ProcessNewScreenshot(String screenshot) in d:\git\RN3\RegulatedNoise\RegulatedNoise\Ocr.cs:line 1012015/01/04 15:37:45: ERROR: Error in Crop:2015/01/04 15:37:45: ERROR: System.ArgumentException: Parameter is not valid.
   at System.Drawing.Bitmap..ctor(Int32 width, Int32 height, PixelFormat format)
   at System.Drawing.Bitmap..ctor(Int32 width, Int32 height)
   at RegulatedNoise.Ocr.Crop(Bitmap b, Rectangle r) in d:\git\RN3\RegulatedNoise\RegulatedNoise\Ocr.cs:line 4492015/01/04 15:37:45: ERROR: Parameter is not valid.2015/01/04 15:37:45: ERROR:    at System.Drawing.Bitmap..ctor(Int32 width, Int32 height, PixelFormat format)
   at System.Drawing.Bitmap..ctor(Int32 width, Int32 height)
   at RegulatedNoise.Ocr.Crop(Bitmap b, Rectangle r) in d:\git\RN3\RegulatedNoise\RegulatedNoise\Ocr.cs:line 4492015/01/04 15:37:46: ERROR: Error in ScreenshotCreated:2015/01/04 15:37:46: ERROR: System.NullReferenceException: Object reference not set to an instance of an object.
   at RegulatedNoise.Ocr.ProcessNewScreenshot(String screenshot) in d:\git\RN3\RegulatedNoise\RegulatedNoise\Ocr.cs:line 119
   at RegulatedNoise.Ocr.ScreenshotCreated(String filePath) in d:\git\RN3\RegulatedNoise\RegulatedNoise\Ocr.cs:line 472015/01/04 15:37:46: ERROR: Object reference not set to an instance of an object.2015/01/04 15:37:46: ERROR:    at RegulatedNoise.Ocr.ProcessNewScreenshot(String screenshot) in d:\git\RN3\RegulatedNoise\RegulatedNoise\Ocr.cs:line 119
   at RegulatedNoise.Ocr.ScreenshotCreated(String filePath) in d:\git\RN3\RegulatedNoise\RegulatedNoise\Ocr.cs:line 47
 
Actually was more after full crash

Can you try the attached replacement EXE? The difference with this one is that when it detects and opens your screenshot (at Ocr.cs line 76...) it will open the file and copy it into memory without locking the file, which is one reason we might be getting "Parameter is not valid". If the first (line 76) problem disappears I think the others will collapse too... :-/

Anyone else having the same problem is welcome to try this too of course...
https://drive.google.com/file/d/0B8HLRQqyuPD9bDRnUmtwelp6eFk/view?usp=sharing
 
This is a problem of the program deleting the file before it's really done with it - getting a "Could not find file" exception now.

Code:
2015/01/04 16:16:09: ERROR: Error in ProcessNewScreenshot:2015/01/04 16:16:09: ERROR: System.IO.FileNotFoundException: Could not find file 'C:\Users\Pazuzu\Pictures\Frontier Developments\Elite Dangerous\Screenshot_0006.bmp'.
File name: 'C:\Users\Pazuzu\Pictures\Frontier Developments\Elite Dangerous\Screenshot_0006.bmp'
   at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
   at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)
   at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share)
   at System.IO.File.OpenRead(String path)
   at RegulatedNoise.Ocr.ProcessNewScreenshot(String screenshot)2015/01/04 16:16:09: ERROR: Could not find file 'C:\Users\Pazuzu\Pictures\Frontier Developments\Elite Dangerous\Screenshot_0006.bmp'.2015/01/04 16:16:09: ERROR:    at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
   at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)
   at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share)
   at System.IO.File.OpenRead(String path)
   at RegulatedNoise.Ocr.ProcessNewScreenshot(String screenshot)2015/01/04 16:17:03: Ignoring _bOriginal.Clone() error...
System.ArgumentException: Parameter is not valid.
   at System.Drawing.Image.Clone()
   at RegulatedNoise.Ocr.ProcessNewScreenshot(String screenshot)2015/01/04 16:17:04: ERROR: Error in Crop:2015/01/04 16:17:04: ERROR: System.ArgumentException: Parameter is not valid.
   at System.Drawing.Bitmap..ctor(Int32 width, Int32 height, PixelFormat format)
   at System.Drawing.Bitmap..ctor(Int32 width, Int32 height)
   at RegulatedNoise.Ocr.Crop(Bitmap b, Rectangle r)2015/01/04 16:17:04: ERROR: Parameter is not valid.2015/01/04 16:17:04: ERROR:    at System.Drawing.Bitmap..ctor(Int32 width, Int32 height, PixelFormat format)
   at System.Drawing.Bitmap..ctor(Int32 width, Int32 height)
   at RegulatedNoise.Ocr.Crop(Bitmap b, Rectangle r)2015/01/04 16:17:06: ERROR: Error in ScreenshotCreated:2015/01/04 16:17:06: ERROR: System.NullReferenceException: Object reference not set to an instance of an object.
   at RegulatedNoise.Ocr.ProcessNewScreenshot(String screenshot)
   at RegulatedNoise.Ocr.ScreenshotCreated(String filePath)2015/01/04 16:17:06: ERROR: Object reference not set to an instance of an object.2015/01/04 16:17:06: ERROR:    at RegulatedNoise.Ocr.ProcessNewScreenshot(String screenshot)
   at RegulatedNoise.Ocr.ScreenshotCreated(String filePath)

(As I said, this only occurs with "delete after importing" turned on.)
 
Vendraen;1439221[code said:
2015/01/04 16:16:09: ERROR: Error in ProcessNewScreenshot:2015/01/04 16:16:09: ERROR: System.IO.FileNotFoundException: Could not find file 'C:\Users\Pazuzu\Pictures\Frontier Developments\Elite Dangerous\Screenshot_0006.bmp'.
...
at System.IO.File.OpenRead(String path)
at RegulatedNoise.Ocr.ProcessNewScreenshot(String screenshot)
[/code]

(As I said, this only occurs with "delete after importing" turned on.)

Right... based on this theory => http://stackoverflow.com/questions/3976862/filenotfoundexception-in-filesystemwatcher, try this => https://drive.google.com/file/d/0B8HLRQqyuPD9WF9qa2RiR053eUE/view?usp=sharing... we can only keep trying! :)
 
Back
Top Bottom