Discussion:
[Bitpim-devel] Crash in EnsureBitPimSerials
Stephen Wood
2004-08-23 04:50:42 UTC
Permalink
I am getting the following assertiaon error on trying to read a
phonebook from a Sanyo phone as a MERGE.

An unexpected exception has occurred.
Please see the help for details on what to do.

Traceback (most recent call last):
File "/home/saw/BITPIM/bitpim/phonebook.py", line 634, in OnIdle
self.populatefs(self.getdata({}))
File "/home/saw/BITPIM/bitpim/phonebook.py", line 782, in getdata
self.EnsureBitPimSerials()
File "/home/saw/BITPIM/bitpim/phonebook.py", line 648, in
EnsureBitPimSerials
assert s["id"] not in d
AssertionError

This occurs after clicking the OK on the merge popup and seems to occur
if I have entries in the BitPim phonebook that were added by BitPim. I
don't get the error if I read into an empty phonebook. I don't get it
if I add one entry with BitPim, and then merge into the phonebook.
However, if I have a BitPim phonebook containing all the entries that
the phone has plus one entry added by BitPim, then I get the error.

The entry I added via bitpim does have an id in serials.

I am too tired to look further right now.

Stephen
Roger Binns
2004-08-23 05:19:55 UTC
Permalink
Post by Stephen Wood
This occurs after clicking the OK on the merge popup and seems to
occur if I have entries in the BitPim phonebook that were added by
BitPim. I don't get the error if I read into an empty phonebook. I
don't get it if I add one entry with BitPim, and then merge into the
phonebook. However, if I have a BitPim phonebook containing all the
entries that the phone has plus one entry added by BitPim, then I get
the error.
What exact steps do I need to take to reproduce this? I tried every
variation you have listed above without any problem.

Roger
Roger Binns
2004-08-23 05:42:34 UTC
Permalink
Post by Roger Binns
What exact steps do I need to take to reproduce this? I tried every
variation you have listed above without any problem.
The only thing I can see is if two different entries end
up with the same bitpim serial number id. Two different
random number generators are used, one when the program
is started and one when the function is entered.

The random number generators are seeded to the current
time when they were created.

A SHA-1 checksum is taken of the next floating point value
as text from both generators.

I thought I was being too paranoid.

I still can't see how two entries could end up with the
same bitpim serial. It would require an incredible
set of coincidences and a break of the SHA-1 algorithm!

I can't see any code changing or setting the "bitpim" serial
except in EnsureBitPimSerials.

Roger
Stephen Wood
2004-08-23 16:46:35 UTC
Permalink
I can't reproduce the problem using the official build.

I do get the exception that Steven reported when I click the 'Unaltered"
checkbox.

Stephen
Post by Roger Binns
Post by Stephen Wood
This occurs after clicking the OK on the merge popup and seems to
occur if I have entries in the BitPim phonebook that were added by
BitPim. I don't get the error if I read into an empty phonebook. I
don't get it if I add one entry with BitPim, and then merge into the
phonebook. However, if I have a BitPim phonebook containing all the
entries that the phone has plus one entry added by BitPim, then I get
the error.
What exact steps do I need to take to reproduce this? I tried every
variation you have listed above without any problem.
Roger
-------------------------------------------------------
SF.Net email is sponsored by Shop4tech.com-Lowest price on Blank Media
100pk Sonic DVD-R 4x for only $29 -100pk Sonic DVD+R for only $33
Save 50% off Retail on Ink & Toner - Free Shipping and Free Gift.
http://www.shop4tech.com/z/Inkjet_Cartridges/9_108_r285
_______________________________________________
Bitpim-devel mailing list
https://lists.sourceforge.net/lists/listinfo/bitpim-devel
Loading...