Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Native Development

Reply
Trusted Contributor
JohnWS
Posts: 115
Registered: ‎02-08-2013
My Carrier: verizon

QSSLSocket differences between 10.1 and 10.2

Hi,

 

Can anybody offer advice as to why my XMPP chat app connected using QSSLSocket would stop receiving data from the stream without reporting any state changes or any disconnection signals being emitted - I only detect this loss because I don't get a ping reply or a message when one should be received.

 

This only happens using a device running 10.1 - a device running 10.2 doesn't have this problem - the connection is stable. I am building with 10.0.1.

 

I could do with knowing if this is a known problem or a problem with my application that I can do something about.

 

Thank you.

Please use plain text.
Contributor
davidadams22
Posts: 12
Registered: ‎08-12-2013
My Carrier: Vodafone

Re: QSSLSocket differences between 10.1 and 10.2

[ Edited ]

deleted

Please use plain text.
Trusted Contributor
JohnWS
Posts: 115
Registered: ‎02-08-2013
My Carrier: verizon

Re: QSSLSocket differences between 10.1 and 10.2

Please can somebody help me a little, I have an app that works fine on my Q10 running os 10.2 and yesterday I upgraded my sdk to 10.1 and 10.2 and updated my device os to 10.2 on my Z10 but the same problem existed, only on Z10 though.

 

I will outline the workings of the app and see if the way I've gone about things could be the cause of the problem.

 

I start a seperate thread which creates the connection to the xmpp server and authenticates with the server, gets presence updates and then goes into a while loop which calls waitForReadReady(10000) and then reads data from the socket if it returns true, checks if any data to send and then goes back to calling waitForReadReady(10000).

 

This loop is where it breaks down sometimes on my Z10 only. When a message or presence update comes in i emit a signal from the thread which my main thread is handling to show the updates on the GUI. With the Z10 the loop will just continue returning false even though there is data (messages) being sent to it and also if i try to send a message the server won't receive it. I could disconnect at this point and reconnect and everything will work again, even on the Z10.

 

In my loop when the network operation times out (when waitForReadReady(10000) returns false), I am checking the socket to see if it is connected and isValid and both return true and I am not getting any statechanged signals or disconnection signals.

 

From the start of developing this app I had a problem with the QSSLSocket in that I had to call waitForConnected, waitForEncrytped and waitForReadyRead for the signal to fire appropriately. Is this incorrect?

 

There is a lot of work at stake here and to throw it away when it works perfectly on one device and not on another without a reason is heartbreaking.

 

Any ideas whatsoever giving a possible reason for this problem are appreciated.

Please use plain text.
Contributor
davidadams22
Posts: 12
Registered: ‎08-12-2013
My Carrier: Vodafone

Re: QSSLSocket differences between 10.1 and 10.2

[ Edited ]

deleted - posted using old profile.

Please use plain text.
Trusted Contributor
JohnWS
Posts: 115
Registered: ‎02-08-2013
My Carrier: verizon

Re: QSSLSocket differences between 10.1 and 10.2

more information to report in case anybody is able to help - I have eliminated the use threads and created my socket in the main thread and QSSLSocket signals are firing ok now, the loss of communiction without disconnect or error signal firing problem is still occuring though on the Z10 even after trying different api levels and updating device os to the very latest available 10.2.xxx and removing the use of any Qthread.

 

I have just inserted a sim card into the Z10 to try the mobile network and this problem isn't occuring when connected via 3G but it occurs when using wifi connection with Z10 even though the Q10 connects fine to the XMPP server using the same wifi connection.

 

Also I have used wireshark to see if data was still being received even though not reported and it is - there is data coming but no report of data and no data gets sent.

 

Also, I have a ping system setup and when this timesout and disconnects the socket to reconnect the disconnect signal is firing just fine so it doesn't seem to be a problem with signals/slots.

 

What on earth could be causing this problem? Tcp is meant to be reliable especially on wifi but it doesn't seem to be on Z10.

 

 

Please use plain text.