Skip to content
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

Access violation from stbi_load_from_memory #47

Closed
cpope9141 opened this issue Aug 10, 2022 · 2 comments
Closed

Access violation from stbi_load_from_memory #47

cpope9141 opened this issue Aug 10, 2022 · 2 comments
Labels

Comments

@cpope9141
Copy link

Hello.

I am encountering an exception access violation when loading image resources with org.lwjgl.stb.STBImage.stbi_load_from_memory. I have copied ioResourceToByteBuffer from lwjgl3-demos/src/org/lwjgl/demo/util/IOUtils.java into my project and am using it as the ByteBuffer input for stbi_load_from_memory. I can supply a crash report upon request.

As far as I can tell, I am using ioResourceToByteBuffer in the same way as demonstrated in the lwjgl3 demos, but I am calling it from multiple threads. There does not seem to be a pattern to when the crash occurs. Are there any synchronization issues or limitations for ioResourceToByteBuffer or stbi_load_from_memory?

I am open to any suggestions on how to debug this issue and willing to supply any information I can gather.

@httpdigest
Copy link
Member

Why are you filing this as an issue against LWJGL/lwjgl3-demos?

Currently, this reads as follows:
"Hi. I've copied one method of a class from this repository and used it in some way in my own project and also added multithreading and now it crashes without some visible pattern."

If the demos in this repository work, then your issue has nothing to do with this repo.

You should probably ask on Stackoverflow providing every information including a minimal, complete and verifiable example program that reproduces your issue.

@cpope9141
Copy link
Author

cpope9141 commented Aug 10, 2022

Sorry, I did not mean to upset you. I have tried the LWJGL forum but have not received a response. I was not sure who to ask, so I thought I would try here. My intent was to ask those who understand the repo whether or not there were some limitations on the function that I was not aware of.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants