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

App Crashes On Clicking the Filter Icon #1120

Closed
codedsun opened this Issue Sep 12, 2017 · 19 comments

Comments

5 participants
@codedsun
Contributor

codedsun commented Sep 12, 2017

Actual Behaviour

The App Crashes while Clicking on the filter icon while using the front camera

Expected Behaviour
It should work fine and should apply filters

Steps to reproduce it
Open the app ,toggle to the front camera ,Click on the filter icon on the left hand side.

LogCat for the issue

09-12 23:39:11.337 18526-18526/org.fossasia.phimpme E/AndroidRuntime: FATAL EXCEPTION: main
Process: org.fossasia.phimpme, PID: 18526
java.lang.NullPointerException: Attempt to invoke interface method 'int java.util.List.size()' on a null object reference
at org.fossasia.phimpme.opencamera.Preview.Preview$6.onClick(Preview.java:1396)
at android.view.View.performClick(View.java:4761)
at android.view.View$PerformClick.run(View.java:19767)
at android.os.Handler.handleCallback(Handler.java:739)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:135)
at android.app.ActivityThread.main(ActivityThread.java:5312)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:901)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:696)

Screenshots of the issue

Would you like to work on the issue?

YES!

@sridharjajoo

This comment has been minimized.

Show comment
Hide comment
@sridharjajoo

sridharjajoo Sep 12, 2017

Contributor

@codedsun Which android version are you using ?

Contributor

sridharjajoo commented Sep 12, 2017

@codedsun Which android version are you using ?

@codedsun

This comment has been minimized.

Show comment
Hide comment
@codedsun

codedsun Sep 12, 2017

Contributor

@sridharjajoo Android 5.0.2,API21

Contributor

codedsun commented Sep 12, 2017

@sridharjajoo Android 5.0.2,API21

@sridharjajoo

This comment has been minimized.

Show comment
Hide comment
@sridharjajoo

sridharjajoo Sep 12, 2017

Contributor

I tried it on my android device but it is working fine . I am using Android 5.1.1 API 22

Contributor

sridharjajoo commented Sep 12, 2017

I tried it on my android device but it is working fine . I am using Android 5.1.1 API 22

@codedsun

This comment has been minimized.

Show comment
Hide comment
@codedsun

codedsun Sep 12, 2017

Contributor

@sridharjajoo I am using MotoE (2nd generation) device with android 5.0.2..It still crashes

Contributor

codedsun commented Sep 12, 2017

@sridharjajoo I am using MotoE (2nd generation) device with android 5.0.2..It still crashes

@Siddharth-Singhs

This comment has been minimized.

Show comment
Hide comment
@Siddharth-Singhs

Siddharth-Singhs Sep 13, 2017

Member

it crashes when we try to change the filter continuously.

Member

Siddharth-Singhs commented Sep 13, 2017

it crashes when we try to change the filter continuously.

@codedsun

This comment has been minimized.

Show comment
Hide comment
@codedsun

codedsun Sep 13, 2017

Contributor

@Siddharth-Singhs But for the app on my phone it's still crashing on clicking the filter icon? so is this an issue or not?

Contributor

codedsun commented Sep 13, 2017

@Siddharth-Singhs But for the app on my phone it's still crashing on clicking the filter icon? so is this an issue or not?

@NamanRawat1

This comment has been minimized.

Show comment
Hide comment
@NamanRawat1

NamanRawat1 Sep 13, 2017

Contributor

Use try-catch in part of the program which shows runtime error.It fixes your problem. @codedsun

Contributor

NamanRawat1 commented Sep 13, 2017

Use try-catch in part of the program which shows runtime error.It fixes your problem. @codedsun

@codedsun

This comment has been minimized.

Show comment
Hide comment
@codedsun

codedsun Sep 13, 2017

Contributor

@NamanRawat1 I think it will be problem for all the people using the same code !though it will work on my pc if I use the try-catch

Contributor

codedsun commented Sep 13, 2017

@NamanRawat1 I think it will be problem for all the people using the same code !though it will work on my pc if I use the try-catch

@NamanRawat1

This comment has been minimized.

Show comment
Hide comment
@NamanRawat1

NamanRawat1 Sep 13, 2017

Contributor

You can make a PR after testing. @codedsun

Contributor

NamanRawat1 commented Sep 13, 2017

