gocv icon indicating copy to clipboard operation
gocv copied to clipboard

exit status 3221225794

Open theTulga opened this issue 3 years ago • 15 comments

gocv is not running after installation.

Description

I'm using 64-bit windows 10. After following steps on the installation guide my installation doesn't run.

Steps to Reproduce

  1. chdir %GOPATH%\src\gocv.io\x\gocv
  2. go run cmd\version\main.go is giving me exit status 3221225794

Your Environment

  • Operating System and version: Windows 10 64-bit
  • OpenCV version used: 4.4
  • How did you install OpenCV? I ran chdir %GOPATH%\src\gocv.io\x\gocv and win_build_opencv.cmd
  • GoCV version used: 0.24
  • Go version: go1.15.2 windows/amd64
  • Did you run the env.sh or env.cmd script before trying to go run or go build? no
  • MinGW-W64: 7.3
  • Added system paths C:\Program Files\mingw-w64\x86_64-7.3.0-posix-seh-rt_v5-rev0\mingw64\bin C:\opencv\build\bin C:\opencv\build\install\x64\mingw\bin

theTulga avatar Oct 07 '20 19:10 theTulga

Try to remove C:\opencv\build\bin from PATH and leave just C:\opencv\build\install\x64\mingw\bin. Or just swap them to mingw/bin be in front of the other.

golubaca avatar Oct 08 '20 13:10 golubaca

I've tried removing C:\opencv\build\bin from PATH and putting it back in after mingw\bin . Both didn't fix the issue.

theTulga avatar Oct 08 '20 16:10 theTulga

I'm getting the same exit status when running the version check. I'll I could find on it was Code 3221225794 - The application failed to initialize properly. Indicates that the application has been launched on a Desktop to which current user has no access rights. Another possible cause is that either gdi32.dll or user32.dll has failed to initialize.

UncleMarvo avatar Oct 12 '20 13:10 UncleMarvo

Usually this type of error is from installing in a non-standard location. See https://github.com/hybridgroup/gocv#custom-environment-2

deadprogram avatar Oct 13 '20 06:10 deadprogram

Usually this type of error is from installing in a non-standard location. See https://github.com/hybridgroup/gocv#custom-environment-2

I installed everything to their default locations, in that I didn't change any paths when installing any of the required setup. The opencv folder locations match the one shown in that URL. I'm going to remove everything and reinstall from scratch and hope that any possible residual files that are left don't complicate things even more. I'll update here if it works 👍

UncleMarvo avatar Oct 13 '20 09:10 UncleMarvo

Update: I removed everything I had previously installed (realized I had OpenCV installed for Visual Studio 2019 so removed all of that as well) and ran through the install instructions again. All worked this time.

UncleMarvo avatar Oct 13 '20 16:10 UncleMarvo

Someday I hope to be able to compile/link using VS toolchain, but there are Go CL still pending in order to even start on that.

deadprogram avatar Oct 13 '20 17:10 deadprogram

@UncleMarvo Did you remove visual studio entirely or just OpenCV from it?

I've tried removing Visual Studio 2017 and it didn't fix the issue. I'll try removing everything and try reinstalling without Visual Studio 2017.

theTulga avatar Oct 13 '20 18:10 theTulga

I removed everything and installed it back except Visual Studio. But still same error. 😔

theTulga avatar Oct 13 '20 19:10 theTulga

I didn't remove VS 2019, I just removed everything related to OpenCV that I had installed as part of the gocv install and as part of the VS 2019 OpenCV install. I deleted the opencv folder on C: drive, unistalled cmake, uninstalled tdm64-gcc (I think this was part of the VS install), deleted mingw-w64. I removed all references to any OpenCV stuff in the system paths. Then I followed the install instructions for gocv. I hope that helps.

UncleMarvo avatar Oct 13 '20 19:10 UncleMarvo

Yay thanks @UncleMarvo. It did work after reinstalling everything. My system worked after removing tdm64-gcc. Whoever runs into this issue in the future try removing tdm64-gcc.

theTulga avatar Oct 13 '20 21:10 theTulga

@theTulga Glad it helped.

UncleMarvo avatar Oct 15 '20 07:10 UncleMarvo

anyone having this issue. just reboot your system. after had this issue, i did 'nothing' but reboot and it worked. hope this helpful

UlSeong avatar Dec 23 '21 14:12 UlSeong

I also restart the system and it will be normal

BigCatGit avatar Jun 13 '22 19:06 BigCatGit

Try to remove C:\opencv\build\bin from PATH and leave just C:\opencv\build\install\x64\mingw\bin. Or just swap them to mingw/bin be in front of the other.

It works for me. Thank you!

skofkidosif avatar Feb 12 '23 18:02 skofkidosif