Skip to content
This repository has been archived by the owner on Nov 25, 2019. It is now read-only.

ARValidatorPresence crashes #66

Open
ghost opened this issue Dec 19, 2013 · 2 comments
Open

ARValidatorPresence crashes #66

ghost opened this issue Dec 19, 2013 · 2 comments

Comments

@ghost
Copy link

ghost commented Dec 19, 2013

Hello. I am having a problem and I want a fresh look on this.
I have some ActiveRecord entities in my application and both the application / specs (using cedar) targets are crashing (randomly - can happen 3 times in a row, can happen once in a week). And that crash is being traced from the calls:

-[ActiveRecord save]
-[ActiveRecord isValid]
+[ARValidator isValidOnSave:]
-[ARValidator isValidOnSave:]
-[ARValidatorPresence validateField:ofRecord]

It happens on random fields, on random classes.

The cause of the crash is [NSObject(NSKeyValueCoding) valueForKey:]
I get an EXC_BAD_INSTRUCTION, code is EXC_i386_INVOP, subcode=0x0 on line:

id aValue = [aRecord valueForKey:aField]

from the ARValidatorPresence's validateField:ofRecord:method.
It has been bugging me for complete weeks and months and I could not find a solution for it. Do any of you know what could be possibly going on?
Also, the database does not initialize if sqlite3_unicode_load() is executed. (Please note that I've also commented that out, may that be the cause?) (Please don't get harsh on me, I've just did my best to make it work.)
Also, if I remove validate_presence_of from the entities validation, everything works OK.
Also, I've made specs coverage for the iActiveRecord specs, and some of classes like ARColumn or core columns are not fully covered by specs.
I would really love to get any directions on this, please let me know if I should provide any additional info, thanks in advance!

@AlexDenisov
Copy link
Owner

Hi @nemesis-fw, thank you for feedback.
Also, I've received email with the similar issue, so I will look at it.

@ghost
Copy link
Author

ghost commented Dec 23, 2013

Thank you @AlexDenisov! If I can help you with anything I'd be delighted to.

@ghost
Copy link
Author

ghost commented Jan 13, 2014

@AlexDenisov any updates?

@neilabdev
Copy link
Contributor

ghost. Please see:
#78

For possible resolution. Its working for me after applying this fix..

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

No branches or pull requests

2 participants