Open Pirulax opened 6 years ago
Ohh, yeah, and which crash dump should I post? Because I have a few here. I mean should I post only dumps/public, or I can post dumps/private too?
https://upload.mtasa.com/u/896366106/texturecreatecrash.zip_ These two aren't the same actually. One was because of drawing too much text, and this is caused by dxCreateTexture thing.
Link example resource and confirm its still a thing, i'll check on that.
When it comes to operations with textures MTA is relying on D3D9 API. But the largest texture size is 4096 × 4096 in DX9. Of course you can try to create a bigger texture but it's unsafe and can result in unpredictable consequences.
It's not a bug. The only thing you can do is to forbid to create textures with size bigger than 4096x4096 px.
A note for this should be added to the wiki page (regarding max texture size for D3D9).
Should we enforce this limit when using dxCreateTexture
and throw an error if larger than 4096? Would be better than the client just crashing and having no idea what caused it.
Describe the bug So, I was doing some random thing, and for some reason I crashed a few times. I was using dxCreateTexture() with some big pixel counts(12k+ on x and y)+setPixels() I crashed out every time, but I dont know exactly caused the crash, but it has something to do with the mentioned functions.
To Reproduce Maybe:
for x = 0, math.floor(20000/32), 32 do for y = 0, math.floor(20000/32), 32 do tex:setPixels(<Add pixels here from a 32x32 image>, x, y, 32, 32) end end
This is how I crashed, or at least, it was like this.Expected behavior It should create the texture and set its pixels
MTA Client (please complete the following information):
MTA Server (please complete the following information):