display.save <- My emulator / Phone hangs after execution HELP

This is the scenario, I have a game and when I reached at the game over screen play can share on facebook.

What I did is capture the screen ( The game over screen and post it to facebook ) and the photo was uploaded BUT my app hangs ( in my phone )

Here is the code for image upload along with captureScreen code

local overscreen = display.captureScreen(false)  
display.save( overscreen, "overscreen.jpg", system.ResourceDirectory )  
  
local msg = "Check this out! Wanna compete with me? download this game now! http://funkysquid.com"  
  
  
local attachment =   
{  
 message = msg,  
 source =   
 {  
 baseDir = system.ResourceDirectory,   
 filename = "overscreen.jpg",  
 type = "image"  
 }  
 }  
  
 facebook.request( "me/photos", "POST", attachment )  

and build.settings

-- Supported values for orientation:  
-- portrait, portraitUpsideDown, landscapeLeft, landscapeRight  
  
settings = {  
  
 orientation = {  
 default = "portrait",  
 supported = { "portrait", }  
 },  
  
 iphone = {  
 plist = {  
 UIApplicationExitOnSuspend = false,  
 UIAppFonts = { "White Rabbit.ttf"},  
 UIStatusBarHidden = false,  
 UIPrerenderedIcon = true, -- set to false for "shine" overlay  
 --UIApplicationExitsOnSuspend = true, -- uncomment to quit app on suspend  
  
 --[[  
 -- iOS app URL schemes:  
 CFBundleURLTypes =  
 {  
 {  
 CFBundleURLSchemes =  
 {  
 "fbxxxxxxxxxxx", -- example scheme for facebook  
 "coronasdkapp", -- example second scheme  
 }  
 }  
 }  
 --]]  
 }  
 },  
  
 androidPermissions = {  
 "android.permission.INTERNET",  
 "android.permission.READ\_PHONE\_STATE",  
 "android.permission.ACCESS\_NETWORK\_STATE",  
 "android.permission.WRITE\_EXTERNAL\_STORAGE"  
 },  
  
}  
  

Hope somebody could help me =) [import]uid: 225774 topic_id: 37244 reply_id: 67244[/import]

Fixed =)

display.captureScreen(false)   

^^^^^^^^^^^^^^^^^^^^^
overlays my current screen and causes my app to crash for some reason.

For anyone who have same problem. Just remove the obect who received display.captureScreen’s return value

removeSelf()
= nil

=) [import]uid: 225774 topic_id: 37244 reply_id: 145490[/import]

Fixed =)

display.captureScreen(false)   

^^^^^^^^^^^^^^^^^^^^^
overlays my current screen and causes my app to crash for some reason.

For anyone who have same problem. Just remove the obect who received display.captureScreen’s return value

removeSelf()
= nil

=) [import]uid: 225774 topic_id: 37244 reply_id: 145490[/import]