ID:1981560
 


My game has recently been crashing every hour after I host and this is the runtime error I get
this is the runtime error im getting when the game crashes
BUG: Finished erasure with refcount=1 (ref=3:202) DM (Login.dm:154)
BUG: Finished erasure with refcount=1 (ref=3:295) DM (Login.dm:154)
BUG: Finished erasure with refcount=1 (ref=3:133) DM (Login.dm:154)
BUG: Finished erasure with refcount=1 (ref=3:138) DM (Login.dm:154)
BUG: Finished erasure with refcount=1 (ref=3:299) DM (Login.dm:154)
BUG: Finished erasure with refcount=1 (ref=3:131) DM (Login.dm:154)
BUG: Finished erasure with refcount=1 (ref=23:14) DM (Character Saving2.dm:152)
BUG: Finished erasure with refcount=1 (ref=3:221) DM (Login.dm:154)
BUG: Finished erasure with refcount=1 (ref=3:222) DM (Login.dm:154)
BUG: Finished erasure with refcount=1 (ref=23:13) DM (Character Saving2.dm:152)
BUG: Finished erasure with refcount=1 (ref=3:127) DM (Login.dm:154)
BUG: Finished erasure with refcount=1 (ref=3:243) DM (Login.dm:154)
BUG: Finished erasure with refcount=1 (ref=3:376) DM (Login.dm:154)
BUG: Finished erasure with refcount=1 (ref=23:13) DM (Character Saving2.dm:152)
BUG: Finished erasure with refcount=1 (ref=23:20) DM (Character Saving2.dm:152)
BUG: Finished erasure with refcount=1 (ref=3:427) DM (Login.dm:154)
BUG: Finished erasure with refcount=1 (ref=3:352) DM (Login.dm:154)
BUG: Finished erasure with refcount=1 (ref=23:5) DM (Character Saving2.dm:152)
BUG: Finished erasure with refcount=1 (ref=3:462) DM (Login.dm:154)
BUG: Finished erasure with refcount=1 (ref=23:17) DM (Character Saving2.dm:152)
BUG: Finished erasure with refcount=1 (ref=3:138) DM (Login.dm:154)
BUG: Finished erasure with refcount=1 (ref=23:11) DM (Character Saving2.dm:152)
BUG: Finished erasure with refcount=1 (ref=3:345) DM (Login.dm:154)
BUG: Finished erasure with refcount=1 (ref=3:360) DM (Login.dm:154)
BUG: Finished erasure with refcount=1 (ref=23:12) DM (Character Saving2.dm:152)
BUG: Finished erasure with refcount=1 (ref=3:463) DM (Login.dm:154)
BUG: Finished erasure with refcount=1 (ref=23:18) DM (Character Saving2.dm:152)
BUG: Finished erasure with refcount=1 (ref=3:460) DM (Login.dm:154)
BUG: Finished erasure with refcount=1 (ref=23:0) DM (Character Saving2.dm:152)
BUG: Finished erasure with refcount=1 (ref=3:124) DM (Login.dm:154)
BUG: Finished erasure with refcount=1 (ref=23:12) DM (Character Saving2.dm:152)
BUG: Finished erasure with refcount=1 (ref=3:204) DM (Login.dm:154)
BUG: Finished erasure with refcount=1 (ref=23:5) DM (Character Saving2.dm:152)
BUG: Finished erasure with refcount=1 (ref=3:427) DM (Login.dm:154)
BUG: Finished erasure with refcount=1 (ref=3:437) DM (Login.dm:154)
BUG: Finished erasure with refcount=1 (ref=23:13) DM (Character Saving2.dm:152)
BUG: Finished erasure with refcount=1 (ref=3:107) DM (Login.dm:154)
BUG: Finished erasure with refcount=1 (ref=3:203) DM (Login.dm:154)
BUG: Finished erasure with refcount=1 (ref=23:1) DM (Character Saving2.dm:152)
BUG: Finished erasure with refcount=1 (ref=23:6) DM (Character Saving2.dm:152)
BUG: Finished erasure with refcount=1 (ref=23:7) DM (Character Saving2.dm:152)
BUG: Finished erasure with refcount=1 (ref=23:8) DM (Character Saving2.dm:152)
BUG: Finished erasure with refcount=1 (ref=23:9) DM (Character Saving2.dm:152)
BUG: Finished erasure with refcount=1 (ref=23:10) DM (Character Saving2.dm:152)
BUG: Finished erasure with refcount=1 (ref=23 (cat) ) DM (Character Saving2.dm:152)
BUG: Finished erasure with refcount=1 (ref=23:4) DM (Character Saving2.dm:152)
BUG: Finished erasure with refcount=1 (ref=23:2) DM (Character Saving2.dm:152)
BUG: Finished erasure with refcount=1 (ref=23:15) DM (Character Saving2.dm:152)
BUG: Finished erasure with refcount=1 (ref=23:16) DM (Character Saving2.dm:152)
BUG: Finished erasure with refcount=1 (ref=23:14) DM (Character Saving2.dm:152)
BUG: Finished erasure with refcount=1 (ref=23:19) DM (Character Saving2.dm:152)
BUG: Finished erasure with refcount=1 (ref=23:21) DM (Character Saving2.dm:152)
BUG: Finished erasure with refcount=1 (ref=23:17) DM (Character Saving2.dm:152)
BUG: Finished erasure with refcount=1 (ref=23:11) DM (Character Saving2.dm:152)
BUG: Finished erasure with refcount=1 (ref=23:0) DM (Character Saving2.dm:152)
BUG: Finished erasure with refcount=1 (ref=23:12) DM (Character Saving2.dm:152)
BUG: Finished erasure with refcount=1 (ref=23:5) DM (Character Saving2.dm:152)
BUG: Finished erasure with refcount=1 (ref=23:13) DM (Character Saving2.dm:152)
BUG: Finished erasure with refcount=1 (ref=23:0) DM (Character Saving2.dm:152)
BUG: Finished erasure with refcount=1 (ref=3:167) DM (Login.dm:154)
BUG: Finished erasure with refcount=1 (ref=3:457) DM (Login.dm:154)
BUG: Finished erasure with refcount=1 (ref=3:122) DM (Login.dm:154)
BUG: Finished erasure with refcount=1 (ref=23:1) DM (Character Saving2.dm:152)
BUG: Finished erasure with refcount=1 (ref=3:469) DM (Login.dm:154)
BUG: Finished erasure with refcount=1 (ref=3:226) DM (Login.dm:154)
BUG: Finished erasure with refcount=1 (ref=23 (cat) ) DM (Character Saving2.dm:152)
BUG: Finished erasure with refcount=1 (ref=3:105) DM (Login.dm:154)
BUG: Finished erasure with refcount=1 (ref=23:4) DM (Character Saving2.dm:152)
BUG: Finished erasure with refcount=1 (ref=3:270) DM (Login.dm:154)


This I the code of line 152-154

 Logout()
..()
del(src)


Thus of code of character handle 151-154

    var/theFolder=uppertext(copytext(src.key,1,2))
if(fexists("savefiles/players/[theFolder]/[src.key]/[src.name]")) fdel("savefiles/players/[theFolder]/[src.key]/[src.name]")
//if(fexists("savefiles/players/[theFolder]/[src.key]/[src.name]")) fdel("savefiles/players/[theFolder]/[src.key]/[src.name]")
var/savefile/s=new("savefiles/players/[theFolder]/[src.key]/[src.name]")


Any help appreciated
Is it possible that Login() is overrided elsewhere and src is being deleted there?

I think showing what's going on in any overrided Login() procs, as well as the whole version of the second snippet, may help. I'm not too familiar with those types of errors, but I think what's at least obvious is src is being deleted before or during some important operations when it shouldn't be.
Login() is overrided or Logout()
In response to Fanny10
My bad; I meant Logout().
Looks as though you've got a recurring reference between two things, but I thought savefiles were smart enough to handle those?
yes logout is overrided somewhere else but src is getting deleted only once that the code i sent you