How Can I Avoid Crashing on Pressing Backbutton?

Customized hardware backbutton crashed in C++, but OK in C#:
//in the constructor
Windows::Phone::UI::Input::HardwareButtons::BackPressed += ref new Windows::Foundation::EventHandler<Windows::Phone::UI::Input::BackPressedEventArgs ^>(this, &AppExit::MainPage::OnBackPressed);
//Handler
void AppExit::MainPage::OnBackPressed(Object^ sender, Windows::Phone::UI::Input::BackPressedEventArgs^ e)
Windows::UI::Xaml::Controls::Frame^ frame = safe_cast<Windows::UI::Xaml::Controls::Frame^> (Window::Current->Content);
if (frame == nullptr)
return;
if (frame->CanGoBack)
frame->GoBack();
e->Handled = true;
Exception:
First-chance exception at 0x77AD210B in AppExit.exe: Microsoft C++ exception: Platform::DisconnectedException ^ at memory location 0x0124ECCC. HRESULT:0x80010108 The object invoked has disconnected from its clients.
WinRT information: The object invoked has disconnected from its clients.
Stack trace:
[External Code]
CoreUIComponents.dll!767de357()
CoreUIComponents.dll!767dd6b5()
CoreUIComponents.dll!767da92d()
CoreUIComponents.dll!7678c446()
CoreUIComponents.dll!767626f4()
CoreUIComponents.dll!767d2443()
CoreUIComponents.dll!767b735b()
CoreUIComponents.dll!767ae183()
CoreUIComponents.dll!767acd00()
CoreUIComponents.dll!767a752c()
CoreUIComponents.dll!767ab703()
CoreUIComponents.dll!7679dfc5()
CoreUIComponents.dll!7676576f()
[External Code]
But it works well in C#:
//constructor
Windows.Phone.UI.Input.HardwareButtons.BackPressed += HardwareButtons_BackPressed;
//handler
private void HardwareButtons_BackPressed(object sender, Windows.Phone.UI.Input.BackPressedEventArgs e)
Frame frame = Window.Current.Content as Frame;
if (frame == null)
return;
if (frame.CanGoBack)
frame.GoBack();
e.Handled = true;
Can I avoid this crash?

Hi Sal,
I've tested it and I can see the first-chance exception thrown, but the error message does not look same:
First-chance exception at 0x77776FB2 in App44.exe: Microsoft C++ exception: Cn::XH at memory location 0x018AF218.
First-chance exception at 0x77776FB2 in App44.exe: Microsoft C++ exception: Cn::XH at memory location 0x018AE350.
First-chance exception at 0x77776FB2 in App44.exe: Microsoft C++ exception: Cn::XH at memory location 0x018AE350.
First-chance exception at 0x77776FB2 in App44.exe: Microsoft C++ exception: Cn::XH at memory location 0x018AE350.
Actually we don't need to care about first chance exception, here is a blog:
http://blogs.msdn.com/b/davidklinems/archive/2005/07/12/438061.aspx even its long time ago but still helpful:
Does a first chance exception mean there is a problem in my code?
First chance exception messages most often do not mean there is a problem in the code. For applications / components which handle exceptions gracefully, first chance exception messages let the developer know that an exceptional situation was encountered
and was handled.
--James
We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
Click
HERE to participate the survey.

