I’m connected to the server, When I join a group, I don’t have this exception.
But when I receive an invitation and I want to Join this group I have always this Exception.
the cause of probleme is the nulPointerException on PacketWriter.
there is the element who cause this exception: as you see, the id of received is empty
the crash appear on the class LazyStringBuilder.java
@Override
public int length() {
if (cache != null) {
return cache.length();
}
int length = 0;
for (CharSequence csq : list) {
if (csq != null) // to prevent the crash I added this Test
length += csq.length();
}
return length;
}
@Override
public char charAt(int index) {
if (cache != null) {
return cache.charAt(index);
}
for (CharSequence csq : list) {
if (csq != null) { // to prevent the crash I added this Test
Depends on which VM/runtime you use when executing Smack. For the standard (Oracle) JVM it’s usually -ea. LazyStringBuilder uses assertions, if you enable them, you will get an exception and a stacktrace when someone tries to insert an illegal value, i.e. ‘null’ into LazyStringBuilder.
Can you confirm that you don’t construct a DeliveryReceipt with ‘null’ as argument?
What you describe could happen if someone sends you a receipt request in a message stanza which does not have its ID set. This is illegal, but Smack should handle this case nevertheless.
Why we send receipt request for message without body like chatState, … ?
No particular reason, I guess the idea is that it’s better to request receipts for more messages then to less. We could filter for messages with a body too. It’s just that the current implementation doesn’t do it.
Thanks, where can I found the code source of that SNAPSHOT to integrate it in my project.
One more question: When I try to connect to the server (Case I’m of course connected), I have an exception and I can’t get the result of the function :
public AbstractXMPPConnection connect() throws SmackException, IOException, XMPPException
Why you implemented this Exception in case I’m already connected ?
Thanks, where can I found the code source of that SNAPSHOT to integrate it in my project.
In Maven Central’s snapshot repositories. The URL you have to add as repository to your build system is mentioned in Smack’s README.
One more question:
Please create a new thread for unrelated questions. I also don’t get the question, please try rewording it (and maybe exactly mention the exception you mean).