Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Access violation : Peut être liée à une erreur de compatibilité avec le program opencl #13

Closed
mrdev023 opened this issue Oct 31, 2021 · 2 comments
Labels
help wanted Extra attention is needed

Comments

@mrdev023
Copy link

mrdev023 commented Oct 31, 2021

Fichier :

sources/ComputeShader.cpp#51

image

Exception non gérée à 0x00007FF75613B873 dans Galaxy_simulation.exe : 0xC0000005 : Violation d'accès lors de la lecture de l'emplacement 0x0000000000000000.

Pour plus d'informations :

  • err = -44 ~= CL_INVALID_PROGRAM

Quand j'ai essayé ce code et mis un breakpoint

auto buildStatus = program.getBuildInfo<CL_PROGRAM_BUILD_STATUS>(device);
auto buildLog = program.getBuildInfo<CL_PROGRAM_BUILD_LOG>(device);
std::cout << "Error!\nBuild Status: " << buildStatus << "\nBuild Log:\t " << buildLog << std::endl;

J'ai obtenu les valeurs suivantes
buildStatus == -858993460
buildLog == ""

Sachant que l'exécutable fournis dans la release ne se lance pas non plus. Donc je penche plutôt pour une erreur de compatibilité avec le programme OpenCL. Mais j'avoue que je n'en ai pas fait beaucoup donc je ne trouve pas le souci ^^

Note:

Pour que cmake puisse configurer le projet. J'ai dû supprimer le code ci-dessous.

// librairies/GLEW/CMakeList.txt
if(MSVC)
	list(APPEND LIBGLEW_SRCS ${RC_DIR}/glew.rc)
endif()

Sinon j'obtenais les logs suivants :

C:\Users\flori\Documents\Project\Perso\Galaxy_simulation>cmake -G "Visual Studio 16 2019" -A x64 -B "./build" -DX64_BITS=ON .
-- Selecting Windows SDK version 10.0.19041.0 to target Windows 10.0.22489.
-- The C compiler identification is MSVC 19.29.30037.0
-- The CXX compiler identification is MSVC 19.29.30037.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.29.30037/bin/Hostx64/x64/cl.exe - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.29.30037/bin/Hostx64/x64/cl.exe - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found SFML 2.5.1 in C:/Users/flori/Documents/Project/Perso/Galaxy_simulation/libraries/SFML/VS/x64/lib/cmake/SFML
-- Found OpenGL: opengl32   
-- Looking for CL_VERSION_2_2
-- Looking for CL_VERSION_2_2 - found
-- Found OpenCL: C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v11.5/lib/x64/OpenCL.lib (found version "2.2") 
-- Found SFML 2.5.1 in C:/Users/flori/Documents/Project/Perso/Galaxy_simulation/libraries/SFML/VS/x64/lib/cmake/SFML
-- Configuring done
CMake Error at libraries/GLEW/CMakeLists.txt:94 (add_library):
  Cannot find source file:

    C:/Users/flori/Documents/Project/Perso/Galaxy_simulation/libraries/GLEW/build/glew.rc

  Tried extensions .c .C .c++ .cc .cpp .cxx .cu .mpp .m .M .mm .ixx .cppm .h
  .hh .h++ .hm .hpp .hxx .in .txx .f .F .for .f77 .f90 .f95 .f03 .hip .ispc


CMake Error at libraries/GLEW/CMakeLists.txt:94 (add_library):
  No SOURCES given to target: libglew_static


CMake Error at libraries/GLEW/CMakeLists.txt:105 (add_library):
  No SOURCES given to target: libglew_shared


CMake Generate step failed.  Build files cannot be regenerated correctly.
@mrdev023 mrdev023 changed the title Access violation Access violation : Possible bad opencl program Oct 31, 2021
@mrdev023 mrdev023 changed the title Access violation : Possible bad opencl program Access violation : Peut être liée à une erreur de compatibilité avec le program opencl Oct 31, 2021
@angeluriot
Copy link
Owner

Je ne peux pas aider je n'ai ce problème avec aucune de mes machines.

@angeluriot angeluriot added the help wanted Extra attention is needed label Nov 4, 2021
@mrdev023
Copy link
Author

Je ne suis plus sous windows et je pense que depuis le temps. L'issue est maintenant obselète. Je cloture l'issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants