digitalmars.D.learn - How to find the cause of crash?
- zhmt (13/13) Mar 11 2015 I developed a socks5 proxy server with vibe.d.
- zhmt (3/17) Mar 11 2015 ./run: line 3: 49999 segment error (core dumped)
- zhmt (3/3) Mar 11 2015 I want to know how to locate the position of crashing in dlang?
- Daniel =?UTF-8?B?S296w6Fr?= via Digitalmars-d-learn (4/9) Mar 11 2015 D has these too, you just need to compile it in debug mode. If you use
- Daniel =?UTF-8?B?S296w6Fr?= via Digitalmars-d-learn (4/9) Mar 11 2015 D has these too, you just need to compile it in debug mode. If you use
- zhmt (3/14) Mar 11 2015 Thank you. I compiled it in release mode, I'll try debug mode
- =?UTF-8?B?IlRow6lv?= Bueno" (9/12) Mar 11 2015 If you are developing under Linux, you can use GDB to debug your
I developed a socks5 proxy server with vibe.d. but it crashed after running a few minutes, with the output below: Task terminated with uncaught exception: Operating on closed TCPConnection. Task terminated with uncaught exception: Operating on closed TCPConnection. Task terminated with unhandled exception: ./run: line 3: 49999 段错误 (core dumped) ./ezsock the ./run is a simple shell to start ./ezsock. Now , my question is: How to get the position it crashes? Or get the method call stack? Any help is welcome,Thanks in advance!!
Mar 11 2015
On Wednesday, 11 March 2015 at 08:16:17 UTC, zhmt wrote:I developed a socks5 proxy server with vibe.d. but it crashed after running a few minutes, with the output below: Task terminated with uncaught exception: Operating on closed TCPConnection. Task terminated with uncaught exception: Operating on closed TCPConnection. Task terminated with unhandled exception: ./run: line 3: 49999 段错误 (core dumped) ./ezsock the ./run is a simple shell to start ./ezsock. Now , my question is: How to get the position it crashes? Or get the method call stack? Any help is welcome,Thanks in advance!!./run: line 3: 49999 segment error (core dumped) ./ezsock
Mar 11 2015
I want to know how to locate the position of crashing in dlang? for example: there is stack dump in c, exception stack in java, they could help to locate the root of problems.
Mar 11 2015
On Wed, 11 Mar 2015 10:05:39 +0000 zhmt via Digitalmars-d-learn <digitalmars-d-learn puremagic.com> wrote:I want to know how to locate the position of crashing in dlang? for example: there is stack dump in c, exception stack in java, they could help to locate the root of problems.D has these too, you just need to compile it in debug mode. If you use dub dont use release build type
Mar 11 2015
On Wed, 11 Mar 2015 10:05:39 +0000 zhmt via Digitalmars-d-learn <digitalmars-d-learn puremagic.com> wrote:I want to know how to locate the position of crashing in dlang? for example: there is stack dump in c, exception stack in java, they could help to locate the root of problems.D has these too, you just need to compile it in debug mode. If you use dub dont use release build type
Mar 11 2015
On Wednesday, 11 March 2015 at 11:09:42 UTC, Daniel Kozák wrote:On Wed, 11 Mar 2015 10:05:39 +0000 zhmt via Digitalmars-d-learn <digitalmars-d-learn puremagic.com> wrote:Thank you. I compiled it in release mode, I'll try debug mode later.I want to know how to locate the position of crashing in dlang? for example: there is stack dump in c, exception stack in java, they could help to locate the root of problems.D has these too, you just need to compile it in debug mode. If you use dub dont use release build type
Mar 11 2015
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 :)
Mar 11 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:Ok,Thanks. I want to try to compile in debug mode first. I will try GDB later if the debug mode fails.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 :)
Mar 11 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: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.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 :)
Mar 11 2015