uojs / uodatareader

Provides an API to read MUL/UOP files using Node.js
6 stars 0 forks source link

texture get error: Index out of range #13

Open lamo2k123 opened 7 years ago

lamo2k123 commented 7 years ago

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)
kevinhikaruevans commented 7 years ago

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.

kevinhikaruevans commented 7 years ago

I made a change to use texture id 2 ("no draw") if the texture can't be found in the index.

lamo2k123 commented 7 years ago

run https://github.com/kevinhikaruevans/uojs2/blob/threejs-native/test.html and you will understand what the texture is not.

lamo2k123 commented 7 years ago

if we take the texture of 'Art' that it's there.

kevinhikaruevans commented 7 years ago

Maybe I should revert back to Art if it can't be found... Looks like water tiles causing the problem...

lamo2k123 commented 7 years ago

it is not the water, there is a background texture.

lamo2k123 commented 7 years ago

Change your link to the texture of the 'Art' to see that there should be.

kevinhikaruevans commented 7 years ago

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.

kevinhikaruevans commented 7 years ago

It looks like it's using texture 127? https://github.com/ZaneDubya/UltimaXNA/blob/49a64fd098d66588b9ef94954839b8b180489648/dev/Ultima/Resources/TexmapResource.cs#L42

lamo2k123 commented 7 years ago

Hmmmmmm