RemedyBG»Forums
4 posts
Support: Access Violation

I get this error when working with opengl and clang on win32.

https://ibb.co/G7mGFt5

Mārtiņš Možeiko
2559 posts / 2 projects
Support: Access Violation

Sounds like your code is dereferencing NULL pointer. Or some other code you call (like GL functions).

What is on call stack?
Are you sure you have created GL context & loaded function pointers before using any GL functions?
Have you enabled debug layer callback and checking for any GL errors?

4 posts
Support: Access Violation

Not done all that much debugging, to be honest. It works on vs debugger so didn't really have to deep dive into it. I was asking in case it was a known problem.

4 posts
Support: Access Violation
Replying to Healium (#26479)

Just to close this issue. Seems like it was just a matter of fully qualifying some file paths. It was not required to do so with vs debugger.

Mārtiņš Možeiko
2559 posts / 2 projects
Support: Access Violation

That sounds like the working directory is simply different from what you expect. Usually you don't use full paths. Typically you launch debugger from folder you want, or explicitly set in properties/settings of launching process - so all relative paths are from specified folder.

4 posts
Support: Access Violation

I use vs code and launch it using a debug.bat file from the working directory.

@echo off

remedybg build\game.exe %^

And just make a json-task to run debug.bat when I hit f5.

Vs code is a terrible editor tho so I'm on the lookout for replacements. VIM and Emacs are not working well on my pc for some reason. Never got 4coder to work properly either.