Android Question who tell me about this error?

hf

Member
Licensed User
java.lang.NullPointerException: Attempt to read from field 'anywheresoftware.b4a.objects.ActivityWrapper b4a.smqy.smqy._activity' on a null object reference
at b4a.smqy.smqy$ResumeMessage.run(smqy.java:302)
at android.os.Handler.handleCallback(Handler.java:739)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:148)
at android.app.ActivityThread.main(ActivityThread.java:5441)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:738)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:628)
 

Cableguy

Expert
Licensed User
Longtime User
It seems you are trying to access something not yet initialized
 
Upvote 0

DonManfred

Expert
Licensed User
Longtime User
Please use code tags when posting code!
 
Upvote 0

hf

Member
Licensed User
just on debug, occur error.
on realease, b4a log such as :

PackageAdded: package:b4a.smqy
*** Service (starter) Create ***
** Service (starter) Start **
** Activity (main) Create, isFirst = true **
** Activity (main) Resume **
** Activity (main) Pause, UserClosed = true **
** Activity (login) Create, isFirst = true **
** Activity (login) Resume **
** Activity (login) Pause, UserClosed = true **
** Activity (hfxf) Create, isFirst = true **
** Activity (hfxf) Resume **
** Activity (hfxf) Pause, UserClosed = false **
** Activity (smqy) Create, isFirst = true **
** Activity (smqy) Resume **
** Activity (smqy) Pause, UserClosed = false **
Portrait
Screen 1080 1920
CODE_39:D2017082900024###myzx_result
sending message to waiting queue (OnActivityResult)
running waiting messages (1)
** Activity (smqy) Resume **
** Activity (smqy) Pause, UserClosed = false **
Portrait
CODE_39:D2017082900024###myzx_result
sending message to waiting queue (OnActivityResult)
running waiting messages (1)
** Activity (smqy) Resume **
** Activity (smqy) Pause, UserClosed = false **
Portrait
CODE_39:D2017082900024###myzx_result
sending message to waiting queue (OnActivityResult)
running waiting messages (1)
** Activity (smqy) Resume **
** Activity (smqy) Pause, UserClosed = false **
Portrait
CODE_39:D2017082900024###myzx_result
sending message to waiting queue (OnActivityResult)
running waiting messages (1)
** Activity (smqy) Resume **
** Activity (smqy) Pause, UserClosed = false **
Portrait
CODE_39:D2017082900028###myzx_result
*** Service (starter) Create ***
** Service (starter) Start **
** Activity (hfxf) Create, isFirst = true **
** Activity (hfxf) Resume **

the red part, is error ,should "sending message to waiting queue (OnActivityResult) running waiting messages (1)..."
 
Upvote 0

hf

Member
Licensed User
this is source code
 

Attachments

  • Screenshot_2017-08-03-14-13-57-786_b4a.smqy.png
    Screenshot_2017-08-03-14-13-57-786_b4a.smqy.png
    118.5 KB · Views: 199
  • smqy.bas
    6.5 KB · Views: 252
  • smqy.bal
    9.2 KB · Views: 177
Upvote 0

hf

Member
Licensed User
Please use File - Export as zip to create a zip with all required files.

Note that you should create a single Beeper object and reuse it or call Beeper.Release when you are done with it.


I think the error is "JhsIceZxing lib scanbarcode have bug, it scan result wrong when it scan long time"
 
Upvote 0

hf

Member
Licensed User
Please use File - Export as zip to create a zip with all required files.

Note that you should create a single Beeper object and reuse it or call Beeper.Release when you are done with it.


you can scan the barcode of the picture
QQ图片20170830222302.png
,then the error occur, so the lib " JhsIceZxing1" have bugs,can you solve? help me?
C:\Users\Administrator\Documents\Tencent Files\16605146\Image\C2C\_B_`ZEZ]KJ[$Y~]2Q6@D4C1.png
 
Upvote 0

hf

Member
Licensed User
Only the library developer can help you if there is a bug inside the library. However there are several other barcode libraries available...


thanks, I find this lib is well for me, but have bugs. other barcode libraries ? can you give me a list of other barcode libraries ? I try to use it.
 
Upvote 0
Top