-
Notifications
You must be signed in to change notification settings - Fork 38
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
Crash initializing object with dictionary #102
Comments
Hi @alldritt, You are certainly using it as suggested. I guess i'm just a little bit confused as to how a key can ever be nil in a dictionary. Obviously simplistic tests work okay, are you able to share a redacted version of the contents produced by asDictionary()? Many Thanks |
I think the problem has something to do with my altering my schema over time. The properties that cause this crash are ones that I've recently added to my OddballOptions object. In the code I cite above:
Interestingly, these changes to the schema were made some time ago and I would assume that any transitioning from one to the other would have be long over. |
That is super odd, as the classes are inspected and then the changes made there and then to the database. So there is "theoretically" no chance of a difference the moment you reference That said, looking at where is crashes, it may actually be down to trying to set an object value with a scalar parameter. I will look at that code and see if I can't work out what might be causing it. |
Hi @alldritt, I have made the following change. It seems a bit overkill to double check everything, but it will cover a myriad of casing issues that may crop up. Could you patch your version of shark to see if this resolves any issues. I suspect the issue is some kind of unexpected mismatch in the
|
Sorry for not responding sooner. I'm kind of stuck because I'm now running into crashes with the
Setting this property to have a string value before calling
I added some logging to your code snippet so we can see what's happening:
The
|
Hi,
I'm experiencing crashes when I try and initialize objects with a dictionary produced with
.asDictionary()
:The problem seems to be that there are entries in the dictionary produced by
.asDictionary()
that don't correspond to table fields. The translation from key->set-selector->key results in a nil value which leads to the exception shown above.Here is an excerpt of the code that leads to this crash:
After I wrote this, I found the
clone()
function which does not seem to crash in the same way.Is this just user error on my part of is there an issue when initializing objects using a dictionary?
The text was updated successfully, but these errors were encountered: