Closed mihails-strasuns closed 3 years ago
If you're using DMD 2.068 you should know about the struct dtor issue I just posted about. Anything could be related to it right now
Ahha, indeed, compiling the very same source with gdc (2.066) seems to work just fine.
Thanks for the heads up!
Hey, I don't think this is the 2.068 issue. I'm on 2.067 and I'm also having this issue (and I think I've had it before as well or at least a similar issue).
Easiest way to repro it is to open the app in gdb, set a breakpoint on "onSocketEvent", wait a few minutes, resume the thread. You will end up with a seg fault about 40% of the time because ctx.core is null.
I'm on a Mac btw
@Dicebot @etcimon @s-ludwig Oh, actually, this has been around for ages (see #1053 comment 3). Seems like a high-priority bug if it is causing segmentation faults and has been around since at least April.
FWIW, this should be fixed in vibe-core/eventcore, as that explicitly keeps the the reference count incremented until it has received the expected read/write event, so that the underlying file descriptor and the associated data do not get destroyed prematurely.
Closing as per @s-ludwig 's comment.
Downstream issue : https://github.com/Dicebot/mood/issues/17
Debug log before crash:
Checking core in gdb shows that
ctx.core
isnull
here:(full bt in linked issue)
Nothing in backtrace or log seems to refer to anything from my application so I a bit lost about debugging it. Could be memory corruption, of course, but I wonder if something rings a bell immediately.