Thread overview | ||||||
---|---|---|---|---|---|---|
|
November 25, 2015 Exit with code xx | ||||
---|---|---|---|---|
| ||||
Hi Is there any overview, list, wiki about what's behind runtime errors like "Program exited with code -11"? Okay, I made a mistake...but it's better to know where and what kind? Thanks & Regards, Ozan |
November 25, 2015 Re: Exit with code xx | ||||
---|---|---|---|---|
| ||||
Posted in reply to Ozan | On Wednesday, 25 November 2015 at 16:11:09 UTC, Ozan wrote:
> Hi
>
> Is there any overview, list, wiki about what's behind runtime errors like
> "Program exited with code -11"?
>
> Okay, I made a mistake...but it's better to know where and what kind?
>
> Thanks & Regards,
> Ozan
That's just normal exit-code stuff, same as in C . Could be a segfault of some sort.
If you've compiled with -release and/or no bounds checks (can be hidden behind -O flags with ldc/gdc), try dropping those options and you might get a more useful error.
Alternatively, fire up a debugger and find where things went wrong the old-fashioned way, e.g.
$ gdb ./myProgram
(gdb) run
segfault, some information ....
(gdb) bt full
full stack trace
|
November 25, 2015 Re: Exit with code xx | ||||
---|---|---|---|---|
| ||||
Posted in reply to Ozan | On Wednesday, 25 November 2015 at 16:11:09 UTC, Ozan wrote:
> Hi
>
> Is there any overview, list, wiki about what's behind runtime errors like
> "Program exited with code -11"?
>
> Okay, I made a mistake...but it's better to know where and what kind?
>
> Thanks & Regards,
> Ozan
You know about process exit codes right? On Linux, a negative exit code means that the process exited due to a signal. Signal 11 is SIGSEGV, aka a segmentation fault.
Run your binary in a debugger (ex. gdb) and find out where it's causing the error.
|
November 25, 2015 Re: Exit with code xx | ||||
---|---|---|---|---|
| ||||
Posted in reply to Ozan | On Wednesday, 25 November 2015 at 16:11:09 UTC, Ozan wrote:
> Hi
>
> Is there any overview, list, wiki about what's behind runtime errors like
> "Program exited with code -11"?
>
> Okay, I made a mistake...but it's better to know where and what kind?
>
> Thanks & Regards,
> Ozan
Okay, I found my little bug: An array error.
So "Program exited with code -11" is about memory bugs, I think.
Regards, Ozan
|
Copyright © 1999-2021 by the D Language Foundation