ID:2882754
 
Resolved
world.Export() to an external link could fail to wake the calling proc from sleep in certain cases where the link failed.
BYOND Version:515.1610
Operating System:Windows 11 Home
Web Browser:Chrome 115.0.0.0
Applies to:Dream Maker
Status: Resolved (515.1611)

This issue has been resolved.
Descriptive Problem Summary: It seems that at some point between 514.1589 and now, there was some change with world.Export(). In the previous version that I used, when world.Export() attempted to send a message to a dead link, after failing the code would resume as normal.

In the current version, this seems to cause indefinite hanging. I'm not sure what is going on internally, nor do I know if is intended behavior -- I just know it wasn't happening before.


Code Snippet (if applicable) to Reproduce Problem:
mob/verb/Test()
var/http[] = world.Export("http://lofrp.com/ss_100_capture.php")
world << "Done"


Expected Results:
Since the "http://lofrp.com/ss_100_capture.php" is a dead link, I would expect for Export to quietly fail, and simply print Done. This occurs if you use an older version like 514.
Actual Results:
Nothing. The code just dies there.

Does the problem occur:
Every time.

When does the problem NOT occur?
When I downgrade.

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.)
514.1589

Workarounds:
Simply do not call Export to dead links.
If you visit that link in your browser, what result code do you get?
Failure to open stream.

https://i.imgur.com/EGXEhud.png
I mean what HTTP code came back? What you posted is an error message generated by the server, not the HTTP status.
Oh, I got HTTP/1.1 301 Moved Permanently
This doesn't appear to be new behavior as far as I can tell, although it is a bug. The link you're going to is forcing an HTTPS upgrade that BYOND currently can't handle, and that's resulting in a failure that in turn is triggering the real bug: that the proc never resumes after it sleeps. The proc ought to receive a null response here, but it doesn't.

I think the most likely reason you're seeing this now is that the link wasn't redirecting before.
Lummox JR resolved issue with message:
world.Export() to an external link could fail to wake the calling proc from sleep in certain cases where the link failed.