ID:2341663
 
Resolved
Yet another cause of image hanging was identified.
BYOND Version:512.1405
Operating System:Windows 10 Pro 64-bit
Web Browser:Chrome 63.0.3239.132
Applies to:Dream Seeker
Status: Resolved (512.1407)

This issue has been resolved.
Descriptive Problem Summary:

Numbered Steps to Reproduce Problem: Animate some images displayed to a client, at some random cases the dream seeker crashes

Code Snippet (if applicable) to Reproduce Problem:
                var/image/BaseDisplay/T = new/image/BaseDisplay
T.pixel_y = 248
T.loc = locate(src.x,src.y,src.z)
src.CharacterDisplay = T
src<<T
animate(T, pixel_y = 0, time = 20)


Expected Results: To continue playing the game

Actual Results: Crash

Does the problem occur:
Every time? Or how often? Not everytime, randomly at animated situations
In other games?
In other user accounts? Yes
On other computers?

When does the problem NOT occur?

Did the problem NOT occur in any earlier versions? If so, what was the last version that worked? (Visit http://www.byond.com/download/build to download old versions for testing.)
Didn't test enough to say
Workarounds: Don't use alot of animated images

I need a test case here.
                var/image/BaseDisplay/T = new/image/BaseDisplay
T.pixel_y = 248
T.loc = locate(src.x,src.y,src.z)
src.CharacterDisplay = T
src<<T
animate(T, pixel_y = 0, time = 20)

this sometimes crashes dreamseeker (randomly) at the 512.1405
I didn't see the same happening with the 1404 tho
I've been trying to reproduce your issue based on the code you provided, but I'm getting nowhere. Is there a larger context this happens in that might help me produce the problem more reliably?
Lummox JR changed status to 'Unverified'
The players are crashing when using 1405 or higher versions at situatiosn the game deal with animated images; (always in these situations (and never on 1404))
I use images in azusa mostly in 2 situations, first one is that one, used in creation, the other one is during the active training keypressing (a image is displayed to them with wich direction they gotta press);
The second situation uses a garbage cleaning system, wich I thought that could be the reason, but since the first one doesnt use garbage collectors, the only reason I could think was the animated images...

Here is the code for the other situation:
        var/image/ArrowDisplay/T = unpool("ArrowDisplay")
T.dir = pick(NORTH,SOUTH,WEST,EAST)
T.loc = locate(src.x,src.y,src.z)
src<<T
src.arrowing = 0
src.ArrowDir = T
T.icon_state = state
T.alpha = 255
animate(T, transform = matrix()*2, alpha = 0, time = 15, flags = ANIMATION_END_NOW)
var/didtrain = TrainingPoints
spawn(15)
if(T.loc == src.loc && src.ArrowDir == T && src.TrainingPoints == didtrain)
src.ArrowDir = null
src.client.images -= T
pool("ArrowDisplay",T)


The other situation my game uses images, they arent animated and never got any crash there;
Is there any chance at all you can get this into a test project that shows the situation in action? I suspect I'm missing some key element here.
I suspect it's a os version thing.

I can't remember if you ever revealed what os you use, but i haven't seen the most recent version of the lockup bug on my computer thats windows 7, and most of the users who reported it still happening after the most recent client revision were windows 8.1 or windows 10. Could be related.

Otherwise it could be a bug that only happens when certain other appearance things happen.
My OS is windows 10, yeah...
Lummox, am sending you a test case right now;

PS: use it with the recent beta version and it crashes, use it with 1404 and it works fine
Lummox JR resolved issue with message:
Yet another cause of image hanging was identified.
I have high hopes this will be the last image hang case, having gone through all the code related to the linked lists in question and revamped a few things for consistency.
So the hanging issues seem to be gone now, fortunately. I'm also not seeing image artifacts anymore. Good stuff.

However, the issues with images not showing up correctly in some cases remains. It's kinda hard to explain, but some images aren't deleted when they were before, and other images don't appear until the map is signaled to update (or something).

If you still have that project of mine I sent you, it's best seen there. Should I make a new topic for this, or..?

Edit: I'm seeing at least two issues with images not updating properly, so I'm gonna make a new topic in a little while.
Testing under /tg/station, the "large amount of turf images being scrolled past" situation which used to hang for 40+ seconds in bad situations now still sometimes hangs for ~4 seconds but most of the time those images don't even show up at all anymore.
In response to SpaceManiac
SpaceManiac wrote:
Testing under /tg/station, the "large amount of turf images being scrolled past" situation which used to hang for 40+ seconds in bad situations now still sometimes hangs for ~4 seconds but most of the time those images don't even show up at all anymore.

Confirmed. Now most of the turf images don't show up and hanging is reproducible in a new project (I had one good run, but on 10 subsequent runs it triggered) https://tgstation13.org/msoshit/turfimagestress.zip

extract, compile, launch, toggle eye verb, move down. hang within 5 steps. triggered in both ds standalone and dd hosted.

edit: so it would seem the hang is actually being triggered by a min/max bug i introduced today in the test project that has 44 turf images going to 1,1,1 on movement instead of to 44 different turf (line 228) but thats something that shouldn't be triggering a hang so likely the test project exposes something in image/appearance code.