chrxh / alien

ALIEN is a CUDA-powered artificial life simulation program.
https://alien-project.org
BSD 3-Clause "New" or "Revised" License
4.69k stars 141 forks source link

[Run Error]An uncaught exception occurred: Failed to load texture #75

Closed bowmanonjupiter2 closed 11 months ago

bowmanonjupiter2 commented 1 year ago

Win11, i7 13700K, RTX 3060Ti "cmake .. -DCMAKE_BUILD_TYPE=Release", RUN OK "cmake --build . --config Release -j8 ", WARNING: "MSVCRT.lib(initializers.obj): warning LNK4098: defaultlib 'libcmt.lib' conflicts with use of other libs; use /NODEFAUL TLIB:library"

Run Release/alien.exe Error: An uncaught exception occurred: Failed to load texture

TheBarret commented 1 year ago

Just my 2 cents;

Warning LNK4098:

You can try specifying the /NODEFAULTLIB linker option followed by the specific library that is causing the conflict.
For example, if libcmt.lib is causing the conflict, you can use /NODEFAULTLIB:libcmt.lib in your linker options.
Make sure to review your project's settings and dependencies to ensure that the correct libraries are linked.
chrxh commented 1 year ago

Could be a problem with OpenGL or OpenGL-CUDA interoperability. Have you checked the troubleshooting section in https://alien-project.org/downloads.html? If you already have, could you then start alien with the parameter -d and post the log.txt?

I think the linker warning should not be the problem. I have it too, but have yet to investigate it.

ccyberrain commented 11 months ago

I have the same issue on Win11, RTX 3070, CUDA 12.2.2, MSVC v143.

Log.txt contains the following output: 2023-10-18 14-57-36: DEBUG mode 2023-10-18 14-57-36: set full screen mode

ccyberrain commented 11 months ago

I found a solution: the folder resources needs to be copied to */alien/build/Release Afterwards, the application runs as expected.

chrxh commented 11 months ago

Actually you should start ALIEN from the build directory via .\Release\alien.exe as described in the readme. In this case you don't need to copy the resource folder.

chrxh commented 11 months ago

I've updated the readme to make it clearer.

bowmanonjupiter2 commented 11 months ago

thanks will try and let you know.