nbclark / hqcheat

26 stars 20 forks source link

Hangs on Processing #3

Open dot-dot-dot-dot opened 6 years ago

dot-dot-dot-dot commented 6 years ago

Hi, thanks for making such an awesome script. I was able to get the setup working up to the point where the script begins to finds the answer (it rarely gets to this point in time, but this is another issue), but then it hangs at a screen that says "Processing..." Has anyone encountered this and found a fix? Thanks in advance!

EDIT: I left it on, and I got this in my terminal after a few minutes:

` Processing...

<--- Last few GCs --->

[87330:0x104000000] 355466 ms: Mark-sweep 1824.5 (1945.2) -> 1824.4 (1906.7) MB, 1873.5 / 3.5 ms last resort GC in old space requested [87330:0x104000000] 357163 ms: Mark-sweep 1824.4 (1906.7) -> 1824.4 (1906.7) MB, 1696.7 / 4.8 ms last resort GC in old space requested

<--- JS stacktrace --->

==== JS stack trace =========================================

Security context: 0x42f35625749 1: keys(this=0x42f356046c1 <JSFunction Object (sfi = 0x42f30289d29)>,0x42f72456bd9 ) 2: _remove [/Users/alexscardigno/Desktop/hqcheat-master/node_modules/chokidar/index.js:523] [bytecode=0x42f27921989 offset=121](this=0x42f724538a9 ,directory=0x42f69307db9 <String[159]: /Users/alexscardigno/Desktop/Desktop/technical data/Tools/MS ...

FATAL ERROR: CALL_AND_RETRY_LAST Allocation failed - JavaScript heap out of memory 1: node::Abort() [/usr/local/bin/node] 2: node::FatalException(v8::Isolate, v8::Local, v8::Local) [/usr/local/bin/node] 3: v8::internal::V8::FatalProcessOutOfMemory(char const, bool) [/usr/local/bin/node] 4: v8::internal::Factory::NewFixedArray(int, v8::internal::PretenureFlag) [/usr/local/bin/node] 5: v8::internal::KeyAccumulator::GetOwnEnumPropertyKeys(v8::internal::Isolate*, v8::internal::Handle) [/usr/local/bin/node] 6: v8::internal::FastKeyAccumulator::GetKeysFast(v8::internal::GetKeysConversion) [/usr/local/bin/node] 7: v8::internal::FastKeyAccumulator::GetKeys(v8::internal::GetKeysConversion) [/usr/local/bin/node] 8: v8::internal::KeyAccumulator::GetKeys(v8::internal::Handle, v8::internal::KeyCollectionMode, v8::internal::PropertyFilter, v8::internal::GetKeysConversion, bool) [/usr/local/bin/node] 9: v8::internal::Runtime_ObjectKeys(int, v8::internal::Object*, v8::internal::Isolate) [/usr/local/bin/node] 10: 0x30ea5fd842fd Abort trap: 6 Alexs-iMac:hqcheat-master alexscardigno$ `

nbclark commented 6 years ago

Hi @AlexS-GitHub ,

The script will sit there waiting for a screenshot to show up on the desktop.

You will need to follow all of the steps above to make sure to screenshot the Quicktime window to trigger the script to do anything. It has a watcher for png files saved to the desktop.

NOTE: Make sure to change the path to your desktop in code https://github.com/nbclark/hqcheat/blob/master/index.js#L108

dot-dot-dot-dot commented 6 years ago

On Wed, Jan 3, 2018 at 1:56 PM Nicholas Clark notifications@github.com wrote:

Hi @AlexS-GitHub https://github.com/alexs-github ,

The script will sit there waiting for a screenshot to show up on the desktop.

You will need to follow all of the steps above to make sure to screenshot the Quicktime window to trigger the script to do anything. It has a watcher for png files saved to the desktop.

NOTE: Make sure to change the path to your desktop in code https://github.com/nbclark/hqcheat/blob/master/index.js#L108

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/nbclark/hqcheat/issues/3#issuecomment-355095366, or mute the thread https://github.com/notifications/unsubscribe-auth/AJTg33qtdL1tIMMmQJmlLebdxQtwuSfRks5tG81IgaJpZM4RQM6k .

Already made sure of this. The script sees the png, but doesn’t act upon it.

nbclark commented 6 years ago

Got it - Just to be sure, tesseract is installed (brew install tesseract)? Also can you send the output of "node -v"

dot-dot-dot-dot commented 6 years ago

I updated my Node.js. Tesseract is installed. I’m not home right now, so I can’t really check. I use macports so that may be it. I have node, tesseract, and tesseract-eng installed.

nbclark commented 6 years ago

K. A few steps to try when home:

  1. Comment out https://github.com/nbclark/hqcheat/blob/master/index.js#L38 and relaunch the script to see what the resulting cropped image looks like.
  2. If that doesn't work, try running tesseract screenshot.png out.log on your command line and see if ends up in out.log
  3. Barring that helping you out, can you post the screenshot that you are running the script on, and I can try locally
dot-dot-dot-dot commented 6 years ago

Thanks so much, I will do that.

dot-dot-dot-dot commented 6 years ago

Here is the image I am using. https://gyazo.com/12133fd53f8b2a2e7eb8f87c47984b08

Tesseract, interestingly enough, provides no output. Out.log.txt is blank. Also, I was not able to find a cropped image. It seems the problem is on my end, perhaps with Tesseract. Can you suggest anything?