BSON date field error on ARM CPU

67 views
Skip to first unread message

sptrakesh

unread,
May 22, 2011, 1:57:13 PM5/22/11
to BSON
Hi,

I have been successfully using BSON as the primary model for a few iOS
applications (extracted from MongoDB 1.8.1 C++ sources). I am
currently working on a BSON structure that includes multiple date
types. Everything works fine on the simulator, but crashes on the
device with an unknown function error. The following screen captures
show the debugger window with (hopefully) enough information.

http://sptci.com/uploads/mongodb/date1.png
http://sptci.com/uploads/mongodb/date2.png
http://sptci.com/uploads/mongodb/date3.png

Thanks for any help in resolving this issue.

(Posted originally on MongoDB forum
http://groups.google.com/group/mongodb-user/browse_thread/thread/9737a92fbf5ea4f0)

Rakesh

Martin Kou

unread,
May 22, 2011, 2:19:16 PM5/22/11
to BSON
Maybe you can try my Obj-C codec instead: https://github.com/martinkou/bson-objc

On May 22, 10:57 am, sptrakesh <rakesh.vidyadha...@gmail.com> wrote:
> Hi,
>
> I have been successfully using BSON as the primary model for a few iOS
> applications (extracted from MongoDB 1.8.1 C++ sources).  I am
> currently working on a BSON structure that includes multiple date
> types.  Everything works fine on the simulator, but crashes on the
> device with an unknown function error.  The following screen captures
> show the debugger window with (hopefully) enough information.
>
> http://sptci.com/uploads/mongodb/date1.pnghttp://sptci.com/uploads/mongodb/date2.pnghttp://sptci.com/uploads/mongodb/date3.png
>
> Thanks for any help in resolving this issue.
>
> (Posted originally on MongoDB forumhttp://groups.google.com/group/mongodb-user/browse_thread/thread/9737...)
>
> Rakesh

Scott Hernandez

unread,
May 22, 2011, 2:19:46 PM5/22/11
to bs...@googlegroups.com
There is also another project geared towards iOS dev (Objective C) here: http://github.com/martinkou/bson-objc 
I don't do iOS dev but I understand that it is mostly done in objective-c.

Also, the c-driver bson impl. might be something to look at as well since it is very light-weight and used in other drivers: http://github.com/mongodb/mongo-c-driver/tree/master/src In fact, I think the obj-c project just ported the version from the python source (which should be mostly the same).

Here is a date test:

sptrakesh

unread,
May 22, 2011, 5:10:55 PM5/22/11
to BSON
Thanks for the replies. Since I am developing a cross-platform core
library, Objective-C is not an option. I will check out the c
library. That should be perfect for my needs.

Rakesh

sptrakesh

unread,
May 23, 2011, 8:27:55 AM5/23/11
to BSON
The issue has been resolved, although I am not sure what the real
problem was. I found quite accidentally that I can safely use the
BSONElement.date() method without any issues on the device.
Attempting to use the Date() function still causes a crash, but since
date() things are good. Probably some Objective-C++ flakiness.

Rakesh
Reply all
Reply to author
Forward
0 new messages