Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NullPointerException #99

Open
18122570206 opened this issue Apr 13, 2018 · 1 comment
Open

NullPointerException #99

18122570206 opened this issue Apr 13, 2018 · 1 comment

Comments

@18122570206
Copy link

Error log:
java.lang.NullPointerException: Attempt to invoke virtual method 'int org.fusesource.hawtbuf.DataByteArrayOutputStream.size()' on a null object reference
at org.fusesource.hawtdispatch.transport.AbstractProtocolCodec.write(AbstractProtocolCodec.java:140)
at org.fusesource.hawtdispatch.transport.TcpTransport.offer(TcpTransport.java:653)
at org.fusesource.mqtt.client.CallbackConnection.send(CallbackConnection.java:728)
at org.fusesource.mqtt.client.CallbackConnection.send(CallbackConnection.java:714)
at org.fusesource.mqtt.client.CallbackConnection.publish(CallbackConnection.java:660)
at org.fusesource.mqtt.client.CallbackConnection.publish(CallbackConnection.java:649)
at cn.startrails.boom.mqtt.MqttUtils.publish(MqttUtils.java:132)
at cn.startrails.boom.MainActivity$2.onProgressChanged(MainActivity.java:203)
at android.widget.SeekBar.onProgressRefresh(SeekBar.java:93)
at android.widget.ProgressBar.doRefreshProgress(ProgressBar.java:1327)
at android.widget.ProgressBar.refreshProgress(ProgressBar.java:1382)
at android.widget.ProgressBar.setProgressInternal(ProgressBar.java:1447)
at android.widget.AbsSeekBar.trackTouchEvent(AbsSeekBar.java:850)
at android.widget.AbsSeekBar.onTouchEvent(AbsSeekBar.java:760)
at android.view.View.dispatchTouchEvent(View.java:9958)
at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2671)
at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2358)
at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2693)
at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2358)
at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2671)
at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2358)
at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2671)
at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2358)
at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2671)
at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2358)
at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2671)
at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2358)
at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2671)
at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2358)
at com.android.internal.policy.DecorView.superDispatchTouchEvent(DecorView.java:414)
at com.android.internal.policy.PhoneWindow.superDispatchTouchEvent(PhoneWindow.java:1810)
at android.app.Activity.dispatchTouchEvent(Activity.java:3196)
at android.support.v7.view.WindowCallbackWrapper.dispatchTouchEvent(WindowCallbackWrapper.java:68)
at com.android.internal.policy.DecorView.dispatchTouchEvent(DecorView.java:376)
at android.view.View.dispatchPointerEvent(View.java:10180)
at android.view.ViewRootImpl$ViewPostImeInputStage.processPointerEvent(ViewRootImpl.java:4496)
at android.view.ViewRootImpl$ViewPostImeInputStage.onProcess(ViewRootImpl.java:4361)
at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:3901)
at android.view.ViewRootImpl$InputStage.onDeliverToNext(ViewRootImpl.java:3954)
at android.view.ViewRootImpl$InputStage.forward(ViewRootImpl.java:3920)
at android.view.ViewRootImpl$AsyncInputStage.forward(ViewRootImpl.java:4047)
at android.view.ViewRootImpl$InputStage.apply(ViewRootImpl.java:3928)
at android.view.ViewRootImpl$AsyncInputStage.apply(ViewRootImpl.java:4104)
at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:3901)
at android.view.ViewRootImpl$InputStage.onDeliverToNext(ViewRootImpl.java:3954)
at android.view.ViewRootImpl$InputStage.forward(ViewRootImpl.java:3920)
at android.view.ViewRootImpl$InputStage.apply(ViewRootImpl.java:3928)
at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:3901)
at android.view.ViewRootImpl.deliverInputEvent(ViewRootImpl.java:6272)
at android.view.ViewRootImpl.doProcessInputEvents(ViewRootImpl.java:6246)
04-12 18:45:42.984 6055-6055/cn.startrails.boom E/AndroidRuntime: at android.view.ViewRootImpl.enqueueInputEvent(ViewRootImpl.java:6207)
at android.view.ViewRootImpl$WindowInputEventReceiver.onInputEvent(ViewRootImpl.java:6378)
at android.view.InputEventReceiver.dispatchInputEvent(InputEventReceiver.java:187)
at android.view.InputEventReceiver.nativeConsumeBatchedInputEvents(Native Method)
at android.view.InputEventReceiver.consumeBatchedInputEvents(InputEventReceiver.java:176)
at android.view.ViewRootImpl.doConsumeBatchedInput(ViewRootImpl.java:6346)
at android.view.ViewRootImpl$ConsumeBatchedInputRunnable.run(ViewRootImpl.java:6401)
at android.view.Choreographer$CallbackRecord.run(Choreographer.java:873)
at android.view.Choreographer.doCallbacks(Choreographer.java:685)
at android.view.Choreographer.doFrame(Choreographer.java:615)
at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:859)
at android.os.Handler.handleCallback(Handler.java:754)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:163)
at android.app.ActivityThread.main(ActivityThread.java:6343)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:880)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:770)

keyCode:
byte[] b1 = {(byte) 0xFE, (byte) 0xEF, (byte) 0x01, (byte) youMenSx, (byte) youMenZy};
MqttUtils.getMqttUtils().publish("xjkj/9148659/to", b1, QoS.AT_MOST_ONCE, false);

public void publish(String topic, byte[] payload,
QoS qoS, boolean retain) {
if (callbackConnection != null) {
callbackConnection.publish(topic, payload, qoS, retain, this);
}
}

@jrobe
Copy link

jrobe commented Jun 1, 2018

I get the same thing, but only if I'm repeatedly sending messages, very quickly. Is that the same thing you're doing? If so, it's likely a multithreading issue.

Additionally, considering this repo looks like it's no longer supported, I'm likely going to be moving to a different framework regardless.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants