altv-issues icon indicating copy to clipboard operation
altv-issues copied to clipboard

LocalObject bug

Open Lekenthu opened this issue 1 year ago • 12 comments

Description of the problem

Objects created on the client-side are not loaded after a while. Client restart does not solve the problem. I don't know if there's a correlation between server runtime and client-side objects, but if the server is restarted, it's fine for a while for everyone. However, some models are visible. (Example: prop_boombox_01) Before each LocalObject is created, the model is loaded with requestModel. On alt:V v15 I had no problems with this.

(The server config has enableSyncedMetaData enabled.)

Reproduction steps

Expected behaviour

Additional context

No response

Operating system

Windows 11

Version

#16.0.28, branch release

Crashdump ID

No response

Confirmation of issue's presence

  • [X] By submitting this ticket, I affirm that I have verified the presence of this issue on the latest developer version available at the time of writing this ticket.

Lekenthu avatar Jan 20 '24 17:01 Lekenthu

Related bug report: https://github.com/altmp/altv-issues/issues/2190

Lekenthu avatar Jan 20 '24 17:01 Lekenthu

Update: There is also a problem with native created objects, so it is not LocalObject specific.

Lekenthu avatar Jan 21 '24 05:01 Lekenthu

@Lekenthu

Before each LocalObject is created, the model is loaded with requestModel

you dont need to load model of it yourself

xxshady avatar Jan 21 '24 13:01 xxshady

can you specify models that are not loading?

xxshady avatar Jan 21 '24 13:01 xxshady

can you specify models that are not loading?

Example: p_v_43_safe_s

Lekenthu avatar Jan 21 '24 13:01 Lekenthu

We need steps to reproduce

xxshady avatar Jan 21 '24 14:01 xxshady

We need steps to reproduce

I don't know the exact reproduction process yet, but in the last 2 days it has come up very easily: You need 2-3 players, about 1000 or thousands of different objects created, and those few players restart the client a few times. (I don't stream all those objects at once. I've used alt:V's streamer and my own for this.)

Lekenthu avatar Jan 21 '24 15:01 Lekenthu

I kind of have a feeling about this bug, as if the server is storing something on some level from objects created on the client-side. I think this because if it didn't depend on it, it would be worked by client restart.

(I have server-side objects, and some of it works and some of it doesn't.)

Lekenthu avatar Jan 21 '24 15:01 Lekenthu

Update: if you want to create a custom model at the point of connection (resourceStart), it cannot load the model. (The resource containing the model is loaded before the object is created.) If the object is created after the resources have been downloaded, it works without error.

Log: [00:45:35][Error] Failed to create local object: 0000000025A21F82 is not a proper model hash [00:45:35][Error] [V8] Exception at one_entities:client.js:325 [00:45:35][Error] let obj = new alt.LocalObject(objects[id].hash, objects[id].pos, new alt.Vect... [00:45:35][Error] Error: Failed to create object at createObject (client.js:325:14)

Lekenthu avatar Jan 21 '24 23:01 Lekenthu

when resource with custom model is loaded? did you try to change resource order in server config like this:

- resources = [
- "code",
- "custom-object",
- ]

+ resources = [
+ "custom-object",
+ "code",
+ ]

xxshady avatar Jan 22 '24 15:01 xxshady

when resource with custom model is loaded? did you try to change resource order in server config like this:

- resources = [
- "code",
- "custom-object",
- ]

+ resources = [
+ "custom-object",
+ "code",
+ ]

In all cases, the resource containing the model is loaded first.

Lekenthu avatar Jan 22 '24 18:01 Lekenthu

Update: if you want to create a custom model at the point of connection (resourceStart), it cannot load the model

confirmed

xxshady avatar Feb 11 '24 22:02 xxshady