How to find the cause of crash?
zhmt via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Wed Mar 11 18:36:17 PDT 2015
On Wednesday, 11 March 2015 at 10:13:12 UTC, Théo Bueno wrote:
> On Wednesday, 11 March 2015 at 08:16:17 UTC, zhmt wrote:
>> Now , my question is:
>> How to get the position it crashes?
>> Or get the method call stack?
>
> If you are developing under Linux, you can use GDB to debug
> your D apps, just like any C/C++ program. Make sure you are
> compiling in debug mode in order to have debug symbols in your
> binary.
>
> Under Windows, there is Mago with VisualD.
>
> Please refer to this page for more details on available
> debuggers : http://wiki.dlang.org/Debuggers
>
> If you don't know how to use these debuggers, there is a lot of
> documentation available on the web :)
Thank you very much.
I got the call stack by gdb:
Program received signal SIGSEGV, Segmentation fault.
0x000000000077ca11 in
vibe.core.drivers.libevent2_tcp.onSocketEvent (
buf_event=0xcd43f8, status=17, arg=0xcd54e0)
at
../../../../root/.dub/packages/vibe-d-0.7.22/source/vibe/core/drivers/libevent2_tcp.d:651
Here is the code of libevent2_tcp.d:
if (ctx.writeOwner && ctx.writeOwner != ctx.readOwner &&
ctx.writeOwner.running) {
logTrace("resuming corresponding task%s...", ex is null ? ""
: " with exception");
if (ctx.writeOwner.fiber.state == Fiber.State.EXEC)
ctx.exception = ex;
else ctx.core.resumeTask(ctx.writeOwner, ex); //LINE 651
}
I dont know what is happening, may I should get help from vibe.d
forum.
More information about the Digitalmars-d-learn
mailing list