Similar Messages

  • How can I avoid crash of my iphone 5.

    How can I avoid crash of my iphone 5.

    You swipe left to right on the song, press the red delete button.
    If that does not work, turn off iTunes Match and try again.

  • How can I avoid crashes of elements 9

    How can I resolve crashes of Elements 9? All software updates are current.

    Thanks you
    See, whenever it crashes, you must be getting a crash report, right after the crash. Can you please copy paste the detailed contents of the crash somewhere here? A look into the crash logs will tell us where the crash is happening.
    Also, you didn't tell whether the crash is happening for Editor module or Organizer module?
    Has it always been like this.. crashing?? A third party s/w is often responsible for such crashes, so any updates there?
    Thanks
    Andaleeb

  • Iphone4  when im talking to someone i always press the mute button how can i avoid this?

    While on the phone i always press the mute or hold button while talking to someone how can i avoid this its driving me crazy so i end up just using speaker phone

    If you have a case on the phone, take it off. It may be interfering with the proximity sensor.  If you have a screen protector, take it off. It may be interfering with the proximity sensor.  Make sure you actually old the phone against your ear. if you hold it away from your ear, the proximity sensor may not be able to tell that you have it up to your face.

  • How can I avoid duplicates on contacts and how do I get contacts created on iPhone/ipad synchronized on my mac? so far it doesn't work correctly, just sometimes. same for icalendar

    how can I avoid duplicates on contacts and how do I get contacts created on iPhone/ipad synchronized on my mac? so far it doesn't work correctly, just sometimes. same for icalendar

    On your Mac, for duplicates, switching Contacts off then back on in System Preferences > iCloud may prevent duplicates.
    On the iPhone / iPad tap Settings > iCloud. Make sure Contacts and Calendars are swtiched on.
    Try restarting your Mac and your iOS devices when items won't sync as they should.
    To restart an iOS device:  Hold the On/Off Sleep/Wake button down until the red slider appears. Slide your finger across the slider to turn off iPhone. To turn iPhone back on, press and hold the On/Off Sleep/Wake button until the Apple logo appears.

  • How can i avoid iPad?

    How can i avoid iPad 1 crashes?

    What are you doing when the iPad crashes?
    What version of iOS are you running on the iPad?
    If there is an error message, what is the exact wording?
    What troubleshooting have you done? What were the results?

  • How can I avoid browser timeout when starting a Plsql procedure from Apex?

    I start a procedure when pressing a button in my Application Express form.
    This procedure take a while to run (about 10 min.)
    How can I avoid the browser to timeout with Error Code 1460: Timeout ?
    Is it possible to return to a page and let the procedure finish in the background. Or is it possible to get the Apex application sendig a message once in a while to keep the browser active?
    Thanks in advance.
    Evelyn

    In HTML DB 1.6, you could create page processes that would run as background jobs.
    Since 2.0, you can't directly select that option, but there's a work-around that may still work:
    Re: PLSQL DBMS JOB - Process Type

  • How can I avoid referencing nilvce.dll

    Dear all
    When I build an application from my project LabView asks for nilvce.dll. As this DLL is not installed on the computer I press ignore item and LV goes on build the application. Finally the execute is successfully build and I can execute it. How can I avoid referencing nilvce.dll?
    But I observe that this executable is consuming almost all processor power while waiting for GUI-events. This does not occur in the development system and there is no wait missing in any of the loops in the program. Occationally the program hangs while executing Enqueue Element At Opposite End.VI from the Queues palette.
    Is there a link between these topic and referencing nilvce.dll?
    Regards,
    Jörn
    P.S.: I am working with LabView 8.6.1f1
    Message Edited by Jörn on 2009-11-10 10.11.2009 11:17 AM

    Hi muks,
    you could have known from this threat that your tip does not exactly meet the point. nilvce.dll does not exist. But it is referenced by some elements. I suspect that these elements might cause my other problem. And furthermore building the executable and running it (up to some point) works without having this DLL on my computer. So would like to gather some information about the objects referencing nilvce.dll in the hope that I can remove them to get rid of my second problem.
    Regards,
    Jörn

  • How can I avoid music playback stopping when starting an App

    Whenever I listen to music on my iPAD3 and switch from the build in original musicplayer to any App, the music stops to play.
    I need to go to the taskbar and go to the very left to press the play button again.
    That helps me to use the App choosen before and listen to the music.
    If I open another App or switch there with "sideswapping", music stops again.
    How can I avoid this ?

    Revit must be using the discrete graphics and possibly a fair amount of cpu as well.  This has nothing to do with memory or memory allocation (which you can't do on a mac since it doesn't use shared memory like some low-end PCs do.  Getting hot is not a problem as long as the fans speed up to increase the cooling.  If the system is overheating, it will shut down on its own.

  • Whenever I start my mac some application like word, speech recognizer automatically open...how can I avoid that?

    Whenever I start my mac some application like word, speech recognizer automatically open...how can I avoid that?

    Dealing With The Resume Feature of Lion
    Managing Mac OS X Lion's application resume feature.
    If you shutdown your computer you should get a dialog asking if you want applications to resume on the next startup. Simply uncheck the box to prevent that from occurring. Open General preferences and uncheck the option to Restore windows when quitting and re-opening apps. You can also install a third-party utility to control resume features on individual applications: RestoreMeNot or Application State Cleaner.
    It is possible to completely stop the Resume feature although I'm unconvinced that it is that annoying. Nevertheless see the following:
    If you have not yet done so you must first make your /Home/Library/ folder visible. Open the Terminal application in the Utilities folder. At the prompt paste the following command line:
    chflags nohidden ~/Library
    Press RETURN. Quit the Terminal application.
    In the Finder navigate to the /Home/Library/Saved Application State/ folder. Delete the contents of the folder. Back up to the /Home/Library/ folder. Select the Saved Application State folder. Press COMMAND-I to open the Get Info window. In the Sharing and Permissions panel at the bottom click on the lock icon and authenticate. Set each of the listed entries to Read Only. Close the Get Info window.
    Quit all open programs except the Finder (this is very important.) Next, navigate to the /Home/Library/Preferences/ByHost/ folder. Look for a .plist file with "com.apple.loginwindow." in the file name followed by some numbers in hexadecimal. Select the file. Press COMMAND-I to open the Get Info window and in the Sharing and Permissions panel click on the lock icon and authenticate. Set each of the listed entries to Read Only. Close the Get Info window. If you also find a file with the same filename but with a last extension of ".lockfile," then you should delete it.
    The above should eliminate the Resume feature system-wide. Note that any future system updates or upgrades will likely undo these changes. You will then need to repeat this procedure assuming there are no major changes in OS X related to it.

  • Hi. I purchased a new ipad mini and my brother already has iphone 4,so how can i avoid sharing the same contents that are on his phone? Will creating an other apple id help us in seperating our facetime and icloud accounts as we share our laptop to sync ?

    Hi. I purchased a new ipad mini and my brother already has iphone 4,so how can i avoid sharing the same contents that are on his phone? Will creating an other apple id help us in seperating our facetime and icloud accounts as we share our laptop to sync ?

    Have a read here...
    https://discussions.apple.com/message/18409815?ac_cid=ha
    And See Here...
    How to Use Multiple iDevices with One Computer

  • How can i avoid restarting tomcat server when servlet is modified?

    please advice me that how can i avoid restarting the tomcat server, whenever a servlet file is modified in my application. is their any way ?

    No probs. Here's how I do things...
    1. Install tomcat as normal (e.g. I install to C:\Apps\jakarta-tomcat-5.5.4)
    2. Create a webapps directory in your eclipse project with the following directory structure
    MyEclipseProject
       - src
       - conf
       - webapps
          - MyApplication
             - META-INF
             - WEB-INF
                - classes
                - lib
                - pages3. Set the project's output folder (e.g. bin folder) to webapps/MyApplication/WEB-INF/classes
    4. Put all your jar files in the lib directory
    5. Put JSPs / HTML in the pages directory (you may also want to create additional directories for TLDs, config files etc)
    6. Ensure your web.xml is in the WEB-INF directory
    7. Although it isn't essential I create a context.xml file and store it in META-INF, e.g.
    <Context reloadable="true">
        <!-- Default set of monitored resources -->
         <WatchedResource>WEB-INF/web.xml</WatchedResource>
         <WatchedResource>WEB-INF/conf/struts/struts-config.xml</WatchedResource>
         <WatchedResource>WEB-INF/conf/struts/tiles-defs.xml</WatchedResource>
         <WatchedResource>WEB-INF/conf/struts/validation.xml</WatchedResource>     
    </Context>I use this to set monitored resources that will trigger an automatic appliation reload and to configure JAAS (not shown). See the Tomcat documentation for additional information.
    8. In the 'conf' directory I create a server.xml file used to configure Tomcat (you can copy the one from your <TOMCAT_HOME>/conf/server.xml).
    After copying the file change appBase attribute in the host element to be the full path to the webapps directory. You can also change the HTTP and HTTPS ports if you wish
    9. Download and install the Tomcat Launcher plugin from Sysdeo.
    10. In Eclipse's Preferences menu you will see a new entry for Tomcat. Click this then
    a. Set your Tomcat Version
    b. Set your Tomcat Home
    c. Set "Context declaration mode" to server.xml
    d. Set the configuration file to the full path to your server.xml file created in step 8
    On the "Advanced " sub page select all relevant projects to add to the Tomcat classpath
    On the "JVM Settings" page add all the jars in your WEB-INF lib directory to the class path
    On the "Source Path" page select all relevant projects
    Now if you start Tomcat using the Tomcat icon, you will be able to remote debug your application. If you change web.xml (or any other file in your context.xml watched resources) it will automatically reload. Any changes to JSPs will automatically be picked up (providing your tell your browser not to use the page in cache - e.g. CTRL+F5 in IE)
    There are some limitations that I'm still working on however. Primarily that I haven't included the Tomcat Manager application in my webapps directory, so Sysdeo cannot perform a reload. This means that if I change a source file, and eclipse auotmatically rebuilds, Tomcat doesn't pick up the change unless I either change a watched resource file (e.g. web.xml) or stop and restart Tomcat.
    There's no reason why this can't be fixed, I just haven't got round to it yet.
    I'm sure there are lots of other (probably better) ways of achieving the same thing. This was the first method I tried and it worked, so I stuck with it. I'm not a Tomcat config guru and I'm sure other forum users could provide some improvements should they wish.
    Post if you get into trouble, however I won't be able to respond until next week.
    Cheers,
    Steve

  • I have made a book of my I Photo pictures. In certain layouts there is a textframe. How can I avoid the frame becoming visible in the print if I don't want to write anything? Should I just leave it or should I delete the text "Write your text here" ?

    I have made a book of my iPhoto pictures. In certain layouts there is a text frame. How can I avoid the frame becoming visible in the print if I don't want to write anything?  Should I just leave it untouched or should I delete the instructing text "Write your text here"?

    Most pages have layouts for pictures only or pictures with text boxes. Either select the same layout for that page but the one without the text box or put a space in the text box.
    Putting a space in the text box will avoid getting the warning when ordering that there's an unfilled text box in the book. The box will not be visible in the final product.  You can and should check the book before ordering by previewing it as described in this Apple document: iPhoto '11: Preview a book, card, or calendar before you order or print it
    Happy Holidays

  • How can I avoid (on a mac) getting called on Skype...

    How can I avoid (on a mac) getting called on Skype when I'm not signed in?
    It's really annoying.
    I'm not sure if it's supposed to be that way, but suddenly I get the skype-calling-sound, and I have to log into the skype app to abort the call. The persistent calling bastards kept on calling after I aborted the call and left the app, so I ended up muting my speakers for a while. It really shouldn't have to be this troublesome.

    That's like asking how many cows can I get into a field.  It depends on the size of the field, size of the cows, the terrain of the field, etc.  We could use a bit more information on what you're trying to accommplish:
    1 - where are the photos being downloaded from.
    2 - how big are the photos?
    3 - where are you going to put the photos, i.e. into folders, into an iPhoto library?
    4 - how big is the hard drive in the Mac Pro and how much free space do you have on it?
    etc., etc, etc......

  • How can i avoid displaying runtime error in intractive report

    hi gurus
    my question is, in interactive report when i reach 20th secondary list after that am getting runtime error when i click again. So i wanted to know how can i avoid that run time error.
    regars
    imran

    Hi Imran,
    Basically we can have one basic list and 20 interactive lists.
    Once when we reached to 20th list then it goes to shortdump.
    So, inorder to avoid that we can modify the system field
    SY-LSIND.
    Just see this example and try this. I hope this will be useful for you.
    REPORT  ZSAMPLE1111.
    data: begin of itab occurs 0,
            matnr like mara-matnr,
            mtart like mara-mtart,
            mbrsh like mara-mbrsh,
            end of itab.
    data: begin of jtab occurs 0,
          maktx like makt-maktx,
          spras like makt-spras,
          end of jtab.
    select matnr mtart mbrsh into table itab from mara up to 10 rows.
    loop at itab.
    write:/ itab-matnr, itab-mtart, itab-mbrsh.
    hide itab-matnr.
    endloop.
    at line-selection.
    select maktx spras into table jtab from makt where spras = 'EN' .
    case sy-lsind.
    when '1'.
    loop at jtab.
    write:/ jtab-maktx, jtab-spras.
    endloop.
    when '20'.             * changes see here.
    sy-lsind = 1.
    when others .
    write:/ 'name',sy-lsind.
    endcase.
    I hope this will be helpful for you.
    <REMOVED BY MODERATOR>
    Cheers,
    Swamy kunche
    Edited by: Alvaro Tejada Galindo on Apr 15, 2008 4:01 PM

Maybe you are looking for

  • Can you see how many calls are waiting in a queue using Supervisor.

    Is there a way to see how many calls are sitting in a particular queue using supervisor or is there and additional software or hardware i need to use or purchase? I am using  Contact Center - 5.0(2)SR01_Build053

  • Messaging server with openldap

    Hi all, Is anybody here has an experience in handling sun java messaging server 7u2 with open ldap? I tried to connect the messaging server with open ldap but still got error "Could not connect to LDAP server". Isn't possible for them to communicate?

  • IMac 27' screen res

    Hi there One of our 27" iMacs (Mac13,2) is stuck at a very low resolution. System preferences only offers one option - 1280 x 720, not the usual list of resolutions. Sometimes the relative sizes of the screen elements are correct but "blocky". More o

  • Terminal/Unix Command to Mount External USB Drive?

    I am having a probelm with the directory on an external HDD. The "device" is showing up in the utility software (DRIVE GENIUS/DISK UTILITY) but not the "volume," so it can't affect any repairs except INTIALIZE. So, I'm presuming the drive is physical

  • Running DOS program from java

    Hi all, I'm trying to execute a dos program using: runtime.exec("dos_prog.exe") THE PROBLEM : in this way I can run only WINDOWS programs and NOT DOS progs. What to do ???