ID:2795673
 
Resolved
Trying to convert a /database or /database/query object to a string caused a hang.
BYOND Version:514
Operating System:Windows 10 Pro 64-bit
Web Browser:Chrome 102.0.5005.61
Applies to:Dream Daemon
Status: Resolved (514.1585)

This issue has been resolved.
Descriptive Problem Summary:

Outputting a database datum inside of a string will hang the client, alternatively it will output nothing if not embedded in a string, both results are wrong; datums without a name variable should output their type.



Code Snippet (if applicable) to Reproduce Problem:
mob/verb/Kaboom()
var/database/query/query = new("INSERT INTO test (name,ckey,type) VALUES(?,?,?)",name,ckey,type)
world << query // Doesn't hang (but also outputs nothing)
world << "[query]" // Hangs

mob/verb/KaboomToo()
var/database/db = new("test.db")
world << db // Doesn't hang (but also outputs nothing)
world << "[db]" // Hangs


HangDatum
_dm_interface = _DM_datum|_DM_Database

mob/verb/Kaboom()
var/HangDatum/hd = new()
world << "[hd]"


Expected Results:

The type of the datum output.

Actual Results:

Either nothing is output, or the server hangs.

Does the problem occur:
Every time? Or how often?
In other games?
In other user accounts?
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.)

Workarounds:

Output the "_binobj" variable of the database datum instead, for queries this will be the query itself and not the type/name.
Lummox JR resolved issue with message:
Trying to convert a /database or /database/query object to a string caused a hang.