texture get error: Index out of range
Opened this issue · 10 comments
server error:
RangeError: Index out of range
at checkOffset (buffer.js:842:11)
at Buffer.readInt16LE (buffer.js:977:5)
at Texture.loadTexture (/var/www/uojs/node_modules/uodatareader/texture.js:30:38)
at express.use.get.get (/var/www/uojs/src/server/webserver.js:18:49)
at Layer.handle [as handle_request] (/var/www/uojs/node_modules/express/lib/router/layer.js:95:5)
at next (/var/www/uojs/node_modules/express/lib/router/route.js:131:13)
at Route.dispatch (/var/www/uojs/node_modules/express/lib/router/route.js:112:3)
at Layer.handle [as handle_request] (/var/www/uojs/node_modules/express/lib/router/layer.js:95:5)
at /var/www/uojs/node_modules/express/lib/router/index.js:277:22
at param (/var/www/uojs/node_modules/express/lib/router/index.js:349:14)
texture error id:
GET http://192.168.1.124/texture/83 500 (Internal Server Error)
95:1 GET http://192.168.1.124/texture/95 500 (Internal Server Error)
100:1 GET http://192.168.1.124/texture/100 500 (Internal Server Error)
91:1 GET http://192.168.1.124/texture/91 500 (Internal Server Error)
87:1 GET http://192.168.1.124/texture/87 500 (Internal Server Error)
79:1 GET http://192.168.1.124/texture/79 500 (Internal Server Error)
99:1 GET http://192.168.1.124/texture/99 500 (Internal Server Error)
94:1 GET http://192.168.1.124/texture/94 500 (Internal Server Error)
82:1 GET http://192.168.1.124/texture/82 500 (Internal Server Error)
84:1 GET http://192.168.1.124/texture/84 500 (Internal Server Error)
88:1 GET http://192.168.1.124/texture/88 500 (Internal Server Error)
96:1 GET http://192.168.1.124/texture/96 500 (Internal Server Error)
80:1 GET http://192.168.1.124/texture/80 500 (Internal Server Error)
92:1 GET http://192.168.1.124/texture/92 500 (Internal Server Error)
What client are you using the texmaps from?
It doesn't look like 0, 1, 7, 8, 63-67, 77-112, and others, don't exist in the client I'm using (7.0.20.0). I can set it up to use a nodraw texture if the texture can't be found.
I made a change to use texture id 2 ("no draw") if the texture can't be found in the index.
run https://github.com/kevinhikaruevans/uojs2/blob/threejs-native/test.html and you will understand what the texture is not.
if we take the texture of 'Art' that it's there.
Maybe I should revert back to Art if it can't be found... Looks like water tiles causing the problem...
it is not the water, there is a background texture.
Change your link to the texture of the 'Art' to see that there should be.
Hmmm... I'm really not sure what to do to fix it. I'll have to review other clients (like iris or ultimaxna) and see how they do it.
It looks like it's using texture 127? https://github.com/ZaneDubya/UltimaXNA/blob/49a64fd098d66588b9ef94954839b8b180489648/dev/Ultima/Resources/TexmapResource.cs#L42
Hmmmmmm