#define FILE_ADDRESS "http://192.168.1.101/res"
mob/verb/Export()
world << 1
var/http[] = world.Export("[FILE_ADDRESS]/current.txt")
if(!http)
world << 2
return
var/F = http["CONTENT"]
if(!F)
world << 3
return
world << 4
Expected/Actual Results:
With threads disabled, the output is "1\n4", indicating that the export worked, the file was downloaded, and that there was something there.
With threads enabled, the output is "1" and then the game crashes.
backtrace:
BUG: Crashing due to an illegal operation!
Backtrace for BYOND 506.1247 on Linux:
Generated at Mon Jun 2 03:31:22 2014
test [0x8048000, 0x0], [0x8048000, 0x804bb14]
(unknown) ??
[0xf773d000, 0xf773d410], [0xf773d000, 0xf773d410]
(unknown) ??
libbyond.so [0xf726b000, 0x0], 0x1e92a4
test [0x8048000, 0x0], [0x8048000, 0x804c99c]
libpthread.so.0 [0xf6ee4000, 0x0], 0x6f70
libc.so.6 0xec6b0, 0xec70e (clone)
Recent proc calls:
/mob/verb/Export
Note: This is likely the source of the bug posted here: http://www.byond.com/forum/?post=1532527
I don't know if this makes a difference, but the reported CPU Usage when starting with threads on was at 50% once time, and 98% the second boot with threads on.
Backtrace: