Uploaded image for project: 'Android Client'
  1. Android Client
  2. AC-71

NullPointerException when patient have no address.

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Blocker
    • Resolution: Fixed
    • Affects Version/s: 2.1
    • Fix Version/s: 2.1
    • Labels:
    • Complexity:
      Undetermined
    • Sprint:
      AC Sprint 6

      Description

      REPRO
      1. create patient with empty address field
      2. find this patient by Find Patients
      3. check to download
      4. stacktrace appears
      Stacktrace
      11-03 13:31:10.434  10969-10969/org.openmrs.client E/OpenMRS﹕ #46 OpenMRSLogger$1.uncaughtException() : Uncaught exception is:
          java.lang.NullPointerException
                  at org.openmrs.client.databases.DBOpenHelper.insertPatient(DBOpenHelper.java:103)
                  at org.openmrs.client.databases.tables.PatientTable.insert(PatientTable.java:89)
                  at org.openmrs.client.dao.PatientDAO.savePatient(PatientDAO.java:33)
                  at org.openmrs.client.adapters.PatientArrayAdapter$2.onClick(PatientArrayAdapter.java:123)
                  at android.view.View.performClick(View.java:4438)
                  at android.widget.CompoundButton.performClick(CompoundButton.java:100)
                  at android.view.View$PerformClick.run(View.java:18422)
                  at android.os.Handler.handleCallback(Handler.java:733)
                  at android.os.Handler.dispatchMessage(Handler.java:95)
                  at android.os.Looper.loop(Looper.java:136)
                  at android.app.ActivityThread.main(ActivityThread.java:5001)
                  at java.lang.reflect.Method.invokeNative(Native Method)
                  at java.lang.reflect.Method.invoke(Method.java:515)
                  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:785)
                  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:601)
                  at dalvik.system.NativeStart.main(Native Method)
      

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

                Assignee:
                ehaligowska Emilia Haligowska
                Reporter:
                kkalfas Kamil Kalfas
                Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                  Dates

                  Created:
                  Updated:
                  Resolved:

                    Time Tracking

                    Estimated:
                    Original Estimate - 1 day
                    1d
                    Remaining:
                    Time Spent - 5 hours Remaining Estimate - 3 hours
                    3h
                    Logged:
                    Time Spent - 5 hours Remaining Estimate - 3 hours
                    5h