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

Two activities with a same name can be created (also lead to a fatal crash) #261

Open
tingsu opened this issue Jan 21, 2019 · 6 comments
Open
Labels
Milestone

Comments

@tingsu
Copy link

tingsu commented Jan 21, 2019

App version: 1.4.0
Platform: Android 6.0 emulator

STR:

  1. fresh install the app and open the app
  2. click "+" on top to create a new activity
  3. Input "Test" and click the check symbol on the top
  4. long click the newly created activity "Test"
  5. click "delete"
  6. click "+" on top again
  7. input "Test" again and click the "recover" button, and click the check symbol on the top
  8. click "+" on top again, input "Test" again, and click the "rename" button, and click the check symbol on the top
  9. At this time we can see two "Test" activities are created with different color (maybe this is also a bug?)
  10. long click the first created "Test" activity, and delete it
  11. long click the second created "Test" activity, and edit it
  12. the app crashes
  • Reproducing video for Step 1 - 9

https://youtu.be/Zulg1XkXDls

  • Exception Trace:
FATAL EXCEPTION: main
Process: de.rampro.activitydiary, PID: 6662
java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.String de.rampro.activitydiary.model.DiaryActivity.getName()' on a null object reference
	at de.rampro.activitydiary.ui.generic.EditActivity$QHandler$3.onClick(EditActivity.java:202)
	at android.view.View.performClick(View.java:5198)
	at android.view.View$PerformClick.run(View.java:21147)
	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:5417)
	at java.lang.reflect.Method.invoke(Native Method)
	at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
@tingsu
Copy link
Author

tingsu commented Jan 26, 2019

Any update? Thanks a lot.

@ramack ramack added the bug label Jan 26, 2019
@ramack ramack added this to the v1.5.0 milestone Jan 26, 2019
@ramack
Copy link
Owner

ramack commented Jan 26, 2019

Thanks for the report. I have only quickly read at first, and as I saw you reporting for the Android Emulator, I did not put high priority on it, but I'll try to reproduce and take a closer look.

The main bug is in my eyes, that you seem to succeed to create two activities with the same name.

@tingsu
Copy link
Author

tingsu commented Nov 8, 2019

Hi @ramack, thanks for providing this nice and handy app. Can I know will this issue be fixed soon? It is a little wierd to be able to create two activities with same name.

@tingsu tingsu changed the title an NPE bug Two activities with a same name can be created Nov 8, 2019
@tingsu tingsu changed the title Two activities with a same name can be created Two activities with a same name can be created (also lead to a fatal crash) Nov 8, 2019
@ramack
Copy link
Owner

ramack commented Nov 8, 2019

The use case looks rather complicated, is that really so important for you? For sure it is a bug and it should be corrected, but it doesn't look critical to me. As I could not work for a long time on this app and some more important other issues are pending I don't want to promise anything here.
Except maybe that I will soon be more active here for this app!

@tingsu
Copy link
Author

tingsu commented Nov 8, 2019

Thanks for your reply! I just feel it would be better to fix this issue. I provided a reproducing video to ease the inspection and make the use case more clear (not very complicated:). I totally understand you are quite busy with other things. I know maintaining an app need a lot of time and efforts. Never mind. Thanks!

@ramack
Copy link
Owner

ramack commented Nov 8, 2019

your report is fully clear, I am just not confident that this happens very often, as most user won't create and delete an activity two times, but as said I agree that it should be fixed but probably more later than sooner :-)

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

No branches or pull requests

2 participants