Hi,
there is a severe Db4o problem in Freetalk:
Instances of class Message can only be created with a non-null member
variable mAuthor. Further, mAuthor is final. So when receiving messages, the
mAuthor field is definitely non-null when the Message objects are stored in
the database.
HOWEVER, when retrieving the Message objects from the database, their
mAuthor field is null!
This also only happens on my normal node, if I run a node in the debugger,
it does not happen.
The worst thing is: The problem is NOT that the Message objects are not
fully activated.
The plugin does a query at startup to find messages with mAuthor == null by
doing:
Query q = db.query();
q.constrain(Message.class);
q.descend("mAuthor").constrain(null).identity();
ObjectSet<Message> brokenMessages = q.execute();
for(Message m : brokenMessages) {
Logger.error(m, "Deleting message with mAuthor == null: " +
m.getURI());
db.delete(m);
}
This query always deletes all messages. Therefore, the mAuthor member
variable is really null.
I do not have any clue why this happens.
The WoTIdentityManager definitely does db.store(), db.commit() on importet
identities.
And the message fetcher even receives the authors by a DATABASE QUERY, so
the authors ARE in the database, but the member field of the Messages gets
set to null! Damn...
Any ideas? This currently prevents Freetalk from being useable...
xor