[Mono-bugs] [Bug 765237] New: MonoDroid App crashes on Camera Intent open

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Sun Jun 3 13:33:34 UTC 2012


https://bugzilla.novell.com/show_bug.cgi?id=765237

https://bugzilla.novell.com/show_bug.cgi?id=765237#c0


           Summary: MonoDroid App crashes on Camera Intent open
    Classification: Mono
           Product: MonoDroid
           Version: unspecified
          Platform: Other
        OS/Version: All
            Status: NEW
          Severity: Major
          Priority: P5 - None
         Component: Tools
        AssignedTo: mono-bugs at lists.ximian.com
        ReportedBy: mp3killa at gmail.com
         QAContact: mono-bugs at lists.ximian.com
          Found By: ---
           Blocker: ---


Created an attachment (id=493406)
 --> (http://bugzilla.novell.com/attachment.cgi?id=493406)
Code snippet of issue

User-Agent:       Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/536.5 (KHTML,
like Gecko) Chrome/19.0.1084.52 Safari/536.5

The issue I've now been struggling with seems to be getting worse, I
dynamically create an ImageButton - set it's bitmap if applicable and allow
user to click ImageButton to re-capture image if need be by using the Camera
Intent.

If I click the ImageButton very first time the Camera Intent launches perfectly
and I can take the picture and OnActivityResult I set the ImageButton URI to
the Image just taken. The ImageButton gets disposed of after I click a "Next"
button which performs some more dynamic screen layout stuff. Later on the
ImageButton gets re-created again in the same Activity/Screen and when I click
it again, the  Camera Intent opens however the application bombs out. No
seemingly useful debug output is presented to help trace where I'm going
wrong... If I am... This was working perfectly prior to the latest upgrade to
4.2.2 

To make matters even more confusing I uninstalled 4.2.2 and reverted to 4.0.1 -
 Same thing occurred -  I then re-installed 4.2.2 again. This just seemed to
make the issue happen more frequently and even less easy to understand why; as
it would then happen randomly on the first time the ImageButton was created and
I clicked on it. I've googled all I can, tried only creating the ImageButton
once and keeping it in memory I've tried removing the Event Handler after the
ImageButton is used just incase it was triggering the event twice. I've tried
setting the Activity flag of the Camera Intent to "SingleTop" & "NoHistory" to
no avail. I've tried everything I can think of :-)

I don't know if this is something to do with my implementation or something to
do with MonoDroid, the fact that it was working before and now all of a sudden
not, leads me to believe it's your fault :-) I'd be happy to here it's mine and
how to remedy!

Tried this on Sony Xperia Arc, Samsung Galaxy Y, Samsung Galaxy Note. All same
result.

Reproducible: Always

Steps to Reproduce:
1. Dynamically create ImageButton.
2. Draw Bitmap to ImageButton from sqlLite if exists
3. Re-take photo using Camera Intent
4. New image to replace old one on ImageButton
5. Click another button which clears the screen and draws something else,
button,radio's etc...
6. Click that other button again to recreate ImageButton use same EventHandler
as before.
7. Draw Bitmap to ImageButton from sqlLite if exists
8. Click the ImageButton
9. Camera Intent opens (sometimes can take image then app crashes - rarely)
10. VS 2012 debugging disconnects and app exists/crashes
Actual Results:  
VS 2012 debugging disconnects and app exists/crashes

Expected Results:  
VS 2012 debugging remains and app doesn't crash.

06-03 15:38:59.174 D/dalvikvm(30484): GC_CONCURRENT freed 27K, 47% free
2854K/5379K, external 2857K/3568K, paused 2ms+4ms
06-03 15:39:03.234 D/OnCreate(30484): here
06-03 15:39:08.164 I/dalvikvm(30484): Total arena pages for JIT: 11
06-03 15:39:23.414 D/dalvikvm(30484): GC_CONCURRENT freed 580K, 49% free
3198K/6215K, external 2889K/3559K, paused 3ms+2ms
06-03 15:39:31.804 D/dalvikvm(30484): GC_CONCURRENT freed 171K, 45% free
3642K/6599K, external 6774K/8459K, paused 7ms+13ms
06-03 15:39:33.854 D/imgPhoto_Click(30484): my URI:
file:///mnt/sdcard/129832043737844540.jpg
06-03 15:39:33.864 D/imgPhoto_Click(30484): About to launch camera intent
06-03 15:39:33.884 D/imgPhoto_Click(30484): Completed launch of camera intent
06-03 15:39:37.944 W/IInputConnectionWrapper(30484): showStatusIcon on inactive
InputConnection
06-03 15:39:43.684 D/OnActivityResult(30484): my URI:
file:///mnt/sdcard/129832043737844540.jpg
06-03 15:39:43.854 D/dalvikvm(30484): GC_CONCURRENT freed 404K, 51% free
3286K/6599K, external 14577K/16625K, paused 3ms+14ms
06-03 15:39:54.134 D/dalvikvm(30484): GC_EXPLICIT freed 535K, 55% free
3015K/6599K, external 14577K/16625K, paused 27ms
06-03 15:39:54.134 I/monodroid-gc(30484): GC cleanup summary: 390 objects
tested - resurrecting 88.
06-03 15:40:18.374 D/imgPhoto_Click(30484): my URI:
file:///mnt/sdcard/129832044183759150.jpg
06-03 15:40:18.374 D/imgPhoto_Click(30484): About to launch camera intent
06-03 15:40:18.404 D/imgPhoto_Click(30484): Completed launch of camera intent
The program 'Mono' has exited with code 255 (0xff).

-- 
Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.


More information about the mono-bugs mailing list