Android Question B4AGalleryview error

Discussion in 'Android Questions' started by grafsoft, Feb 1, 2015.

  1. grafsoft

    grafsoft Well-Known Member Licensed User

    Hi,

    on occasions, I get an error like this:

    ** Activity (galerie) Resume **
    java.lang.RuntimeException: An error occured while executing doInBackground()

    What might bbe the reason?

    Thank you

    Peter

    ** Activity (main) Create, isFirst = true **
    ** Activity (main) Resume **
    ** Activity (main) Pause, UserClosed = false **
    ** Activity (main) Create, isFirst = false **
    ** Activity (main) Resume **
    ** Activity (main) Pause, UserClosed = false **
    ** Activity (kamera) Create, isFirst = true **
    ** Activity (kamera) Resume **
    0
    [Height=720, IsInitialized=false, Width=1280
    ]
    ** Activity (kamera) Pause, UserClosed = false **
    ** Activity (draw) Create, isFirst = true **
    ** Activity (draw) Resume **
    ** Activity (draw) Pause, UserClosed = true **
    ** Activity (kamera) Resume **
    0
    [Height=720, IsInitialized=false, Width=1280
    ]
    ** Activity (kamera) Pause, UserClosed = false **
    ** Activity (draw) Create, isFirst = false **
    ** Activity (draw) Resume **
    ** Activity (draw) Pause, UserClosed = true **
    ** Activity (kamera) Resume **
    0
    [Height=720, IsInitialized=false, Width=1280
    ]
    ** Activity (kamera) Pause, UserClosed = false **
    ** Activity (draw) Create, isFirst = false **
    Downsampling image due to lack of memory.
    ** Activity (draw) Resume **
    ** Activity (draw) Pause, UserClosed = true **
    ** Activity (kamera) Resume **
    0
    [Height=720, IsInitialized=false, Width=1280
    ]
    ** Activity (kamera) Pause, UserClosed = false **
    ** Activity (draw) Create, isFirst = false **
    Downsampling image due to lack of memory.
    ** Activity (draw) Resume **
    ** Activity (draw) Pause, UserClosed = true **
    ** Activity (kamera) Resume **
    0
    [Height=720, IsInitialized=false, Width=1280
    ]
    ** Activity (kamera) Pause, UserClosed = true **
    ** Activity (main) Resume **
    ** Activity (main) Pause, UserClosed = false **
    ** Activity (main) Create, isFirst = false **
    ** Activity (main) Resume **
    ** Activity (main) Pause, UserClosed = false **
    ** Activity (main) Create, isFirst = false **
    ** Activity (main) Resume **
    ** Activity (main) Pause, UserClosed = false **
    ** Activity (main) Create, isFirst = false **
    ** Activity (main) Resume **
    ** Activity (main) Pause, UserClosed = false **
    ** Activity (main) Resume **
    Show popup
    Set Icon
    Set Icons visible
    Done
    Set Icon
    Set Icon
    Set Icon
    Set Icon
    Set Icon
    Set Icon
    Set Icon
    Set Icon
    ** Activity (main) Pause, UserClosed = false **
    ** Activity (synch) Create, isFirst = true **
    ** Activity (synch) Resume **
    ** Service (httputils2service) Create **
    ** Service (httputils2service) Start **
    data: photo 5e20afd2-1c2e-4c77-b8bd-b85e6d7cea69 48.1845752 16.35991726

    file 5e20afd2-1c2e-4c77-b8bd-b85e6d7cea69.jpg

    file 5e20afd2-1c2e-4c77-b8bd-b85e6d7cea69_S.jpg

    tag 1 0.922115921974182 0.337031900882721

    photo c891c77d-089c-422f-8b44-ceae497ca2d1 48.18361746 16.35797874

    file c891c77d-089c-422f-8b44-ceae497ca2d1.jpg

    file c891c77d-089c-422f-8b44-ceae497ca2d1_S.jpg

    tag 1 0.683511912822724 0.288488209247589

    tag 2 0.80125093460083 0.668515920639038

    photo 8c5f672c-6b4c-4ce3-8fe4-6a96c0e7b35a 48.18216075 16.34761524

    file 8c5f672c-6b4c-4ce3-8fe4-6a96c0e7b35a.jpg

    file 8c5f672c-6b4c-4ce3-8fe4-6a96c0e7b35a_S.jpg

    tag 1 0.552227556705475 0.187239944934845

    photo c16738a2-9ab6-4826-bdce-6e5660a39481 48.18848465 16.3438245

    file c16738a2-9ab6-4826-bdce-6e5660a39481.jpg

    photo 56c6d44e-080d-4443-a4a0-24a0a089cb0f 48.18864366 16.34485149

    file 56c6d44e-080d-4443-a4a0-24a0a089cb0f.jpg

    photo 35a45462-4163-4f3a-b175-da361d3bbe46 48.1897071 16.35163496

    file 35a45462-4163-4f3a-b175-da361d3bbe46.jpg

    photo 71409ef4-ab14-4e40-a9f5-6bfcb2481663 48.18982732 16.3519301

    file 71409ef4-ab14-4e40-a9f5-6bfcb2481663.jpg

    f=5e20afd2-1c2e-4c77-b8bd-b85e6d7cea69.jpg
    f=5e20afd2-1c2e-4c77-b8bd-b85e6d7cea69_S.jpg
    f=c891c77d-089c-422f-8b44-ceae497ca2d1.jpg
    f=c891c77d-089c-422f-8b44-ceae497ca2d1_S.jpg
    f=8c5f672c-6b4c-4ce3-8fe4-6a96c0e7b35a.jpg
    f=8c5f672c-6b4c-4ce3-8fe4-6a96c0e7b35a_S.jpg
    f=c16738a2-9ab6-4826-bdce-6e5660a39481.jpg
    f=56c6d44e-080d-4443-a4a0-24a0a089cb0f.jpg
    f=35a45462-4163-4f3a-b175-da361d3bbe46.jpg
    f=71409ef4-ab14-4e40-a9f5-6bfcb2481663.jpg
    s=http://www.grafsoft.at/a-tag/uploads/6_5e20afd2-1c2e-4c77-b8bd-b85e6d7cea69.jpg
    /
    s=http://www.grafsoft.at/a-tag/uploads/6_5e20afd2-1c2e-4c77-b8bd-b85e6d7cea69_S.jpg
    /
    s=http://www.grafsoft.at/a-tag/uploads/6_c891c77d-089c-422f-8b44-ceae497ca2d1.jpg
    /
    s=http://www.grafsoft.at/a-tag/uploads/6_c891c77d-089c-422f-8b44-ceae497ca2d1_S.jpg
    /
    s=http://www.grafsoft.at/a-tag/uploads/6_8c5f672c-6b4c-4ce3-8fe4-6a96c0e7b35a.jpg
    /
    s=http://www.grafsoft.at/a-tag/uploads/6_8c5f672c-6b4c-4ce3-8fe4-6a96c0e7b35a_S.jpg
    /
    s=http://www.grafsoft.at/a-tag/uploads/6_c16738a2-9ab6-4826-bdce-6e5660a39481.jpg
    /
    s=http://www.grafsoft.at/a-tag/uploads/6_56c6d44e-080d-4443-a4a0-24a0a089cb0f.jpg
    /
    s=http://www.grafsoft.at/a-tag/uploads/6_35a45462-4163-4f3a-b175-da361d3bbe46.jpg
    /
    s=http://www.grafsoft.at/a-tag/uploads/6_71409ef4-ab14-4e40-a9f5-6bfcb2481663.jpg
    /
    ** Activity (synch) Pause, UserClosed = true **
    ** Activity (main) Resume **
    ** Activity (main) Pause, UserClosed = false **
    ** Activity (main) Resume **
    Show popup
    Set Icon
    Set Icons visible
    Done
    Set Icon
    Set Icon
    Set Icon
    Set Icon
    Set Icon
    Set Icon
    Set Icon
    Set Icon
    ** Activity (main) Pause, UserClosed = false **
    ** Activity (galerie) Create, isFirst = true **
    select photoid from photos where projectnumber=6 order by aid
    ** Activity (galerie) Resume **
    ** Activity (galerie) Pause, UserClosed = false **
    ** Activity (galerie) Create, isFirst = false **
    select photoid from photos where projectnumber=6 order by aid
    ** Activity (galerie) Resume **
    ** Activity (galerie) Pause, UserClosed = false **
    ** Activity (galerie) Create, isFirst = false **
    select photoid from photos where projectnumber=6 order by aid
    ** Activity (galerie) Resume **
    java.lang.RuntimeException: An error occured while executing doInBackground()
    at android.os.AsyncTask$3.done(AsyncTask.java:300)
    at java.util.concurrent.FutureTask.finishCompletion(FutureTask.java:355)
    at java.util.concurrent.FutureTask.setException(FutureTask.java:222)
    at java.util.concurrent.FutureTask.run(FutureTask.java:242)
    at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:231)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
    at java.lang.Thread.run(Thread.java:841)
    Caused by: java.lang.OutOfMemoryError
    at android.graphics.Bitmap.nativeCreate(Native Method)
    at android.graphics.Bitmap.createBitmap(Bitmap.java:836)
    at android.graphics.Bitmap.createBitmap(Bitmap.java:813)
    at android.graphics.Bitmap.createBitmap(Bitmap.java:745)
    at android.graphics.Bitmap.createScaledBitmap(Bitmap.java:621)
    at it.giuseppe.salvi.downloader.PhotoGalleryDownloader.downloadBitmap(PhotoGalleryDownloader.java:268)
    at it.giuseppe.salvi.downloader.PhotoGalleryDownloader$BitmapDownloaderTask.doInBackground(PhotoGalleryDownloader.java:181)
    at it.giuseppe.salvi.downloader.PhotoGalleryDownloader$BitmapDownloaderTask.doInBackground(PhotoGalleryDownloader.java:1)
    at android.os.AsyncTask$2.call(AsyncTask.java:288)
    at java.util.concurrent.FutureTask.run(FutureTask.java:237)
    ... 4 more
    ** Activity (galerie) Pause, UserClosed = true **
    ** Activity (main) Resume **
     
  2. Erel

    Erel Administrator Staff Member Licensed User

    Your process is running out of available memory.

    Usually the solution is to use LoadBitmapSample to reduce the required memory. However as this issue happens inside the library (which I'm not really familiar with) you will need to look for a different solution.
     
    grafsoft likes this.
  3. grafsoft

    grafsoft Well-Known Member Licensed User

    I think I found it in the meantime: Gallery.CreateCache
    But thank you anyway. You always help, and fast, you are a HERO! This is what makes your tool not only good (which it is) but great!
     
Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice