www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - [Off-topic] Very bad day

reply Sjoerd van Leent <svanleent wanadoo.nl> writes:
Hello all,

Today I was trying to make a start for the lexing/treebuilding phase for 
DDoc. I got flex and bison going and the specifications alongside me. 
May you think, why is he lexing all over again, well I need the comments 
and comments and comments.

And then all the sudden, my beautiful lexer (well not that much right 
now) went stuck (well at least, I thought it went stuck).

So I tried and tried for two hours (and maybe even more) and then I 
found out that I did printf("%s\n", i) instead of printf("%d\n", i). 
Since the thing works in C/C++ (and unfortunately not in D).

There was my segfault.

The morale: Don't stick to D to much, it will infect you with somekind 
of virus called addiction.

Regards,
Sjoerd
Oct 20 2004
next sibling parent reply Ant <Ant_member pathlink.com> writes:
In article <cl6kvq$j4r$1 digitaldaemon.com>, Sjoerd van Leent says...
Hello all,

Today I was trying to make a start for the lexing/treebuilding phase for 
DDoc. I got flex and bison going and the specifications alongside me. 
May you think, why is he lexing all over again, well I need the comments 
and comments and comments.

And then all the sudden, my beautiful lexer (well not that much right 
now) went stuck (well at least, I thought it went stuck).

So I tried and tried for two hours (and maybe even more) and then I 
found out that I did printf("%s\n", i) instead of printf("%d\n", i). 
Since the thing works in C/C++ (and unfortunately not in D).

There was my segfault.

The morale: Don't stick to D to much, it will infect you with somekind 
of virus called addiction.

Regards,
Sjoerd

We need a stack trace on segfault. Walter remind us that the debuger does it for us. On linux that's all gdb is good for but will cut those 2 hours in to 20 seconds. On windows I couldn't make it work (not gdb, the other one). Ant
Oct 20 2004
parent "Walter" <newshound digitalmars.com> writes:
"Ant" <Ant_member pathlink.com> wrote in message
news:cl6lr8$k6m$1 digitaldaemon.com...
 We need a stack trace on segfault.
 Walter remind us that the debuger does it for us.
 On linux that's all gdb is good for but will cut those
 2 hours in to 20 seconds.
 On windows I couldn't make it work (not gdb, the other one).

I use windbg.exe. For the debugger to catch it, though, you also need to disable the catch in phobos\internal\dmain2.d to the attached.
Oct 21 2004
prev sibling parent "Nick Sabalausky" <z a.a> writes:
"Sjoerd van Leent" <svanleent wanadoo.nl> wrote in message 
news:cl6kvq$j4r$1 digitaldaemon.com...

 The morale: Don't stick to D to much, it will infect you with somekind of 
 virus called addiction.

Heheh, I've noticed that about all of the C++ replacements: C#, D, and to a lesser extent, Java. They're all very addictive :)
Oct 20 2004