cmeng-git/atalk-android

the user account fails to show contacts after re login in version 2.3.2

ashfik2000 opened this issue · 2 comments

when adding a new user account the login process succeeds in the first time and contacts are shown but in case of closing aTalk and trying to re login again the user is connected but no contacts are shown.

image

the error is:
2020-07-27 10:41:41.830 8408-8476/org.atalk.android E/(EventDispatcher.java:95)#run: Error dispatching event
java.lang.NullPointerException: Attempt to invoke virtual method
'net.java.sip.communicator.service.contactlist.MetaContactGroup net.java.sip.communicator.impl.contactlist.MetaContactGroupImpl.getMetaContactSubgroupByUID(java.lang.String)' on a null object reference
at
net.java.sip.communicator.impl.contactlist.MetaContactListServiceImpl.loadStoredMetaContactGroup(MetaContactListServiceImpl.java:2255)
at net.java.sip.communicator.impl.contactlist.MclStorageManager.processGroupContact(MclStorageManager.java:155)
at net.java.sip.communicator.impl.contactlist.MclStorageManager.extractContactsForAccount(MclStorageManager.java:104)
at net.java.sip.communicator.impl.contactlist.MetaContactListServiceImpl.handleProviderAdded(MetaContactListServiceImpl.java:1402)
at net.java.sip.communicator.impl.contactlist.MetaContactListServiceImpl.serviceChanged(MetaContactListServiceImpl.java:1685)
at org.atalk.impl.osgi.framework.launch.EventDispatcher$Command.run(EventDispatcher.java:92)
at org.atalk.impl.osgi.framework.AsyncExecutor.runInThread(AsyncExecutor.java:100)
at org.atalk.impl.osgi.framework.AsyncExecutor.access$000(AsyncExecutor.java:18)
at org.atalk.impl.osgi.framework.AsyncExecutor$1.run(AsyncExecutor.java:194)

Please send me the full debug log. You have omitted some important info including the initial login info.

It seems that the problem arises due to aTalk database is corrupted or not being saved properly in last login.
Not sure how this has happen.
Since you have installed the debug version, you can break at MCIStorageManager line #149 to see what are the values retrieved from the database.
You also can export the SQL database and see what are the contents in Table "metaContactGroup",
The table must contain the first item with (mcGroupUid == RootMetaContactGroup).
Also the table entries should not have any null except the last column (see attached snapshot).

You may have to reinstalled aTalk to get it to work again.

Screenshot from 2020-07-27 19-58-25

Sorry, you are correct on the observed problem for v2.3.2.
When I removed the old unused classes in v2.3.2 , I accidentally removed the routine to initalize the metaContactGroup very first entry.

Just release v2.3.3. to resolve the problem. Please verify.