Skip to content

Printing from QL-7xx and QL-8xx series printers causing app crashes on Samsung galaxy tab #126

Description

@joelsuite

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions