Context
For some of our users, printing over both bluetooth and wifi from Samsung galaxy tablets using QL series printers sometimes causes a fatal exception resulting in an app crash. This crash occurs when printPdfFile is called on the Printer object. The exception thrown is a NullPointerException. The cause appears to vary. The following are two examples:
Example 1
Model: SM-T500
NullPointerException
Attempt to invoke virtual method 'boolean java.net.Socket.isConnected()' on a null object reference
Stacktrace:
com.brother.ptouch.sdk.connection.WifiConnection:101 in startConnection
com.brother.ptouch.sdk.connection.WifiConnection:7 in open
com.brother.ptouch.sdk.Printer:85 in init
com.brother.ptouch.sdk.Printer:96 in printPdfPage
com.brother.ptouch.sdk.Printer:6 in printPdfFile
J2.E0:149 in j
t3.a:9 in resumeWith
K3.D:115 in run
J1.i0:196 in run
R3.k:3 in run
R3.b:94 in run
Example 2:
Model: SM-X200
NullPointerException
Attempt to invoke virtual method 'java.io.OutputStream android.bluetooth.BluetoothSocket.getOutputStream()' on a null object reference
Stacktace:
com.brother.ptouch.sdk.connection.BluetoothConnection:26 in getStream
com.brother.ptouch.sdk.connection.BluetoothConnection:41 in open
com.brother.ptouch.sdk.Printer:85 in init
com.brother.ptouch.sdk.Printer:96 in printPdfPage
com.brother.ptouch.sdk.Printer:6 in printPdfFile
J2.E0:149 in j
t3.a:9 in resumeWith
K3.D:115 in run
J1.i0:196 in run
R3.k:3 in run
R3.b:94 in run
I'm unsure how much of these stacktraces are useful, but they shows the errors originating inside the Brother ptouch library.
We could be implementing the another brother package in a way that is causing this, but without an error message that is meaningful for us it's hard to debug this.
Context
For some of our users, printing over both bluetooth and wifi from Samsung galaxy tablets using QL series printers sometimes causes a fatal exception resulting in an app crash. This crash occurs when
printPdfFileis called on thePrinterobject. The exception thrown is aNullPointerException. The cause appears to vary. The following are two examples:Example 1
Model:
SM-T500Stacktrace:
Example 2:
Model:
SM-X200Stacktace:
I'm unsure how much of these stacktraces are useful, but they shows the errors originating inside the Brother ptouch library.
We could be implementing the another brother package in a way that is causing this, but without an error message that is meaningful for us it's hard to debug this.