You can make a PR after testing. @codedsun

@codedsun

This comment has been minimized.

Show comment
Hide comment
@codedsun

codedsun Sep 13, 2017

Contributor

@NamanRawat1 let the mentors comment so that I can test and fix the issue .

Contributor

codedsun commented Sep 13, 2017

@NamanRawat1 let the mentors comment so that I can test and fix the issue .

@codedsun

This comment has been minimized.

Show comment
Hide comment
@codedsun

codedsun Sep 13, 2017

Contributor

@mohitmanuja kindly review this too.

Contributor

codedsun commented Sep 13, 2017

@mohitmanuja kindly review this too.

@mohitmanuja

This comment has been minimized.

Show comment
Hide comment
@mohitmanuja

mohitmanuja Sep 13, 2017

Contributor

Okay. Add null check in list and proceed.

Contributor

mohitmanuja commented Sep 13, 2017

Okay. Add null check in list and proceed.

@codedsun

This comment has been minimized.

Show comment
Hide comment
@codedsun

codedsun Sep 13, 2017

Contributor

@mohitmanuja shall I go on with try/catch because if statement chck will cause further crash as colorEffect list is accesed later within same block?

Contributor

codedsun commented Sep 13, 2017

@mohitmanuja shall I go on with try/catch because if statement chck will cause further crash as colorEffect list is accesed later within same block?

@mohitmanuja

This comment has been minimized.

Show comment
Hide comment
@mohitmanuja

mohitmanuja Sep 13, 2017

Contributor

Ok.

Contributor

mohitmanuja commented Sep 13, 2017

Ok.

@codedsun

This comment has been minimized.

Show comment
Hide comment
@codedsun

codedsun Sep 13, 2017

Contributor

what should be shown while catching the exception? any log or something else ! @mohitmanuja

Contributor

codedsun commented Sep 13, 2017

what should be shown while catching the exception? any log or something else ! @mohitmanuja

@mohitmanuja

This comment has been minimized.

Show comment
Hide comment
@mohitmanuja

mohitmanuja Sep 13, 2017

Contributor

Toast msg with log will be good.

Contributor

mohitmanuja commented Sep 13, 2017

Toast msg with log will be good.

@codedsun

This comment has been minimized.

Show comment
Hide comment
@codedsun

codedsun Sep 13, 2017

Contributor

Can u guide me the content to be shown ..sorry for that but I m a noob or it will be great if we could connect on gitter.

Contributor

codedsun commented Sep 13, 2017

Can u guide me the content to be shown ..sorry for that but I m a noob or it will be great if we could connect on gitter.

@mohitmanuja

This comment has been minimized.

Show comment
Hide comment
@mohitmanuja

mohitmanuja Sep 13, 2017

Contributor

Yes sure. You can display message like "Your device does not support any filters."

Contributor

mohitmanuja commented Sep 13, 2017

Yes sure. You can display message like "Your device does not support any filters."

@codedsun

This comment has been minimized.

Show comment
Hide comment
@codedsun

codedsun Sep 13, 2017

Contributor

@mohitmanuja done fixed the issue ! It would be great if you guide me regarding submitting the PR as I am a newbie.

Contributor

codedsun commented Sep 13, 2017

@mohitmanuja done fixed the issue ! It would be great if you guide me regarding submitting the PR as I am a newbie.

codedsun added a commit to codedsun/phimpme-android that referenced this issue Sep 13, 2017

@the-dagger the-dagger closed this in #1131 Sep 15, 2017

the-dagger added a commit that referenced this issue Sep 15, 2017

Merge pull request #1131 from codedsun/crashfixed
Fix #1120 App Crash On Clicking Filter Icon

sauravvishal8797 added a commit to sauravvishal8797/phimpme-android that referenced this issue Nov 28, 2017

Anshpuri added a commit to Anshpuri/phimpme-android that referenced this issue Dec 5, 2017

Navd15 added a commit to Navd15/phimpme-android that referenced this issue Feb 18, 2018

Navd15 added a commit to Navd15/phimpme-android that referenced this issue Feb 22, 2018

the-Alchemister added a commit to the-Alchemister/phimpme-android that referenced this issue Mar 4, 2018

sauravvishal8797 added a commit to sauravvishal8797/phimpme-android that referenced this issue Jun 3, 2018

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