how to find stack trace of "Error: 4invalid UTF-8 sequence" "Error: std.format int argument expected"?

Jarrett Billingsley jarrett.billingsley at gmail.com
Wed May 27 20:49:12 PDT 2009


On Wed, May 27, 2009 at 11:13 PM, nobody <no at where.com> wrote:
> dmd v1.045 on Linux, I got error like:
>
> Error: 4invalid UTF-8 sequence
> Error: std.format int argument expected
>
> Then I run the program under debugger, there is no indication where the error
> occurred:
>
> Error: 4invalid UTF-8 sequence
>
> Program exited with code 01.
> (gdb) where
> No stack.
>
> This is ridiculous: why cannot the library generate segfault instead?

Lol, because segfaults aren't a real method of indicating errors.

>From what I understand, you can set GDB to break whenever _d_throw is
called.  I don't know the syntax.

If you don't want to use a debugger, there's always
printf/writefln/Stdout debugging.  Then you can find out what data is
causing the unicode transcoding methods to barf.



More information about the Digitalmars-d mailing list