-
Notifications
You must be signed in to change notification settings - Fork 89
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Objects vanish after a while #230
Comments
I had a similar bug when I used v2.9.0 for a short time (then gone back to v2.8.2). Pickups disappeared so I had to restart the server fast. You are using v2.9.0+, right ? Probably related to the chunk/per-player tick changes too. Those were really major changes which weren't tested too much. |
yes I am using the latest version of the plugin, I'll take a look at going back to 2.8.2 to see if that resolves anything |
Can you try the latest commit ? I added the files here. |
Will do. |
Something is really wrong. I've got similar problems since update to the latest stable version. |
You should try the files I added for downloading too. |
3 days of testing your file, nothing changed. Same problems. |
We've been testing it as well, our objects still vanish after ~ 24 hours |
This also happens on version 2.8.2 as well, albeit it takes slightly longer. It only happens to objects that aren't spawned on server load, this also happens to objects that are edited. If I spawn a new object like a roadblock, they will vanish after a couple minutes, if I load a gate object on server start, it won't vanish unless I edit it, again with a couple minutes of staying. This also applies to Dynamic 3d text, if its moved it vanishes in a couple minutes |
That's weird. I'm using 2.8.2 on my server and it has no problem. Are you sure that you loaded 2.8.2 and not 2.9+ ? AFAIK nobody has similar problems with 2.8.2. |
2.8.2 is fine, must be your scripting bug. |
Anything I should be looking at? I’m not sure what exactly could be wrong, |
2.8.2 is fine. This is the first I've heard of this happening in 2.9.1, though. Make sure you aren't mixing up the IDs in your own script (e.g., when you destroy an object, make sure you reset the variable pointing to that object in your script). |
I've made sure I'm not mixing up ID's, it doesn't occur until after ~24+ hours of the server constantly running which puzzles me because if it was mixing up ID's it would happen all the time. |
Can you give us more details of the moment when it happens ?:
These are the main reasons the streaming loop may stop, so they may help. |
I'll get back to you on the other items as those will require me to push an update however, |
The streamer CountVisibleItems is around 100-200 when dynamic objects are disappearing, creating a static object results in it staying. It doesn't disappear like dynamics do. All the old dynamic objects don't despawn either, only if you create a new dynamic object or edit a current one will it disappear. |
That's weird. Maybe Incognito can see something suspicious in that behavior, probably at the deleting part. By the way, it looks like it isn't happening for all items at once, but it happens to random items types. It may happen only to objects, or only to pickups, or only to objects, most probably for more than one item type too. There have to be some common bits that are wrong. |
Yea we can’t pin it on any specific period of time that this occurs as it
doesn’t become noticeable until around 24 hours. it generally doesn’t
happen to pickups for us as well only objects as far as I’ve noticed
…On Wed, Nov 8, 2017 at 5:56 PM Nistor Constantin-Flavius < ***@***.***> wrote:
That's weird. Maybe Incognito can see something suspicious in that
behavior, probably at the deleting part.
By the way, it looks like it isn't happening for all items at once, but it
happens to random items types. It may happen only to objects, or only to
pickups, or only to objects, most probably for more than one item type too.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#230 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AeO7Qu79JTdYioFnBejXsl4REaGqxzRxks5s0j-pgaJpZM4PXoyE>
.
|
I'm experiencing a remarkably similar problem, also on 2.8.2. The objects don't spontaneously disappear for me, but rather get destroyed when other objects are spawned. I've put debug prints at every point of my code where objects are created and destroyed and there is nothing to suggest that they are being destroyed from the script. The newly spawned objects often have the same ID as an existing object, suggesting that they are being 'overwritten' somehow. I'm very diligent about resetting data when I destroy an object, so doubt it is that. I will recheck though. I will try some of the suggestions offered in this topic and report back. |
Just gonna bump this, still having this issue, I'm willing to try just about anything here. I may try what spacemud did and see if its overwriting. Just another thing, this happens with 3d Text Labels as well |
The best idea would be to add tons of prints ( So yeah, the biggest problem is that no one knows why this happens and we can't easily add prints all over it, because we have to wait a lot of time. A function to enable those debugs would be nice so the console won't be spammed for every player when it is not needed. That's what we need: someone to use it and debug everything he can. |
I've started the process of adding print statements with object ID's, I will also do this for 3d text and pickups as well. I'll test this on 2.8.2 first and move to 2.9.0 if I find a result. |
v2.8.2 is fine, all you need to do is check them in the latest version and see what seems suspect when items stop appearing. |
@samp-incognito I think I found the problem (EDIT: At a second thought this isn't looking like a big problem, it may be the same, but still should be fixed)... if this behavior isn't actually the expected behavior (they just keep the last value of the created variable when it has a shadowing name). I'll submit here all warnings I got:
My suggestions:
SharedCell cell(new Cell(cellID));
cells[cellID] = cell; into (isn't it possible with no variable ?): cells[cellID] = SharedCell(new Cell(cellID));
Here's the code: samp-streamer-plugin/src/streamer.cpp Lines 971 to 1013 in 4efb505
You can see that the iterator After you will do this, if you want you can do this in the next commit, all you have to do is modify a bit the
I could do a pull request with all of these things fixed, but I'm not sure if I should rename them how it looks like and you may not like how I name them, so it's better to be solved by you. At least fix the ones with the shadowing of |
I really doubt the shadowed variables are causing any problems in those specific cases. For clarity, though, yes, their names should be changed to something else.
Shadowed variables can have different values as long as they're not in the same scope (https://en.wikipedia.org/wiki/Variable_shadowing#C++). This is legal, but it's not really considered good style, so I'll see about fixing all of the ones I can find later. |
So the issue is currently happening. Still can't figure out why. Line 85399: [09/12/2017 19:49:20] Generating Dyn Object 16477 It appears to be assigning valid object ID's but they just disappear, they aren't getting overwritten or anything. |
@samp-incognito Well, I just thought that you are using the wrong variable because of the shadowing. I know that shadowing is legal. Well, I may do a pull request with everything I said. @adammal96 If by "generating" you mean that |
Happens every day, but only after like 15-20 hours. It prints the object ID when doing CreateDynamicObject, and prints when destroying but it doesn't destroy it, the object just vanishes |
I don't really get what you mean with the destroying part. If the |
As far as I can see it doesn't get called. It just vanishes. |
We are running into an issue where after a couple hours of our server running any newly placed or newly edited objects vanish directly after spawn. We have tried changing the settings back to default yet nothing has helped, we have roughly 250 static objects used as bases for when vehicles spawn on them, and this happens all over the map not just near other mapping where the object limit may be reached. We are kind of at a loss here as nothing really seems to be working.
The text was updated successfully, but these errors were encountered: