ID:1925876
 
Resolved
Overlays with blank appearances caused the map tick to crash.
BYOND Version:508.1298
Operating System:Windows 7 Ultimate 64-bit
Web Browser:Chrome 45.0.2454.78
Applies to:Webclient
Status: Resolved (508.1299)

This issue has been resolved.
Descriptive Problem Summary:
During 1295, I reported a bug with our map control that kept it from showing, that was 'fixed' in 1296 but another error seems to have popped up. I thought i made a bug report when 1296 came out but i guess i didn't.

Map control blacks out on /tg/station code the moment you join the game or are otherwise moved from the lobby screen (an ingame area of walls with one of the walls having a high layer lobby image).

You can see the lobby image, but hitting observe to join in as a ghost causes the screen to go black in chrome 45b and the map control to just not change at all in firefox 39, meaning it was still showing the lobby screen.

Changing rendering mode after joining doesn't fix anything in chrome, and only just causes the screen to go black in firefox

Numbered Steps to Reproduce Problem:
Download code linked below (time frozen link)
open code/modules/client/client procs.dm
comment out line 95 and 96 to enable the web client
compile, host in dd, join up.
hit observe and answer yes at the prompt.


Code Snippet (if applicable) to Reproduce Problem:
https://github.com/tgstation/-tg-station/archive/ d7eca4f3277cae3e55b6e8e5938d310dce2df5b6.zip

Expected Results:
You see yourself a ghost in the middle of the arrivals shuttle on z1 in the map control

Actual Results:
You see black and get the urge to start singing songs about the color black.

Does the problem occur:
Every time? Or how often?
everytime

When does the problem NOT occur?

Did the problem NOT occur in any earlier versions?
Map controls were broken in 1295, 1296 'fixed' them, but not fully, introducing this bug.


Further notes:

This seems to happen on anything that places the client in control of another mob, it also survives a re connect, the map is just basically broken for that client from then on.

I tried manually changing my client's mob variable to another mob, same thing, editing the mob's ckey, same thing. If i use the admin

Odds are, it might be related to something we are doing in login/logout code. all mob code is in code/modules/mob/ login/logout is generally in their own files. lobby screen mobs are mob/newplayer, observe makes you a mob/dead/observer and sets your loc to the arrivals shuttle, joining the game by hitting ready before round start or join game after round start makes you a mob/living/carbon/human and either sets your loc to the arrival shuttle if its after round start or a spawn point for your job if its from being ready during round start.

Are you seeing any JavaScript errors when this happens? In 1298 you should have non-minified code which would make it easier to trace this.

I'll do some tests with your code myself and see what I can find.
This is the only common thing to all effected mobs in Login() i could find:
// Calling update_interface() in /mob/Login() causes the Cyborg to immediately be ghosted; because of winget().
// Calling it in the overriden Login, such as /mob/living/Login() doesn't cause this.
/mob/proc/update_interface()
if(client)
if(winget(src, "mainwindow.hotkey_toggle", "is-checked") == "true")
update_hotkey_mode()
else
update_normal_mode()

/mob/proc/update_hotkey_mode()
winset(src, null, "mainwindow.macro=hotkeymode hotkey_toggle.is-checked=true mapwindow.map.focus=true input.background-color=#F0F0F0")

/mob/proc/update_normal_mode()
winset(src, null, "mainwindow.macro=macro hotkey_toggle.is-checked=false input.focus=true input.background-color=#D3B5B5")


That comment is actually a byond bug that i need to report, When i stumbled across the bug i didn't know enough about byond or /tg/station's code to know it was a byond bug or how to report it, but basically calling winget twice in mob/login() (once in mob/ and again in mob/living/silcon/robot) causes the client to logout of the mob.

Might be related.

Edit: I will check.
Yes! There is an error:

http://pastebin.com/SSuApns4

Edit: That error shows up when re-connecting after i've already observed
Ok, this is what shows when I try to join in and not just reconnect after joining in.

http://pastebin.com/uy02tKJg
Lummox JR resolved issue with message:
Overlays with blank appearances caused the map tick to crash.