no no, my problem is strange..

First, i've a gridview.. ok.. i can print lot of pics (the only problem is, when i print very very lot of pics, GREF 2001.. so ok). When i click on the firts pic for example, i Finish my gridview, GC.Collect, and begin a Gallery! The problem is here, after very few pics printed.. very strange. (crash after ten pics only, and i've not 20 or 30 Mo in memory! I destroy precedents view, and, do a SetImageDrawable(Drawable.CreateFromPath(internal_path_of_pic_who_is_downloaded))

see the log (in the new example, crash with 672 Ko, each pic a size maximum size of 150 Ko):


04-12 20:15:46.037 I/ActivityManager( 53): Starting activity: Intent { cmp=ProgramM.ProgramM/Programm.GalleryImages } 04-12 20:15:46.207 D/dalvikvm( 893): GC freed 604 objects / 458064 bytes in 69ms 04-12 20:15:46.227 I/monodroid-gc( 893): GC cleanup summary: 158 objects tested - resurrecting 48. 04-12 20:15:46.587 I/mono-stdout( 893): 12/04/2012 20:15:46:590 : -- position 0 / 295810 04-12 20:15:46.668 I/mono-stdout( 893): 12/04/2012 20:15:46:676 : -->gallery try to download img 295810 http://www.mydomain.com/img_2012/04/12/preview/1334250404_96468.jpg 04-12 20:15:47.036 I/ActivityManager( 53): Displayed activity ProgramM.ProgramM/Programm.GalleryImages: 756 ms (total 756 ms) 04-12 20:15:47.057 I/mono-stdout( 893): 12/04/2012 20:15:47:60 : Destroy GridViewH 04-12 20:15:47.187 D/dalvikvm( 893): GC freed 584 objects / 25992 bytes in 59ms 04-12 20:15:47.197 I/monodroid-gc( 893): GC cleanup summary: 60 objects tested - resurrecting 54. 04-12 20:15:47.237 W/ActivityManager( 53): Duplicate finish request for HistoryRecord{45da96e0 ProgramM.ProgramM/Programm.GrilleImages} 04-12 20:15:47.387 I/mono-stdout( 893): 12/04/2012 20:15:47:387 : --> Print image 295810 04-12 20:15:47.517 D/dalvikvm( 893): GC freed 148 objects / 6608 bytes in 128ms 04-12 20:15:47.677 I/mono-stdout( 893): 12/04/2012 20:15:47:683 : --> Print image 295810 04-12 20:15:47.757 D/dalvikvm( 893): GC freed 74 objects / 36792 bytes in 63ms 04-12 20:15:47.927 I/mono-stdout( 893): 12/04/2012 20:15:47:931 : Pointe du Groin vers St Malo ->gallery cache existe for 295810 _Program_2012_04_12_preview_1334250404_96468.jpg 04-12 20:15:48.537 D/dalvikvm( 893): GC freed 192 objects / 107144 bytes in 71ms 04-12 20:15:48.666 I/mono-stdout( 893): 12/04/2012 20:15:48:672 : ->gallery setimagedrawable 295810 04-12 20:15:57.546 I/mono-stdout( 893): 12/04/2012 20:15:57:546 : Gesture - SHOW PRESS - 04-12 20:15:57.746 I/mono-stdout( 893): 12/04/2012 20:15:57:751 : -- position 1 / 295797 04-12 20:15:57.777 I/mono-stdout( 893): 12/04/2012 20:15:57:783 : -->gallery try to download img 295797 http://www.mydomain.com/img_2012/04/12/preview/1334245437_79158.jpg 04-12 20:15:58.797 I/mono-stdout( 893): 12/04/2012 20:15:58:800 : --> Print image 295797 04-12 20:15:58.946 I/mono-stdout( 893): 12/04/2012 20:15:58:951 : --> Print image 295797 04-12 20:15:59.018 D/dalvikvm( 893): GC freed 140 objects / 75448 bytes in 59ms 04-12 20:15:59.136 I/mono-stdout( 893): 12/04/2012 20:15:59:144 : After the Rain ->gallery cache existe for 295797 _Program_2012_04_12_preview_1334245437_79158.jpg 04-12 20:15:59.698 I/mono-stdout( 893): 12/04/2012 20:15:59:704 : ->gallery setimagedrawable 295797 04-12 20:16:02.388 I/mono-stdout( 893): 12/04/2012 20:16:02:385 : -- position 2 / 295654 04-12 20:16:02.427 I/mono-stdout( 893): 12/04/2012 20:16:02:415 : -->gallery try to download img 295654 http://www.mydomain.com/img_2012/04/11/preview/1334154494_24279.jpg 04-12 20:16:03.777 I/mono-stdout( 893): 12/04/2012 20:16:03:783 : --> Print image 295654 04-12 20:16:03.917 D/dalvikvm( 893): GC freed 303 objects / 150952 bytes in 132ms 04-12 20:16:04.067 I/mono-stdout( 893): 12/04/2012 20:16:04:67 : --> Print image 295654 04-12 20:16:04.187 I/mono-stdout( 893): 12/04/2012 20:16:04:194 : ->gallery cache existe for 295654 _Program_2012_04_11_preview_1334154494_24279.jpg 04-12 20:16:04.697 D/dalvikvm( 893): GC freed 217 objects / 144400 bytes in 60ms 04-12 20:16:04.826 I/mono-stdout( 893): 12/04/2012 20:16:04:827 : ->gallery setimagedrawable 295654 04-12 20:16:10.287 I/mono-stdout( 893): 12/04/2012 20:16:10:290 : -- position 3 / 295520 04-12 20:16:10.346 I/mono-stdout( 893): 12/04/2012 20:16:10:348 : -->gallery try to download img 295520 http://www.mydomain.com/img_2012/04/09/preview/1333998888_84134.jpg 04-12 20:16:12.366 I/mono-stdout( 893): 12/04/2012 20:16:12:370 : --> Print image 295520 04-12 20:16:12.467 I/mono-stdout( 893): 12/04/2012 20:16:12:467 : --> Print image 295520 04-12 20:16:12.587 I/mono-stdout( 893): 12/04/2012 20:16:12:590 : Cosmic Owl ->gallery cache existe for 295520 _Program_2012_04_09_preview_1333998888_84134.jpg 04-12 20:16:14.647 I/mono-stdout( 893): 12/04/2012 20:16:14:647 : -- position 4 / 295519 04-12 20:16:14.658 I/mono-stdout( 893): 12/04/2012 20:16:14:661 : -->gallery try to download img 295519 http://www.mydomain.com/img_2012/04/09/preview/1333992708_74151.jpg 04-12 20:16:15.966 I/mono-stdout( 893): 12/04/2012 20:16:15:975 : --> Print image 295519 04-12 20:16:16.106 D/dalvikvm( 893): GC freed 380 objects / 161656 bytes in 130ms
04-12 20:16:16.147 D/dalvikvm(  893): GREF has increased to 501
04-12 20:16:16.217 I/mono-stdout( 893): 12/04/2012 20:16:16:218 : --> Print image 295519 04-12 20:16:16.317 I/mono-stdout( 893): 12/04/2012 20:16:16:323 : Voyage au coeur de la pensée.... ->gallery cache existe for 295519 _Program_2012_04_09_preview_1333992708_74151.jpg 04-12 20:16:19.407 I/mono-stdout( 893): 12/04/2012 20:16:19:410 : -- position 5 / 295406 04-12 20:16:19.447 I/mono-stdout( 893): 12/04/2012 20:16:19:452 : -->gallery try to download img 295406 http://www.mydomain.com/img_2012/04/09/preview/1333965532_76992.jpg 04-12 20:16:20.947 I/mono-stdout( 893): 12/04/2012 20:16:20:955 : --> Print image 295406 04-12 20:16:21.068 I/mono-stdout( 893): 12/04/2012 20:16:21:69 : --> Print image 295406 04-12 20:16:21.138 D/dalvikvm( 893): GC freed 330 objects / 160656 bytes in 64ms 04-12 20:16:21.246 I/mono-stdout( 893): 12/04/2012 20:16:21:247 : Naruto contre sasuke, l'histoire du destin ->gallery cache existe for 295406 _Program_2012_04_09_preview_1333965532_76992.jpg 04-12 20:16:23.277 I/mono-stdout( 893): 12/04/2012 20:16:23:272 : -- position 6 / 295072 04-12 20:16:23.317 I/mono-stdout( 893): 12/04/2012 20:16:23:323 : -->gallery try to download img 295072 http://img2.Program.com/Program_2012/04/07/preview/1333775638_44842.jpg 04-12 20:16:24.316 I/mono-stdout( 893): 12/04/2012 20:16:24:319 : --> Print image 295072 04-12 20:16:24.427 I/mono-stdout( 893): 12/04/2012 20:16:24:434 : --> Print image 295072 04-12 20:16:24.526 I/mono-stdout( 893): 12/04/2012 20:16:24:528 : SAKURA ->gallery cache existe for 295072 _Program_2012_04_07_preview_1333775638_44842.jpg
04-12 20:16:24.617 D/dalvikvm(  893): GREF has increased to 601
04-12 20:16:27.017 I/mono-stdout( 893): 12/04/2012 20:16:27:18 : -- position 7 / 294940 04-12 20:16:27.036 I/mono-stdout( 893): 12/04/2012 20:16:27:41 : -->gallery try to download img 294940 http://img2.Program.com/Program_2012/04/06/preview/1333662743_1485.jpg 04-12 20:16:28.407 I/mono-stdout( 893): 12/04/2012 20:16:28:408 : --> Print image 294940 04-12 20:16:28.477 D/dalvikvm( 893): GC freed 492 objects / 202680 bytes in 68ms 04-12 20:16:28.576 I/mono-stdout( 893): 12/04/2012 20:16:28:586 : voitures miniatures ->gallery cache existe for 294940 _Program_2012_04_06_preview_1333662743_1485.jpg 04-12 20:16:28.727 I/mono-stdout( 893): 12/04/2012 20:16:28:724 : --> Print image 294940 04-12 20:16:28.926 I/mono-stdout( 893): 12/04/2012 20:16:28:933 : ->gallery setimagedrawable 294940 04-12 20:16:30.276 I/mono-stdout( 893): 12/04/2012 20:16:30:279 : -- position 8 / 294926 04-12 20:16:30.287 I/mono-stdout( 893): 12/04/2012 20:16:30:289 : -->gallery try to download img 294926 http://img2.Program.com/Program_2012/04/05/preview/1333655163_55099.jpg 04-12 20:16:31.287 I/mono-stdout( 893): 12/04/2012 20:16:31:291 : --> Print image 294926 04-12 20:16:31.367 D/dalvikvm( 893): GC freed 286 objects / 151152 bytes in 73ms 04-12 20:16:31.476 I/mono-stdout( 893): 12/04/2012 20:16:31:481 : Chateau de Montjuc (Barcelone) - TILT-SHIFT ->gallery cache existe for 294926 _Program_2012_04_05_preview_1333655163_55099.jpg 04-12 20:16:31.618 I/mono-stdout( 893): 12/04/2012 20:16:31:617 : --> Print image 294926 04-12 20:16:31.817 I/mono-stdout( 893): 12/04/2012 20:16:31:818 : ->gallery setimagedrawable 294926 04-12 20:16:34.298 I/mono-stdout( 893): 12/04/2012 20:16:34:305 : -- position 9 / 294872 04-12 20:16:34.317 I/mono-stdout( 893): 12/04/2012 20:16:34:321 : -->gallery try to download img 294872 http://img2.Program.com/Program_2012/04/05/preview/1333644853_49045.jpg
04-12 20:16:34.902 D/dalvikvm(  893): GREF has increased to 701
04-12 20:16:35.276 I/mono-stdout( 893): 12/04/2012 20:16:35:281 : --> Print image 294872 04-12 20:16:35.349 D/dalvikvm( 893): GC freed 299 objects / 151456 bytes in 67ms 04-12 20:16:35.486 I/mono-stdout( 893): 12/04/2012 20:16:35:490 : ->gallery cache existe for 294872 _Program_2012_04_05_preview_1333644853_49045.jpg 04-12 20:16:35.666 I/mono-stdout( 893): 12/04/2012 20:16:35:667 : --> Print image 294872 04-12 20:16:35.867 D/dalvikvm( 893): GC freed 172 objects / 106344 bytes in 73ms 04-12 20:16:36.006 I/mono-stdout( 893): 12/04/2012 20:16:36:5 : ->gallery setimagedrawable 294872 04-12 20:16:37.817 I/mono-stdout( 893): 12/04/2012 20:16:37:822 : -- position 10 / 294748 04-12 20:16:37.847 I/mono-stdout( 893): 12/04/2012 20:16:37:849 : -->gallery try to download img 294748 http://img2.Program.com/Program_2012/04/04/preview/1333554005_68676.jpg 04-12 20:16:39.307 I/mono-stdout( 893): 12/04/2012 20:16:39:309 : --> Print image 294748 04-12 20:16:39.457 I/mono-stdout( 893): 12/04/2012 20:16:39:457 : Taxi Jaune N-Y ->gallery cache existe for 294748 _Program_2012_04_04_preview_1333554005_68676.jpg 04-12 20:16:39.637 I/mono-stdout( 893): 12/04/2012 20:16:39:637 : --> Print image 294748 04-12 20:16:39.776 E/dalvikvm-heap( 893): 672000-byte external allocation too large for this process.
04-12 20:16:39.776 E/        (  893): VM won't let us allocate 672000 bytes
04-12 20:16:39.776 D/skia    (  893): --- decoder->decode returned false
04-12 20:16:39.896 I/MonoDroid( 893): UNHANDLED EXCEPTION: Java.Lang.OutOfMemoryError: Exception of type 'Java.Lang.OutOfMemoryError' was thrown.
04-12 20:16:39.937 E/mono    (  893):
04-12 20:16:39.937 E/mono ( 893): Unhandled Exception: Java.Lang.OutOfMemoryError: Exception of type 'Java.Lang.OutOfMemoryError' was thrown.
04-12 20:16:40.077 D/Zygote  (   30): Process 893 exited cleanly (1)
04-12 20:16:40.077 I/ActivityManager( 53): Process ProgramM.ProgramM (pid 893) has died. 04-12 20:16:40.087 I/WindowManager( 53): WIN DEATH: Window{45e219d8 ProgramM.ProgramM/Programm.GalleryImages paused=false} 04-12 20:16:40.156 I/UsageStats( 53): Unexpected resume of com.android.launcher while already resumed in ProgramM.ProgramM 04-12 20:16:40.198 W/InputManagerService( 53): Got RemoteException sending setActive(false) notification to pid 893 uid 10030



Le 12/04/2012 18:48, Jonathan Pryor a écrit :
On Apr 12, 2012, at 12:24 PM, michelw wrote:
04-12 16:22:13.907 E/dalvikvm-heap(  800): 843000-byte external allocation too 
large for this process.
04-12 16:22:13.907 E/        (  800): VM won't let us allocate 843000 bytes

My VM crash with pic>= ~ 850 Ko only.....
You need to also know how much has been previously allocated, e.g. a preceding 
GC_EXTERNAL_ALLOC message. If you're just under the limit, a 1 byte allocation 
can still fail.

Even with 850KB allocations, you can only allocate ~37 images before you're out 
of memory.

How many images are you trying to show at once? Is this bounded in any way? If 
using an Adapter, is Adapter.GetView() reusing the convertView? If the View 
contains an image, are you disposing of the image before updating it with a new 
image?

Thanks,
  - Jon

_______________________________________________
Monodroid mailing list
[email protected]

UNSUBSCRIBE INFORMATION:
http://lists.ximian.com/mailman/listinfo/monodroid
_______________________________________________
Monodroid mailing list
[email protected]

UNSUBSCRIBE INFORMATION:
http://lists.ximian.com/mailman/listinfo/monodroid

Reply via email to