ID:1866787
 
Resolved
Reducing map size could result in crashes in uncommon cases.
BYOND Version:507.1283
Operating System:Linux
Web Browser:N/A
Applies to:Dream Daemon
Status: Resolved (508.1287)

This issue has been resolved.
BUG: Bad ref (4:233245340) in DecRefCount(DM Dynamic Lighting.dm:197)
BUG: Bad ref (4:233245340) in DecRefCount(DM Dynamic Lighting.dm:197)
BUG: Bad ref (4:233245340) in IncRefCount(DM Dynamic Lighting.dm:196)
BUG: Bad ref (4:233245340) in IncRefCount(DM Dynamic Lighting.dm:197)
BUG: Bad ref (4:233245340) in DecRefCount(DM Dynamic Lighting.dm:197)

        sd_LumUpdate()
var/area/Loc = loc
if(!istype(Loc) || !Loc.sd_lighting) return



I'm confused about the nature of this error. Lines shown above are 195,196,197
I've been getting a lot of these IncRefCount and DecRefCount errors in my dream daemon..



The game has been crashing at random and unpredictable times recently. Here's one of the backtraces (most recent)


BUG: Removing corrupt rsc entry 'Sidecut Shirt.dmi'
BUG: Removing corrupt rsc entry 'Sidecut Shirt.dmi'
BUG: Crashing due to an illegal operation!

Backtrace for BYOND 507.1283 on Linux:
Generated at Sat May 30 20:12:06 2015

DreamDaemon [0x8048000, 0x0], [0x8048000, 0x804bb74]
libbyond.so [0xae283000, 0x0], 0x1e671c
[0xae795000, 0xae795410], [0xae795000, 0xae795410]
libbyond.so [0xae283000, 0x0], 0x1e671c
libbyond.so [0xae283000, 0x0], 0x1f0b19
libbyond.so [0xae283000, 0x0], 0x1f1c31
libbyond.so [0xae283000, 0x0], 0x1f734d
libbyond.so 0x303ab0, 0x303bfa
libbyond.so 0x2d2260, 0x2d2462
DreamDaemon [0x8048000, 0x0], [0x8048000, 0x804af24]
libc.so.6 0x16d60, 0x16e46 (__libc_start_main)
DreamDaemon [0x8048000, 0x0], [0x8048000, 0x804a7b1]

Recent proc calls:
/mob/Stat
/mob/Stat
/mob/Stat
/mob/Stat
/mob/Stat
/mob/Stat
/mob/Stat
/mob/Stat
/mob/Stat
/mob/Stat
/mob/Stat
/mob/Stat
/mob/Stat
/mob/Stat
/proc/Months
/proc/Days

To help the BYOND developers debug this, please send the above trace as part
of a very detailed bug report: http://www.byond.com/members/?command=view_tracker&tracker=1


Well, the corrupt .rsc entry can't be helping anything. You should do a clean compile. You should also update to version 507.1286 because 1283 is no longer current.

This is something I can look into though, as I suspect (but I'm not positive) this crash was not fixed by one of the subsequent builds. Thankfully you've provided the crash info I need to check it out.

I'll move this to Bug Reports.
How do I clean compile this as most of the resources that are not working are ones from live server. Aka, players input in their own icons.
Is 'Sidecut Shirt.dmi' not part of the game's own resources? It shouldn't be likely for an uploaded icon to do this, because that's stored in the .dyn.rsc file that's deleted and created fresh when the server starts. I think the error message points to a problem with the compiled-in resources instead.
It is not in the game source, just did a quick Ctrl+F and a search even.
Oh, forgot to mention that we have a lot of uploaded icons in. Is there a limit? We also use 'skillcards' and there are a lot of those which use 75x75 pngs uploaded during runtime as well
There shouldn't really be a limit within any practical number of uploads that might be expected. I don't think that's much of a problem.
I just updated to the latest version. I'll keep an eye out for the logs then send you if I spot anything else.
Hey Lummox.
Crashes continue on the new version:
http://puu.sh/igUAr/0859539fd6.log
Bad ref errors too. Hope this log is of help.


BUG: Maximum number of map cells exceeded (65535)!
Also I find this confusing. we use a 300x300 map
The max number of map cells refers to the fact that BYOND keeps track of turfs by their unique appearance, area, etc. Most of the time, a large number of turfs should share the same appearance and area, making the number of unique cells very small. It should be extremely difficult to hit the limit, although it is technically possible when you use 90000 turfs. Are you doing anything with your map that could cause it to change appearance/area a lot?
Are you by any chance resizing the map a lot? I think I see a possible cause of your crash and I'm working on it.
I'm not sure of the issues you're having with the decrefcount (that might be addressed by the same fix) or the unique cell IDs, but I have a fix for the crash in the form of sanity checking. If any of the other issues persist, best to start a new thread for those.
Lummox JR resolved issue with message:
Reducing map size could result in crashes in uncommon cases.
Hey Lummox! This wasn't resolved.
Welcome BYOND! (5.0 Beta Version 508.1289)
The BYOND hub reports that port 1338 is reachable.
BUG: Maximum number of map cells exceeded (65535)!
BUG: Crashing due to an illegal operation!

Backtrace for BYOND 508.1289 on Linux:
Generated at Mon Jun 15 15:30:57 2015

DreamDaemon [0x8048000, 0x0], [0x8048000, 0x804bb24]
libbyond.so [0xa01d7000, 0x0], 0x1eeaee
[0xa06f4000, 0xa06f4410], [0xa06f4000, 0xa06f4410]
libbyond.so [0xa01d7000, 0x0], 0x1eeaee
libbyond.so [0xa01d7000, 0x0], 0x1f7738
libbyond.so [0xa01d7000, 0x0], 0x1fc8e5
libbyond.so 0x30ed30, 0x30ee4a
libbyond.so 0x2dcf20, 0x2dd122
DreamDaemon [0x8048000, 0x0], [0x8048000, 0x804ae34]
libc.so.6 0x16d60, 0x16e46 (__libc_start_main)
DreamDaemon [0x8048000, 0x0], [0x8048000, 0x804a731]

Recent proc calls:
/mob/Stat
/mob/Stat
/mob/Stat
/mob/Stat
/mob/Stat
/proc/Months
/proc/Days
/proc/Months
/proc/Days
/proc/AgeReturn
/mob/Stat
/mob/Stat
/mob/proc/grab
/mob/proc/grab
/mob/Stat
/mob/proc/Run

To help the BYOND developers debug this, please send the above trace as part
of a very detailed bug report: http://www.byond.com/members/?command=view_tracker&tracker=1

Mon Jun 15 18:34:20 2015
World opened on network port 1338.
Welcome BYOND! (5.0 Beta Version 508.1289)

it's still happening on the BETA.
I'm not sure this is the exact same issue, but I'll look into it.

[edit]
Hmm, well it is crashing in the same place as before in spite of previous sanity checks. It would really help to have a copy of the project to try this with, if there's a way to reproduce the issue consistently.

The fact that it keeps hitting the max number of unique turfs is strange. That really shouldn't happen unless you're making changes to each and every turf so that they're all unique. Even with an aggressive lighting system based on areas or overlays, I don't see how this should happen. But maybe seeing the lighting system would make it clear.
Alright.
Here's the light system:
(It's a library. Sd's lighting if you wish to see a demo with it.)
http://pastebin.com/AH7eLrpm


Weather system:
http://pastebin.com/zDbUEAKP

It does not happen regularly. Sometimes game runs for a day+ before crashing, sometimes hours.
I recommend getting some debug output at regular intervals. You should be able to get a report of memory usage and that should tell you the number of unique map cells in use. I expect the number to creep up but there is garbage collection on it (every 10 minutes with normal tick_lag). While the garbage collection isn't perfect, I struggle to see how it could miss the boat so badly as to allow a situation like this.
Just now after more areas were mapped in, I found it impossible to run the game using Ctrl+R and DreamDaemon as they both just crash. I disabled the Weather proc and it became runable. Perhaps I should re-work the weather system to a screen object rather than using areas.
The fact that you're not generating any new areas beyond what the lighting system uses is troubling. To get the limit up this high would require many different areas for many different kinds of turfs. (However, sd_DAL is really not compatible at all with your weather system anyway, because it uses areas itself.)

Again though, it would help if you got debug output. I also need your source, especially the version that was crashing right out of the gate, as that will be the quickest way to see what's happening and finally fix it.
Yeah. I'll send you that through pager. Sorry for the delay, I have exams currently!
Page: 1 2