Tested in 507.1254 with Chrome and 507.1252 with Firefox.
If client.Export(file) is called on a client connected through the webclient, it will silently fail and kill the entire proc stack. I can't remember if client-side savefiles are supported yet, but minimally I don't think it should kill the entire stack.
I also tried hooking the test into turf/Click() and spamming it on the webclient, and got these errors to pop up in Dream Daemon:
BUG: Bad ref (d:30200141) in DecRefCount(DM Webclient client Export kills entire stack.dm:17)
BUG: Bad ref (4:261) in DecRefCount(DM Webclient client Export kills entire stack.dm:17)
BUG: Bad ref (4:387) in DecRefCount(DM Webclient client Export kills entire stack.dm:17)
BUG: Bad ref (3:1728724336) in DecRefCount(DM Webclient client Export kills entire stack.dm:17)
BUG: Bad ref (3:58886976) in DecRefCount(DM Webclient client Export kills entire stack.dm:17)
BUG: Bad ref (3:1164733812) in DecRefCount(DM Webclient client Export kills entire stack.dm:17)
Line 17 was the client.Export() call.
Numbered Steps to Reproduce Problem:
1) Host test project containing only the code below
2) Connect with a web client
3) See the "Calling" outputs
4) The following "You will not see..." outputs will never appear, as the stack was killed when it hit client.Export()
5) Retry in Dream Seeker, and it works fine
Code Snippet (if applicable) to Reproduce Problem:
mob
Login()
..()
sleep(10)
src<<"(A) Calling Test()"
Test()
src<<"(A) You will not see this text in the webclient"
verb/Test()
src<<"(B) Calling TestSave()"
TestSave()
src<<"(B) You will not see this text in the webclient"
proc/TestSave()
var/savefile/F = new()
src<<"(C) Calling client.Export()"
client.Export(F)
src<<"(C) You will not see this text in the webclient"
Expected Results:
The code continues to execute, even if client.Export() isn't supported.
Actual Results:
The current execution stack is silently killed, and any code following Export() is not run.
Does the problem occur:
Every time? Or how often? Every time
In other games? Tested in two games
In other user accounts? On administrator
On other computers? Unknown
When does the problem NOT occur?
When using Dream Seeker, or if you spawn() the client.Export() call.
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.)
I believe it's been happening since the first release of the webclient.
Workarounds:
spawn() the call to client.Export().
Or, only call client.Export() if client.connection doesn't report it's the webclient.