Galaxy_simulation icon indicating copy to clipboard operation
Galaxy_simulation copied to clipboard

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

Open mrdev023 opened this issue 4 years ago • 1 comments

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 avatar Oct 31 '21 16:10 mrdev023

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

angeluriot avatar Nov 04 '21 13:11 angeluriot