Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error when using BsonObjectID in release #847

Closed
dariusc93 opened this issue Oct 1, 2014 · 4 comments
Closed

Error when using BsonObjectID in release #847

dariusc93 opened this issue Oct 1, 2014 · 4 comments

Comments

@dariusc93
Copy link
Contributor

I currently have an issue when it comes to using BsonObjectID in a struct. In debug mode, it compiles and builds just fine but when it comes to building using dub build -b release, i get

../../../.dub/packages/vibe-d-0.7.21-beta.4/source/vibe/internal/meta/traits.d(150): Error: null dereference in function _D4vibe8internal4meta6traits79__T9isRWFieldTS9shouthost7service7backend9datastore12QueueAccountVAyaa3_5f6964Z16__T10testAssignZ10testAssignFNaNbNiNfZv
Error: null dereference in function _D4vibe8internal4meta6traits79__T9isRWFieldTS9shouthost7service7backend9datastore12QueueAccountVAyaa3_5f6964Z16__T10testAssignZ10testAssignFNaNbNiNfZv

with the struct being

struct QueueAccount {
    BsonObjectID _id;
    string firstname;
    string lastname;
    string email;
    string type;
}

Is there something I should change?

@mario-silva
Copy link

Hello,

I have the same problem.
Darius, did you find any work around until this is fixed?

Thanks,
Mario

@dariusc93
Copy link
Contributor Author

The only thing I am currently doing is just compiling in debug mode while investigating into why "__traits(getMember, *pt, M) = __traits(getMember, *pt, M);" is causing this error. I am honestly am stump as to why this is happening since this is my first time coming across this. Any idea @s-ludwig ?

@s-ludwig
Copy link
Member

s-ludwig commented Oct 7, 2014

Not sure why it (only) occurs in release mode, but I've worked around it by replacing the pointer by an uninitialized stack value, which should hopefully not break anything.

@dariusc93
Copy link
Contributor Author

Ok thanks. I will let you know if it does break anything

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants