matt-m-o / YomiNinja

Open-source OCR and dictionary tool.
GNU General Public License v3.0
238 stars 4 forks source link

Overlay area turns black when activating the ocr (if not launched as admin) #15

Open Kukoro opened 9 months ago

Kukoro commented 9 months ago

image

image

It looks odd that the whole area turns black but it's still useable.

Kukoro commented 9 months ago

Problem disappeared after restarting the application as admin

matt-m-o commented 9 months ago

I was unable to replicate the issue. To better understand and address it, could you please provide some additional information?

Cyanisk commented 9 months ago

This may be completely unrelated to Kukoro's issue, but I had a problem that sounded very similar on Linux using the Qtile window manager. The problem for me was probably caused by the fact that Qtile doesn't support transparency and needs a compositor like Picom for this.

So Linux users should make sure their window manager supports transparency, or install and enable a compositor that does. Additionally, for tiling window managers, users may have to manually line up the overlay window with the target window

misosouphero commented 8 months ago

I seem to have the same issue as Kukoro even tho the program was started as admin. The print screen button does load the OCR, I do see the highlights, and the overlay seems to be on top of the application, but it is all black and can't see the program (all applications including games like persona 4 and 5, or browsers like edge and chrome) under that. I am trying this on an ROG Ally windows 11 AMD Ryzen Z1 Extreme

matt-m-o commented 8 months ago

@misosouphero I suspect this issue may be related to some other software. Unfortunately, I don't have access to a ROG Ally to test it.

To help narrow down the possibilities, could you please try running the application in a Windows Sandbox environment? This will allow us to isolate the application and determine if it's caused by any third-party applications or conflicting settings. Ensure to install VCRedist in the sandbox whenever a new session is launched.

misosouphero commented 8 months ago

@misosouphero I suspect this issue may be related to some other software. Unfortunately, I don't have access to a ROG Ally to test it.

To help narrow down the possibilities, could you please try running the application in a Windows Sandbox environment? This will allow us to isolate the application and determine if it's caused by any third-party applications or conflicting settings. Ensure to install VCRedist in the sandbox whenever a new session is launched.


Thank you for your reply. I unfortunately do not have access to virtual machine software on the device, and the windows sandbox doesn't install on Windows 11 home version. Meanwhile, I have tried to change the ocr engine, deleting/reinstalling; however, the issue seems to persist. From further testing, I noticed that when selecting a specific window/program, yomininja will not overlay (no red square framing) on the window/program and nothing will appear even if I press the print screen input. When I select an entire screen as the source, once the print screen button is pressed, the yomininja overlay will come to the foreground (all black) and cover the whole screen.

matt-m-o commented 8 months ago

@misosouphero Try running Yomininja in Windows Safe Mode. I found some instructions that might help, but I don't know if it works. Safe Mode starts Windows with only essential drivers, which can help identify if the problem is related to third-party software.

misosouphero commented 8 months ago

@misosouphero Try running Yomininja in Windows Safe Mode. I found some instructions that might help, but I don't know if it works. Safe Mode starts Windows with only essential drivers, which can help identify if the problem is related to third-party software.

Yomininja does not seem to load in safe mode

matt-m-o commented 8 months ago

@misosouphero

Oh, sorry about that. Please try selecting "Safe Mode with Networking" Yomininja checks GitHub for updates, so it requires at least a network driver (an internet connection is not required). It worked fine here with Windows 10.

Yomininja v0 5 1 SafeMode

misosouphero commented 8 months ago

@misosouphero

Oh, sorry about that. Please try selecting "Safe Mode with Networking" Yomininja checks GitHub for updates, so it requires at least a network driver (an internet connection is not required). It worked fine here with Windows 10.

This did not seem to solve the issue. Is it possible that a compatibility issue related to the Z1 Extreme processor might be causing the problem?

matt-m-o commented 8 months ago

@misosouphero

Did the application load? If the overlay remains black, even in safe mode, it might be related to the GPU or something that ASUS changed on Windows.

misosouphero commented 8 months ago

@misosouphero

Did the application load? If the overlay remains black, even in safe mode, it might be related to the GPU or something that ASUS changed on Windows.

The application did not launch at all, even in safe mode with networking.

I don't know if this will help, but when using the program in normal windows mode, using OCR shortcut with ONNX CPU selected will cause a black screen with red boxes (detecting words). If using OpenVino CPU, the same black screen will appear when using the OCR shortcut, but it doesn't detect the words of the selected screen (no red boxes).

madmalkav commented 3 months ago

Can you please try the last version and confirm if the problem persists?

GunnerTardis commented 3 months ago

I am having this problem as well and no solutions have been effective so far.

I am on a windows 11 pc and the overlay area turns completely black with just the red text boxes. I am able to hover over them to check their definitions with 10ten but I cannot see anything beyond the fully black screen.

DiscourseStu commented 2 months ago

I also have this problem. RTX 4070 with latest drivers. I tried launching as an admin, no effect. I tried exclusive fullscreen, borderless window, different applications, all the same result. I've tried other applications in the past that where supposed to do something similiar, and had the same problem.

Mupu commented 2 months ago

If you are using a chromium browser on windows at least, it is this option: chrome://flags/#calculate-native-win-occlusion

Just disable it and it will work :)

Kukoro commented 2 months ago

Hello and sorry for the long time without a response. I tested it again today, with and without admin and I got this black screen.

The Problem

YomiNinja_xVsZBCSD72

If i click on my second monitor on a different application it turns to this:

YomiNinja_dmIWQvpaw5

Informations

I will check what the app does in safe mode...

Kukoro commented 2 months ago

Live from safemode. The overlay works here

works

I then tried soem stuff that didn't have any effect once I was back to normal mode

Now it's the needle in a haystack unfortunate :(

ScaryDescent commented 2 months ago

I had the same problem solutions here didn't work and application didn't even start in safe mode I just added --disable-gpu-compositing to the shortcut it is working now but i am not sure if it breaks anything I am using gtx 1050 ti on windows 10

Kukoro commented 2 months ago

I had the same problem solutions here didn't work and application didn't even start in safe mode I just added --disable-gpu-compositing to the shortcut it is working now but i am not sure if it breaks anything I am using gtx 1050 ti on windows 10

Yes that fixed it for me too.

GunnerTardis commented 2 months ago

I had the same problem solutions here didn't work and application didn't even start in safe mode I just added --disable-gpu-compositing to the shortcut it is working now but i am not sure if it breaks anything I am using gtx 1050 ti on windows 10

Confirming that this fixed my issue as well. Thank you so much!

For anyone who may be confused on how to go about this.

  1. Navigate to the Yomininja shortcut, right click and select properties.
  2. Select the shortcut tab
  3. In the shortcut tab look for the target text box and navigate to the end of the text adding a space at the end.
  4. Copy and paste "--disable-gpu-compositing" without quotations into the end of the text box.
  5. Apply the changes and you should be good to go.
matt-m-o commented 2 months ago

Thank you so much! I upgraded the dependencies in v0.8, which may fix the issue. However, I can’t confirm this as I haven’t been able to reproduce the behavior. I’ve also added an option in the settings to disable hardware acceleration in case the first solution doesn’t work, and I’ll be adding an option to disable GPU compositing soon.