(const
uint8_t*)str_utf8.ptr, -1,
&error);
I get a "Program exited with code -11" message.
Does anyone know what I'm doing wrong?
D strings are generally not null-terminated (except for
literals). Before passing them to a C function you need to add
a trailing null. Try using
bson_t* bson_new_from_json(in char* data, long len, bson_error_t*
error);
string str_utf8 = "{\"a\":1}";
bson_error_t error;
auto bson = bson_new_from_json(str_utf8.ptr, str_utf8.length,
&error);
You have a wrong declaration for bson_error_t too.
et a "Program exited with code -11" message.
Does anyone know what I'm doing wrong?
D strings are generally not null-terminated (except for
literals). Before passing them to a C function you need to add
a trailing null. Try using std.conv.toStringz instead of
casting the pointer yourse
amp;error);
I get a "Program exited with code -11" message.
Does anyone know what I'm doing wrong?
Thanks
I don't know the exact function you are trying to use, but -11
means "segmentation fault" on linux. This means that your
program is trying to read or write a m
On Wed, Jul 01, 2020 at 05:04:28AM +, Anthony via Digitalmars-d-learn wrote:
[...]
> auto str_utf8 = str.toUTF8();
> bson_error_t error
>
> auto bson = bson_new_from_json(cast(const uint8_t*)str_utf8.ptr, -1,
> &error);
>
>
> I get a "Program exited with
son_t* bson_new_from_json(const uint8_t* data, long len,
bson_error_t* error);
}
However when I try it, for example:
auto str_utf8 = str.toUTF8();
bson_error_t error
auto bson = bson_new_from_json(cast(const
uint8_t*)str_utf8.ptr, -1, &error);
I get a "Program exited with code -11&
g len,
bson_error_t* error);
}
However when I try it, for example:
auto str_utf8 = str.toUTF8();
bson_error_t error
auto bson = bson_new_from_json(cast(const uint8_t*)str_utf8.ptr,
-1, &error);
I get a "Program exited with code -11" message.
Does anyone know what I'm doing wrong?
Thanks
On Wednesday, 18 September 2019 at 13:36:30 UTC, Arjan wrote:
On Wednesday, 18 September 2019 at 13:22:03 UTC, Danny Arends
"Program exited with code -11"
Not signal 11? On unix/linux I assume?
Same thing. This is a segmentation fault.
Compile the program with the -g switch to
On Wednesday, 18 September 2019 at 13:36:30 UTC, Arjan wrote:
On Wednesday, 18 September 2019 at 13:22:03 UTC, Danny Arends
wrote:
Hey all,
"Program exited with code -11"
Not signal 11? On unix/linux I assume?
It's on linux yes...
No idea if it is a signal or an exi
On Wednesday, 18 September 2019 at 13:22:03 UTC, Danny Arends
wrote:
Hey all,
"Program exited with code -11"
Not signal 11? On unix/linux I assume?
error:
"Program exited with code -11"
No other messages, did anyone ever encounter something like this
before / got any ideas on how to figure out what is wrong ?
Danny
On Thursday, 26 November 2015 at 08:15:02 UTC, Rikki Cattermole
wrote:
You forgot to load the pointers to the functions in the shared
library :)
https://github.com/DerelictOrg/DerelictSFML2
OMG. I am embarrassed. Thank you very much.
uot;dub run" or "dub run --force", I get this:
Running ./notquiteciv
Program exited with code -11
$ lldb ./notquiteciv (run)
Process 81278 launched: './notquiteciv' (x86_64)
Process 81278 stopped
* thread #1: tid = 0x14dae3, 0x, queue =
'com.apple.main-
run --force", I get this:
Running ./notquiteciv
Program exited with code -11
$ lldb ./notquiteciv (run)
Process 81278 launched: './notquiteciv' (x86_64)
Process 81278 stopped
* thread #1: tid = 0x14dae3, 0x, queue =
'com.apple.main-thread', stop reason = E
On Wednesday, 24 June 2015 at 07:52:10 UTC, Charles Hawkins wrote:
On Wednesday, 24 June 2015 at 06:54:57 UTC, weaselcat wrote:
On Tuesday, 23 June 2015 at 06:50:28 UTC, Charles Hawkins
wrote:
[...]
you can instruct dub to use other compilers with the
--compiler option
valid options include
On Wednesday, 24 June 2015 at 06:54:57 UTC, weaselcat wrote:
On Tuesday, 23 June 2015 at 06:50:28 UTC, Charles Hawkins wrote:
On Tuesday, 23 June 2015 at 03:31:37 UTC, weaselcat wrote:
On Tuesday, 23 June 2015 at 03:29:14 UTC, Charles Hawkins
wrote:
[...]
Try to compile with either ldc or gd
On Tuesday, 23 June 2015 at 06:50:28 UTC, Charles Hawkins wrote:
On Tuesday, 23 June 2015 at 03:31:37 UTC, weaselcat wrote:
On Tuesday, 23 June 2015 at 03:29:14 UTC, Charles Hawkins
wrote:
[...]
Try to compile with either ldc or gdc and the -g flag, it
should give you a backtrace. dmd seems
On Tuesday, 23 June 2015 at 11:18:07 UTC, anonymous wrote:
On Tuesday, 23 June 2015 at 07:57:26 UTC, Charles Hawkins wrote:
Sigh. I'm probably doing something stupid. I tried full
paths:
dmd -I+/home/charles/projects/d/mylib/source/mylib/ myprog.d
What's that plus sign doing there? Looks w
On Tuesday, 23 June 2015 at 07:57:26 UTC, Charles Hawkins wrote:
Sigh. I'm probably doing something stupid. I tried full paths:
dmd -I+/home/charles/projects/d/mylib/source/mylib/ myprog.d
What's that plus sign doing there? Looks wrong.
/home/charles/projects/d/mylib/build/libmylib.a
Same
Try to compile with either ldc or gdc and the -g flag, it
should give you a backtrace. dmd seems to not like linux wrt
backtraces.
...I haven't had any success in compiling with anything but
dub. gdc, dmd, rdmd always give me "module mylib is in file
'mylib.d' which cannot be read" on my "im
On Tuesday, 23 June 2015 at 07:25:05 UTC, Baz wrote:
in dmd you have to pass
- the .lib/.a files a source
I meant "as source", actually. you pass the .lib or .a file
without switch as if it's a main source.
Ok, I think I've answered my own question. dub -v tells me what
I need to know. Looks like I need to do a separate compile &
link, make file like, just like the old days, or have a very
complicated command line. However, if there is a simple way to
do the above, which it seems there should b
On Tuesday, 23 June 2015 at 07:25:05 UTC, Baz wrote:
On Tuesday, 23 June 2015 at 06:50:28 UTC, Charles Hawkins wrote:
On Tuesday, 23 June 2015 at 03:31:37 UTC, weaselcat wrote:
On Tuesday, 23 June 2015 at 03:29:14 UTC, Charles Hawkins
wrote:
Thanks, Adam. I'm coming from OCaml and haven't seen
On Tuesday, 23 June 2015 at 06:50:28 UTC, Charles Hawkins wrote:
On Tuesday, 23 June 2015 at 03:31:37 UTC, weaselcat wrote:
On Tuesday, 23 June 2015 at 03:29:14 UTC, Charles Hawkins
wrote:
Thanks, Adam. I'm coming from OCaml and haven't seen a seg
fault in years. Didn't recognize it. :D Hope
On Tuesday, 23 June 2015 at 03:31:37 UTC, weaselcat wrote:
On Tuesday, 23 June 2015 at 03:29:14 UTC, Charles Hawkins wrote:
Thanks, Adam. I'm coming from OCaml and haven't seen a seg
fault in years. Didn't recognize it. :D Hopefully I can
figure it out from here.
Try to compile with either
On Tuesday, 23 June 2015 at 03:29:14 UTC, Charles Hawkins wrote:
Thanks, Adam. I'm coming from OCaml and haven't seen a seg
fault in years. Didn't recognize it. :D Hopefully I can
figure it out from here.
Try to compile with either ldc or gdc and the -g flag, it should
give you a backtrace
Thanks, Adam. I'm coming from OCaml and haven't seen a seg fault
in years. Didn't recognize it. :D Hopefully I can figure it out
from here.
On Tuesday, 23 June 2015 at 02:45:24 UTC, Adam D. Ruppe wrote:
128 == -1
I'm sorry, I need to stop posting these things without thinking.
-1 is actually 255 when you cast it, but I'm pretty sure the
shell just does that subtraction from 128 because of the signal
reservation codes. I stand by
On Tuesday, 23 June 2015 at 02:34:17 UTC, Charles Hawkins wrote:
How do I find out what that means?
Many return codes have a meaning in the linux documentation:
http://www.tldp.org/LDP/abs/html/exitcodes.html#EXITCODESREF
(it lists them as unsigned, but you got a signed result. 128 ==
-1, so
My first attempt at a significant D program and I'm getting:
Error executing command run:
Program exited with code -11
How do I find out what that means?
30 matches
Mail list logo