Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: Process finished with exit code -1073741515 (0xC0000135)  (Read 6295 times)

0 Members and 1 Guest are viewing this topic.

na.mkv

  • Newbie
  • *
  • Posts: 12
    • View Profile
Process finished with exit code -1073741515 (0xC0000135)
« on: January 16, 2024, 01:57:08 pm »
Good day. I have a problem with SFML on Windows 11.

I have the same issue when using SFML for 32 and 64 bit systems.

Here I am attaching the screenshots with the code for cmake and main.cpp.

I really have no idea what is wrong here. It worked fine on Unix, but I have a struggle with win now. I seek help.

Whenever I try to run the program, I get the error message: "Process finished with exit code -1073741515 (0xC0000135)".

I have downloaded the SFML and mingw, and copied them to "C:/" directory

na.mkv

  • Newbie
  • *
  • Posts: 12
    • View Profile
Re: Process finished with exit code -1073741515 (0xC0000135)
« Reply #1 on: January 17, 2024, 07:11:44 am »
Also I have the same issue when I try to compile a file with this code snippet.


void Actions::load_main_menu_music(Music * music) {
    if (!music->openFromFile("../Audio/Music/MainTheme.mp3")) {
        throw std::runtime_error("Couldn't open the music file.");
    }
}

Do somebody have any ideas how to fix this?

Hapax

  • Hero Member
  • *****
  • Posts: 3379
  • My number of posts is shown in hexadecimal.
    • View Profile
    • Links
Re: Process finished with exit code -1073741515 (0xC0000135)
« Reply #2 on: January 17, 2024, 12:39:51 pm »
The same issue?
The same error code when the music doesn't load?

Confirm the music file is valid and in the correct location. An absolute path test can help with this.
Selba Ward -SFML drawables
Cheese Map -Drawable Layered Tile Map
Kairos -Timing Library
Grambol
 *Hapaxia Links*

na.mkv

  • Newbie
  • *
  • Posts: 12
    • View Profile
Re: Process finished with exit code -1073741515 (0xC0000135)
« Reply #3 on: January 17, 2024, 01:22:08 pm »
The function is not called anywhere. It breaks even before the execution line reaches int main().
It breaks somewhere between the compilation and run.

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 11033
    • View Profile
    • development blog
    • Email
Re: Process finished with exit code -1073741515 (0xC0000135)
« Reply #4 on: January 17, 2024, 01:45:07 pm »
IIRC 0xC0000135 just means that you're missing some DLL.
If you double click the executable in explorer, it should tell you which DLL exactly is missing.

Most likely, you'll have to copy the SFML DLLs next to your executable.
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

na.mkv

  • Newbie
  • *
  • Posts: 12
    • View Profile
Re: Process finished with exit code -1073741515 (0xC0000135)
« Reply #5 on: January 17, 2024, 02:20:18 pm »
Assume I copy all DLLs to the project directory. What else? How should I re-write cmake? How to make the snippet

void Actions::load_main_menu_music(Music * music) {
    if (!music->openFromFile("../Audio/Music/MainTheme.mp3")) {
        throw std::runtime_error("Couldn't open the music file.");
    }
}

not to cause the issue? Again, the error appears before even the program runs.

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 11033
    • View Profile
    • development blog
    • Email
Re: Process finished with exit code -1073741515 (0xC0000135)
« Reply #6 on: January 17, 2024, 02:29:12 pm »
The SFML CMake Template has some code snippet to copy the OpenAL DLL, which I assume might be missing in your case.
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

na.mkv

  • Newbie
  • *
  • Posts: 12
    • View Profile
Re: Process finished with exit code -1073741515 (0xC0000135)
« Reply #7 on: January 17, 2024, 02:42:36 pm »
Copied and pasted the cmake. Have the problem:

"C:\Program Files\JetBrains\CLion 2023.3.2\bin\cmake\win\x64\bin\cmake.exe" -DCMAKE_BUILD_TYPE=Debug "-DCMAKE_MAKE_PROGRAM=C:/Program Files/JetBrains/CLion 2023.3.2/bin/ninja/win/x64/ninja.exe" -G Ninja -S C:\Users\rcybe\CLionProjects\AsteroidBelt -B C:\Users\rcybe\CLionProjects\AsteroidBelt\cmake-build-debug
CMake Error at C:/Program Files/JetBrains/CLion 2023.3.2/bin/cmake/win/x64/share/cmake-3.27/Modules/ExternalProject.cmake:2851 (message):
  error: could not find git for clone of sfml-populate
Call Stack (most recent call first):
  C:/Program Files/JetBrains/CLion 2023.3.2/bin/cmake/win/x64/share/cmake-3.27/Modules/ExternalProject.cmake:4345 (_ep_add_download_command)
  CMakeLists.txt:29 (ExternalProject_Add)

na.mkv

  • Newbie
  • *
  • Posts: 12
    • View Profile
Re: Process finished with exit code -1073741515 (0xC0000135)
« Reply #8 on: January 17, 2024, 02:59:01 pm »
IIRC 0xC0000135 just means that you're missing some DLL.
If you double click the executable in explorer, it should tell you which DLL exactly is missing.

Most likely, you'll have to copy the SFML DLLs next to your executable.

I ran the executable, it says: "The code execution cannot proceed because libstdc++-6.dll was not found. Reinstalling the program may fix this problem."

The missing files:
libstdc++-6.dll
openal32.dll
libgcc_s_dw2-1.dll
« Last Edit: January 17, 2024, 03:00:33 pm by na.mkv »

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 11033
    • View Profile
    • development blog
    • Email
Re: Process finished with exit code -1073741515 (0xC0000135)
« Reply #9 on: January 17, 2024, 03:01:30 pm »
Copied and pasted the cmake.
You can't just copy paste without understanding what it does...  ::)

If you don't want to fetch and build SFML automatically, you don't need everything, check the statements at the bottom.
If you do want to use the full template, read the readme that explain some more things and make sure git is installed.
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

na.mkv

  • Newbie
  • *
  • Posts: 12
    • View Profile
Re: Process finished with exit code -1073741515 (0xC0000135)
« Reply #10 on: January 17, 2024, 03:31:18 pm »
I have carefully followed the instructions and in the end I got this:


PS C:\Users\rcybe\CLionProjects\AsteroidBelt> cmake --build build --config Release
MSBuild version 17.8.3+195e7f5a3 for .NET Framework
MSBUILD : error MSB1009: Project file does not exist.
Switch: ALL_BUILD.vcxproj
PS C:\Users\rcybe\CLionProjects\AsteroidBelt> cmake -S . -B build                 
-- Selecting Windows SDK version 10.0.22621.0 to target Windows 10.0.22631.
-- Selecting Windows SDK version 10.0.22621.0 to target Windows 10.0.22631.
CMake Error at C:/Program Files/CMake/share/cmake-3.28/Modules/ExternalProject.cmake:2911 (message):
  error: could not find git for clone of sfml-populate
Call Stack (most recent call first):
  C:/Program Files/CMake/share/cmake-3.28/Modules/ExternalProject.cmake:4422 (_ep_add_download_command)
  CMakeLists.txt:29 (ExternalProject_Add)


-- Configuring incomplete, errors occurred!

CMake Error at C:/Program Files/CMake/share/cmake-3.28/Modules/FetchContent.cmake:1667 (message):
  CMake step for sfml failed: 1
Call Stack (most recent call first):
  C:/Program Files/CMake/share/cmake-3.28/Modules/FetchContent.cmake:1819:EVAL:2 (__FetchContent_directPopulate)
  C:/Program Files/CMake/share/cmake-3.28/Modules/FetchContent.cmake:1819 (cmake_language)
  C:/Program Files/CMake/share/cmake-3.28/Modules/FetchContent.cmake:2033 (FetchContent_Populate)
  CMakeLists.txt:11 (FetchContent_MakeAvailable)


-- Configuring incomplete, errors occurred!


To be honest, I am new in Windows; 70% of my time I was working in Linux or MacOS. It is just now I decided completely switch to Windows.

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 11033
    • View Profile
    • development blog
    • Email
Re: Process finished with exit code -1073741515 (0xC0000135)
« Reply #11 on: January 17, 2024, 03:36:33 pm »
could not find git
As mentioned, you'll need to install git, and then make sure it's in PATH (might require a terminal restart).
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

na.mkv

  • Newbie
  • *
  • Posts: 12
    • View Profile
Re: Process finished with exit code -1073741515 (0xC0000135)
« Reply #12 on: January 18, 2024, 11:05:43 am »
All began working ok, except, again, for this code snippet:

void Actions::load_main_menu_music(Music * music) {
    if (!music->openFromFile("../Audio/Music/MainTheme.mp3")) {
        throw std::runtime_error("Couldn't open the music file.");
    }
}


I get the error when I execute this command in the terminal: cmake -S . -B build ; cmake --build build --config Release


Error:
Actions.obj : error LNK2019: unresolved external symbol "public: bool __cdecl sf::Music::openFromFile(class std::basic_string<char,struct std::char_traits<char
>,class std::allocator<char> > const &)" (?openFromFile@Music@sf@@QEAA_NAEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z) referenced in func
tion "void __cdecl Actions::load_main_menu_music(class sf::Music *)" (?load_main_menu_music@Actions@@YAXPEAVMusic@sf@@@Z) [C:\Users\rcybe\CLionProjects\Asteroi
dBelt\build\AsteroidBelt.vcxproj]
C:\Users\rcybe\CLionProjects\AsteroidBelt\build\bin\Release\AsteroidBelt.exe : fatal error LNK1120: 1 unresolved externals [C:\Users\rcybe\CLionProjects\Astero
idBelt\build\AsteroidBelt.vcxproj]


hdsiria

  • Newbie
  • *
  • Posts: 23
    • View Profile
Re: Process finished with exit code -1073741515 (0xC0000135)
« Reply #13 on: January 29, 2024, 03:33:07 am »
The sfml environment is definitely not configured correctly. Add the sfml directory and mingw directory to the system path env variable. Set the correct library directory at compile time. There would be no problem.
error LNK2019 mean  the library cannot be found during the link process

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 11033
    • View Profile
    • development blog
    • Email
Re: Process finished with exit code -1073741515 (0xC0000135)
« Reply #14 on: January 29, 2024, 08:39:05 am »
Add the sfml directory and mingw directory to the system path env variable
...
error LNK2019 mean  the library cannot be found during the link process
LNK errors indicate that MSVC is being used, so MinGW is irrelevant at this point
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/