ID:2571174
 
Resolved
Error messages from external DLL calls were cut off after the first character in Windows.
BYOND Version:513.1523
Operating System:Windows 10 Pro 64-bit
Web Browser:Firefox 76.0
Applies to:Dream Daemon
Status: Resolved (513.1527)

This issue has been resolved.
Descriptive Problem Summary:
Most error messages when calling a .dll are truncated at the first character in 513.

Numbered Steps to Reproduce Problem:
Call a .dll in a way that does not succeed.

Code Snippet (if applicable) to Reproduce Problem:
call("byondcore.dll", "does_not_exist")()


Expected Results:

Runtime error Procedure not found.

Actual Results:

Runtime error P

Does the problem occur:
Every time? Or how often?
In other games? Yes, in a test project.
In other user accounts? Yes, confirmed by another user.
On other computers? Yes, confirmed by another user.

When does the problem NOT occur?
When call()() succeeds.
The "Unable to load library" message is not affected.
Does not occur with Linux .so libraries.

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.)
It does not occur in 512.1488.

Workarounds:
Attempt to extrapolate from "P", "W", etc. to the full error message.
I had a theory that this is caused by the underlying api returning the error text in UTF16/UCS2, causing the second byte to be \NUL for standard ascii characters and thus ending the string.
In response to Naksuasdf
Have seen a couple more people run into this in SS13 dev channels. Would be good to see it fixed.

Naksuasdf wrote:
I had a theory that this is caused by the underlying api returning the error text in UTF16/UCS2, causing the second byte to be \NUL for standard ascii characters and thus ending the string.

Seems likely.
Lummox JR resolved issue with message:
Error messages from external DLL calls were cut off after the first character in Windows.