-
Notifications
You must be signed in to change notification settings - Fork 7.7k
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
Run-Time Check Failure #1 When Loading PNG image #2
Comments
I've seen this as well. I usually have Visual Studio disable that runtime check for that file, just because I don't understand the source well enough to fix the issue. |
I disabled the check and the texture ends up appearing corrupted in GPU memory. Maybe I'm doing something wrong? |
Probably the unpack alignment ( the textures load just fine here with stbi ). |
Never mind, just me being stupid. Was not assigning the uniform correctly. |
run-time check is worth fixing |
Attempted to fix every issue like this which was found in a cast that turned up with a search for "= (" or "(stbi_uc)". (Note that those searches may not have found every such cast.) I can't actually test that the fixes work since I'm not building with the version of MSVC that has these warnings, but the fix is straightforward so I expect it to be right. However, since these warnings only turn up when you execute them, if there are more places with the same issue that didn't turn up in my searches, we'll just have to discover them piecemeal. Pushed and released as version 1.38 |
Can confirm, the issue was resolved in Visual Studio 2012. If I run into anything else I'll let you know. Thank you! |
* Create stb_image.c * Create CMakeLists.txt * Update CMakeLists.txt * Update stb_image.h to export dll * Create cmake.yml
When trying to load a .png file using stbi_load, Visual Studio stops execution with a run-time check failure. I'm not sure if this is specifically a Visual Studio 2012 thing or not. All these images fail to load, except the color_map when in release.
The text was updated successfully, but these errors were encountered: