OneMoreGres / ScreenTranslator

Screen capture, OCR and translation tool.
MIT License
913 stars 118 forks source link

Crash on the launch #110

Closed kup1o closed 2 years ago

kup1o commented 2 years ago

Describe the bug

When I launch the application first time I need to update recognizers and translators. I have tried different setups:

  1. Korean & English recognizer & Papago translator
  2. Russian & English recognizer & Yandex translator
  3. Installed whole files that I could ever.

After download any recognizer & translator the application is going to crash with next errors(not shown in the application's log):

[3:3:0100/000000.029649:ERROR:zygote_linux.cc(614)] Zygote could not fork: process_type renderer numfds 3 child_pid -1
[3:3:0100/000000.029853:ERROR:zygote_linux.cc(646)] write: Broken pipe (32)
zsh: segmentation fault (core dumped)  ./ScreenTranslator-3.3.0.AppImage`

Sometime when I have been launching the application I have seen in logs that TESSDATA_PREFIX environment variable is not setup. I have added the next line in my ~/.bashrc export TESSDATA_PREFIX = '/home/user/.local/share/Gres/ScreenTranslator/assets/tessdata/

To Reproduce Steps to reproduce the behavior:

  1. Download the latest release
  2. Open the directory with .AppImage file and make it executable
  3. Run the application in the kitty terminal
  4. Open an Update category in the Settings
  5. Download any recognizer & translator
  6. See the crash

Expected behavior An application that works properly.

Logs

2022-08-11T05:50:10 140545775517120 :0 CRIT "Incorrect settings found. Go to Settings"
2022-08-11T05:50:24 140545775517120 :0 DEBUG downloaded QUrl("https://raw.githubusercontent.com/OneMoreGres/ScreenTranslator/master/updates.json") data.size()= 60788
2022-08-11T05:50:29 140545775517120 :0 DEBUG applyAction 0 "$tessdata$/eng.traineddata"
2022-08-11T05:50:30 140545775517120 :0 DEBUG downloaded QUrl("https://github.com/tesseract-ocr/tessdata_best/raw/main/eng.traineddata") data.size()= 15400601
2022-08-11T05:50:30 140545775517120 :0 DEBUG downloaded file QUrl("https://github.com/tesseract-ocr/tessdata_best/raw/main/eng.traineddata") "/home/user/.local/share/Gres/ScreenTranslator/assets/tessdata/eng.traineddata"
2022-08-11T05:50:44 140545775517120 :0 DEBUG applyAction 0 "$tessdata$/kor.traineddata"
2022-08-11T05:50:45 140545775517120 :0 DEBUG downloaded QUrl("https://translator.gres.biz/resources/tessdata_best/kor.traineddata.zip") data.size()= 11565918
2022-08-11T05:50:45 140545775517120 :0 DEBUG downloaded file QUrl("https://translator.gres.biz/resources/tessdata_best/kor.traineddata.zip") "/home/user/.local/share/Gres/ScreenTranslator/assets/tessdata/kor.traineddata"
2022-08-11T05:50:50 140545775517120 :0 DEBUG applyAction 0 "$translators$/papago.js"
2022-08-11T05:50:50 140545775517120 :0 DEBUG downloaded QUrl("https://raw.githubusercontent.com/OneMoreGres/ScreenTranslator/master/translators/papago.js") data.size()= 2164
2022-08-11T05:50:50 140545775517120 :0 DEBUG downloaded file QUrl("https://raw.githubusercontent.com/OneMoreGres/ScreenTranslator/master/translators/papago.js") "/home/user/.local/share/Gres/ScreenTranslator/assets/translators/papago.js"
2022-08-11T05:50:54 140545775517120 :0 DEBUG updateSettings

DevTools listening on ws://127.0.0.1:47527/devtools/browser/a47997ba-b1f4-4b0e-a473-41286801ed43
2022-08-11T05:50:55 140545775517120 :0 DEBUG Created page scriptName= "papago.js"
2022-08-11T05:50:55 140545775517120 :0 WARN Remote debugging server started successfully. Try pointing a Chromium-based browser to http://127.0.0.1:47527
2022-08-11T05:50:55 140545775517120 :0 DEBUG Created page scriptName= "papago.js"
2022-08-11T05:50:56 140545775517120 :0 DEBUG Created page scriptName= "papago.js"

Screenshots If a screenshot is needed to understand the situation better it will be added.

Desktop (please complete the following information):

Additional context I think that the crash is caused because the system does not have the necessary library to run and the problem is not within the application.

OneMoreGres commented 2 years ago

Hi! Try settings QTWEBENGINE_DISABLE_SANDBOX=1 environment variable.

Tessdata path is set internally when initializing the lib.