BSON date field error on ARM CPU

18 views
Skip to first unread message

sptrakesh

unread,
May 22, 2011, 8:33:13 AM5/22/11
to mongodb-user
Hi,

I have been successfully using BSON as the primary model for a few iOS
applications. 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.

Rakesh

sptrakesh

unread,
May 22, 2011, 8:44:23 AM5/22/11
to mongodb-user
Also, invoking value() and valuesize() works without issues (but of no
particular use that I can think of). valuesize() returns 8.

Scott Hernandez

unread,
May 22, 2011, 12:52:16 PM5/22/11
to mongod...@googlegroups.com
You may want to take this over to the bson group: http://groups.google.com/group/bson

These emails can be lost in the noise of mongodb questions easily. On the bson list people are doing more of what you are trying to do, use bson outside of mongodb.

Also, when you post in the bson group please specify which bson implementation you are using.

On Sun, May 22, 2011 at 8:44 AM, sptrakesh <rakesh.vi...@gmail.com> wrote:
Also, invoking value() and valuesize() works without issues (but of no
particular use that I can think of).  valuesize() returns 8.

--
You received this message because you are subscribed to the Google Groups "mongodb-user" group.
To post to this group, send email to mongod...@googlegroups.com.
To unsubscribe from this group, send email to mongodb-user...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/mongodb-user?hl=en.


sptrakesh

unread,
May 22, 2011, 6:38:51 PM5/22/11
to mongodb-user
The primary purpose in posting here was in the hope that MongoDB
developers may shed some light on the problem. To explain the
situation further (my original post was not very descriptive, sorry
for that), here are the details:

1) I can generate BSON data including dates on the iXxx device and
read them back later with no issues.
2) I get the error above when I am working with BSON data downloaded
from a web service. The service for this particular application just
maintains a BSON structure as its database without MongoDB in the
back. The BSON data is maintained using the MongoDB Java driver.
3) I have not had the requirement to send back BSON data to the server
yet, so am not sure if the Java library will throw exceptions when
attempting to parse dates generated on the device. I will need to
test this scenario as some time.
4) As mentioned in the original post, I can create or consume BSON
data with date fields with no issues on the iXxx simulator (the only
difference I can think of is the different CPU types, I don't think
they differ in endian'ness, but I may be mistaken).

Rakesh

Scott Hernandez

unread,
May 22, 2011, 6:45:01 PM5/22/11
to mongod...@googlegroups.com
If the java driver can read and write that bson data then the server should do just fine with it.

You will get more bson/mongodb developers eyes from the bson/mongo-dev groups. Since this is just bson related that is probably still the best place to discuss things. You may want to encode the same data on both devices and compare them for differences. Also, there is a bsondump test program that ships with mongodb which can also be used to test.


--

sptrakesh

unread,
May 23, 2011, 8:29:56 AM5/23/11
to mongodb-user
I did some testing, and the BSON generated from device or server were
identical. I found that on the device I have to use the date()
function and not Date() and everything works.
Reply all
Reply to author
Forward
0 new messages