altv-issues
altv-issues copied to clipboard
LocalObject bug
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.
Related bug report: https://github.com/altmp/altv-issues/issues/2190
Update: There is also a problem with native created objects, so it is not LocalObject specific.
@Lekenthu
Before each LocalObject is created, the model is loaded with requestModel
you dont need to load model of it yourself
can you specify models that are not loading?
can you specify models that are not loading?
Example: p_v_43_safe_s
We need steps to reproduce
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.)
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.)
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)
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",
+ ]
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.
Update: if you want to create a custom model at the point of connection (resourceStart), it cannot load the model
confirmed