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

BUG: 1.8.1.3 CRASH java.lang.NullPointerException: Attempt to invoke virtual method 'void com.example.iris.login1.UserInfo.setProfileIcon(java.lang.String)' on a null object reference #25

Open
JackMostow opened this issue Sep 30, 2022 · 7 comments
Assignees

Comments

@JackMostow
Copy link
Contributor

JackMostow commented Sep 30, 2022

CRASH_20220923_115336_6109000572_sw_1.8.1.3.txt:

and

CRASH_20220926_040653_6109000572_sw_1.8.1.3.txt

both have
java.lang.NullPointerException: Attempt to invoke virtual method 'void com.example.iris.login1.UserInfo.setProfileIcon(java.lang.String)' on a null object reference

--------- Stack trace ---------

com.example.iris.login1.GalleryActivity$20.onTouch(GalleryActivity.java:1914)
android.view.View.dispatchTouchEvent(View.java:11772)
com.example.iris.login1.GalleryActivity$4.run(GalleryActivity.java:1194)
android.os.Handler.handleCallback(Handler.java:790)
android.os.Handler.dispatchMessage(Handler.java:99)
android.os.Looper.loop(Looper.java:164)
android.app.ActivityThread.main(ActivityThread.java:6494)
java.lang.reflect.Method.invoke(Native Method)
com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:438)
com.android.internal.os.ZygoteInit.main(ZygoteInit.java:807)

@JackMostow
Copy link
Contributor Author

A simple null check might suffice to fix this bug, but first check to see if it would cause any other problems. Also, it would be better to find and fix what causes the bug to start with.

@rohankulkz
Copy link
Collaborator

Hi Professor,

I will take a look at it and let you know what I find.

Thanks

@madeleinvillegas
Copy link
Collaborator

Did this happen with or without students previously enrolled?

@JackMostow
Copy link
Contributor Author

@madeleinvillegas - Good question! Compare crash timestamps in facelogin_crashlogs to login timestamps in facelogin_logs.

CRASH_20220923_115336_6109000572_sw_1.8.1.3.txt
has the same timestamp as
LOG_20220923_115336_6109000572_sw_1.8.1.3.txt, which lists a user enrolled ~1 minute earlier, at 115256 (i.e. 11:52:56am) the same day who last logged in at 115335, with an immediate crash. (Birth Date a bit confusingly refers to the id, not the student.)

Tablet 572's last login before CRASH_20220926_040653_6109000572_sw_1.8.1.3.txt
was 4 hours earlier LOG_20220926_003027_6109000572_sw_1.8.1.3.txt
by a user enrolled 3 days earlier at 20220923_115256.

So in both cases, there were students previously enrolled. Thanks for asking!

@JackMostow
Copy link
Contributor Author

Options:
a. if icontext_enroll.getText().toString().trim() is null
don't call setProfileIcon -- just Log error with useful diagnostic information, e.g. context_enroll.getText(), ....toString ,....trim;
b. a but do rest
c. a but skip rest

What could cause null pointer? I.e. which values of ""?

Madelein [ ] Look at recent code changes to 8-18 rohan branch to file where crash occurred to see if any change monkeyed with implicated pointer and could have made it null

@JackMostow
Copy link
Contributor Author

@madeleinvillegas - Now 7 crashes are in facelogin_crashlogs
5 are 929 bytes, presumably all the same
2 are 399 bytes:
java.lang.IllegalArgumentException: The surface has been released

--------- Stack trace ---------

android.media.MediaPlayer._setVideoSurface(Native Method)
android.media.MediaPlayer.setDisplay(MediaPlayer.java:759)
com.example.iris.login1.PlayEnrollmentVideo.run(PlayEnrollmentVideo.java:47)

--------- Cause ---------


Sounds like a previous bug caused by disrespecting the protocol for process lifecycle -- create, initialize, etc.

@JackMostow
Copy link
Contributor Author

@rohankulkz @madeleinvillegas -- This bug appears 19 times out of 22 crashes in 2022 FaceLogin Crash. Has it been fixed under a different issue?

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

4 participants