Why does Exception.StackTrace disappear?

I'm attempting to catch unhandled exceptions in my app on windows 8.1
I've noticed that in my App_UnhandledException handler, that the UnhandledExceptionArgs.Exception.StackTrace is valid on entry.
However, I take the same Exception object, and pass it to a function, and the value mysteriously becomes null.
As a workaround, I capture the stack trace into a string variable before any other operations on the exception object, but I don't understand why this should be necessary.
Anthony Wieser | Wieser Software Ltd |
www.wieser-software.com

For some reason, it seems the getter of the 'Exception' property of the 'UnhandledExceptionEventArgs' returns the original exception the first time (I've checked, it's the exact same reference), and creates a new exception the subsequent times. I don't know
where this behavior comes from, but instead of saving the stacktrace you should keep a reference to the whole exception:
var exception = e.Exception;
// Now inspect exception instead of e.Exception

Similar Messages

  • Why does the slider disappear every time I use it to move the window (Windows: FF 32.0)?

    Why does the slider disappear every time I use it to move the window (Windows: FF 32.0)? How do I get the slider back?

    Problem solved: I have been using Walnut for Firefox ver. 2.0.28 theme. For some reason this has been causing the problem. Started FF in Safe Mode, and the slider problem disappeared. Then proceeded to re-enable the Walnut theme: the problem reappeared. Disabled Walnut theme and reenabled all my other add-ons (about 6 of them). Still no problem. So, clearly there is a problem with the use of Walnut theme in FF ver. 32, at least on my Windows 7 installation.
    Thanks for all your suggestions and help. Good job, all!

  • Why does Time Machine disappear?

    Why does Time Machine disappear each restart?

    Suggest that you power cycle the entire network, as things are likely out of sequence
    Power every device off on the network, order is not important
    Wait a few moments, then start the modem first and let it run by itself for 2-3 minutes
    Start the Time Capsule the same way
    Start each network device one at a time about a minute apart
    Check for proper operation

  • When welcome page comes up I click edit, why does the page disappear?

    When the welcome page is on my screen and I click on edit, why does the page disappear and nothing comes up?

    I'm a little confused, what welcmoe page are you talking about? Can you provide a screenshot?
    Julia

  • Why does my bookmarks disappear so fast when I try to find one I want to use

    Question
    Why does my bookmarks disappear so fast when I try to find one I want to use

    Start Firefox in <u>[[Safe Mode|Safe Mode]]</u> to check if one of the extensions or if hardware acceleration is causing the problem (switch to the DEFAULT theme: Firefox/Tools > Add-ons > Appearance/Themes).
    *Don't make any changes on the Safe mode start window.
    *https://support.mozilla.org/kb/Safe+Mode
    *https://support.mozilla.org/kb/Troubleshooting+extensions+and+themes

  • Why does the cursor disappear completely?

    The cursor disappears completely from the screen sometimes (I have a microsoft wireless mouse), and it does no good to use the pad either. Sometimes if I close the Mac, go away and come back, the cursor has returned. Other times I have to turn off the mac.  Advice?

    dplpc wrote:
    Why does the cursor disappear sometimes when close the mac's lid?
    Because the bottom of the computer is blocking the display.

  • Why does my artwork disappear from my ipod?   It's all visible in itunes, but on the ipod nano it disappears.

    Why does my artwork keep disappearing from my ipod?   It's all visible in itunes, but on the ipod nano it when I copy over new albums with artwork, the artwork on the albums already on the ipod lose theirs, although they retain the artwork if viewed through itunes.
    In case it matters, I don't "sync" my "library".  I have a I have a PC and copy over directories containing albums of MP3 files by dragging them onto the ipod with itunes.  I also tried pulling over only the files and not the directories.

    OK, so I decided that maybe if I "sync" my iPod instead of just copying stuff to it at will, that maybe it would fix the problem.  I did a "restore", wiping out the contents.  I set up a "playlist", and put everything that I wanted on the iPod into the "playlist".   Then I "synced" the "playlist" onto the iPod.  Every song and album now had the proper album art.  I could live with this.   Then I added another album to the "playlist", and "synced".  The new album was now on the iPod with the correct artwork.  The albums that were already on the iPod now either had their appropriate artwork, no artwork, or the artwork from the other albums that were already on the iPod, with no rhyme or reason as to which was which.  AARGH.   I wiped it out and re-added the now-explanded "playlist" and "synced" again, and every album had the right cover.   I guess the only thing to do is completely replace the contents of the iPod any time I want to add or change anything, or forget about artwork.

  • Why does my mail disappear on both iPad and iPhone4... only sometimes.  It's not in the trash so where does it go and why?

    Why do I lose mail from my iPhone4 and recently from my iPad2?  It happens infrequently, but when it does the messages completely disappear from my device(s); the messages are not in my trash. 

    OK, so I decided that maybe if I "sync" my iPod instead of just copying stuff to it at will, that maybe it would fix the problem.  I did a "restore", wiping out the contents.  I set up a "playlist", and put everything that I wanted on the iPod into the "playlist".   Then I "synced" the "playlist" onto the iPod.  Every song and album now had the proper album art.  I could live with this.   Then I added another album to the "playlist", and "synced".  The new album was now on the iPod with the correct artwork.  The albums that were already on the iPod now either had their appropriate artwork, no artwork, or the artwork from the other albums that were already on the iPod, with no rhyme or reason as to which was which.  AARGH.   I wiped it out and re-added the now-explanded "playlist" and "synced" again, and every album had the right cover.   I guess the only thing to do is completely replace the contents of the iPod any time I want to add or change anything, or forget about artwork.

  • Why does the cursor disappear

    The cursor intermittently disappears on my imac. I use a mighty mouse. If I shoot to the bottom and then up again it comes back but this is frustrating and it also happens again soon after. Any proper solutions anyone?

    Please read this whole message before doing anything.
    This procedure is a test, not a solution. Don’t be disappointed when you find that nothing has changed after you complete it.
    Step 1
    The purpose of this step is to determine whether the problem is localized to your user account.
    Enable guest logins* and log in as Guest. For instructions, launch the System Preferences application, select Help from the menu bar, and enter “Set up guest users” (without the quotes) in the search box. Don't use the Safari-only “Guest User” login created by “Find My Mac.”
    While logged in as Guest, you won’t have access to any of your personal files or settings. Applications will behave as if you were running them for the first time. Don’t be alarmed by this; it’s normal. If you need any passwords or other personal data in order to complete the test, memorize, print, or write them down before you begin.
    Test while logged in as Guest. Same problem?
    After testing, log out of the guest account and, in your own account, disable it if you wish. Any files you created in the guest account will be deleted automatically when you log out of it.
    *Note: If you’ve activated “Find My Mac” or FileVault, then you can’t enable the Guest account. The “Guest User” login created by “Find My Mac” is not the same. Create a new account in which to test, and delete it, including its home folder, after testing.
    Step 2
    The purpose of this step is to determine whether the problem is caused by third-party system modifications that load automatically at startup or login, or by a peripheral device.
    Disconnect all wired peripherals except those needed for the test, and remove all aftermarket expansion cards. Boot in safe mode* and log in to the account with the problem. The instructions provided by Apple are as follows:
    Shut down your computer, wait 30 seconds, and then hold down the shift key while pressing the power button.
    When you see the gray Apple logo, release the shift key.
    If you are prompted to log in, type your password, and then hold down the shift key again as you click Log in.
    Safe mode is much slower to boot and run than normal, and some things won’t work at all, including wireless networking on certain Macs.  The next normal boot may also be somewhat slow.
    The login screen appears even if you usually log in automatically. You must know your login password in order to log in. If you’ve forgotten the password, you will need to reset it before you begin.
    *Note: If FileVault is enabled, or if a firmware password is set, or if the boot volume is a software RAID, you can’t boot in safe mode.
    Test while in safe mode. Same problem?
    After testing, reboot as usual (i.e., not in safe mode) and verify that you still have the problem. Post the results of steps 1 and 2.

  • Why does some text disappear in Design View?

    Hi,
    I've had a website for about six years. On my Windows XP computer I used Dreamweaver 8 with minimal problems. When I upgraded to Windows 7 last spring, I bought Dreamweaver CS5. I've had a lot of problems since then. Here's the latest and most serious:
    I went to edit my homepage about a week ago, and all the text in the middle column (not the left or right sidebars) suddenly disappeared in Design View. If I click on Live View, the text shows up, as it does on the internet. This now seems to be happening in each page I open. I'm unable to edit my pages.
    I tried to install the recent update from Adobe.com, but was unable to do so. An adobe tech told me to reinstall Dreamweaver and try again. No luck.
    I never had this problem in earlier versions of Dreamweaver. My website is on the first page of Google in many categories, and I'm afraid to change it much. How do I fix this problem?
    You can view my website here: http://karathecomputertutor.com/
    Thanks.
    Kara

    You have some issues, however I dont know if they are related.  You have two opening <html> tags....thats not good. I would suggest you fix your validation issues first, see if that doent help, if it does not, let us know.
    http://validator.w3.org/check?uri=http%3A%2F%2Fkarathecomputertutor.com%2F&charset=%28dete ct+automatically%29&doctype=Inline&group=0
    Gary

  • Why does Pages Text Disappear On Conversion to PDF

    I made a two-page newsletter in Pages '09. The text on the front page article disappears when I export to PDF. The text is there in the thumbnail for the file but when I open the PDF document, the page is blank except for the graphics and photo.
    I'm using pages '09 and the latest version of Acrobat Pro. The font is Futura Medium and shows up fine on the second page.
    Any ideas?
    Message was edited by: Hogrider03

    After pulling my hair out for several days trying to solve for this, my son looked at it and in 20 seconds figured out the problem. The file looked fine in Preview and showed up in the thumbnail. Exporting to Word also worked, but the text disappeared regardless of how I arrived at the PDF.
    When examining the text box for the the "disappearing" text, my son chose "Bring To Front" from the "Arrange" menu and that fixed it. This made sense because all the other body copy text was the exact same font/style, etc. and displayed as expected in the exported PDF. Therefore, the problem was isolated to the properties of that one text box. In the course of laying out the newsletter, that one text box was sent backward in the layers and when converted to PDF, was hidden behind an invisible layer (there was no background of any kind behind the text, just the white "paper").

  • Why does the waveform disappear after editing in Sound Booth?

    It happens consistently with CS4 on 2 different computers. I right-click the audio track and select Edit in Adobe Sound Booth, and SB opens the audio for editing. I edit the audio, and it updates the audio. I know it does, because when I play back the edited section, it's correct. But the waveform is gone! I tried playing around with the display style -- disable and enable waveform, keyframes, etc. -- but the audio track doesn't display anything. I have to exit out of Premiere and re-start it to see the waveform again.
    Anyone else experience this?
    Also: when editing the audio in SB, is there a way to substitute the PP audio track with a multi-track? I know I can export a multitrack as an .aiff and import it into PP, but I was wondering if there's a way to link it.

    Thanks for responding, but the thread you mentioned seems to be about a mirror-image problem: waveform not appearing in Sound Booth. In my case, SB is working fine and displaying the waveform properly, which is why I posted my question in this forum, instead.
    The problem I'm having is the waveform not appearing in PPro. This doesn't seem to be a case of "it isn't a bug, it's a feature", because exiting and restarting PPro makes the waveform reappear. So it looks like it is a bug. Unless I'm doing something wrong or have a conflict somwhere.
    BTW, I used to use Audition, but it had too many hardware issues and wouldn't run under 64-bit Windows. Have you tried it under Vista x64, or with dynamic links to PPro or After Effects? It seems that PPro, AE and Flash have been designed to work with SB rather than Audition.

  • Why does the data disappear from my form fields when my form is sent over to client ?

    Hi all,
    I don't know if this is just happening a few times or ALL the time unfortunately:( I normally send over estimates (as regular pdfs) with some filled out Acrobat forms that make up part of the estimate (these include terms of agreement, project details, etc.). Now, before I send out the pdfs I password protect the entire pdf so that nothing can be changed, but that the pdf can be printed at high quality.
    Well, what is happening when my client opens up the pdf (usually on a Windows machine) is that NOTHING APPEARS in all of the form fields where I had input and saved the data! Yet when I open up the form on my Mac in Acrobat, or Reader or Preview, all looks just fine. Any idea why this is happening and what I could do to prevent it from happening in the future? I am using Acrobat X.
    Thank you kindly,
    Christine

    Hi Gilad,
    I never use Preview and did not use Preview at all before sending the document over to my most recent client either.
    I only opened Preview up this morning after I discovered that all of the form data had disappeared on his end! And the only reason I opened up Preview was because I already knew it looked fine in Acrobat so wanted so wanted to view the form in a different application.
    My client would not even have notified me about it had he not sent the signed form back to me and I saw there was no data there! I then called him and asked him about the missing data and he said that he thought I had simply sent over the form purposely with blank fields:(
    I have just emailed him to ask him what application he opened it up in. My understanding is that he is on Windows because ne mentioned to me his company was using Windows when we last spoke. Perhaps he has a personal Macbook where he opened it? I just don't know and can hopefully soon find out:)
    But THANK YOU for letting me know about that script! I appreciate it:) I have now downloaded and installed it and will just have to use it on ALL of my forms before sending them out:)

  • Why does more info disappear when I choose get info

    When I download a file and choose "Get info," I can see the dimensions (if it is a graphic file), color space, and the URL source under "More info." When I close Get info and reopen it again, that information disappears and never comes back. Why isn't this information saved and how do I get it back?

    Hi ryandoss-
    There appears to be some slow performance after signing in.  This presents a blank screen.  (If you wait long enough, you should see the content load).
    We are working to resolve this issue.  Sorry about the trouble.   And, thanks for your patience.

  • Why does exception appears

    hello people!
    i ve got a problem,
    my task is to make a program that can be used in the libraries!
    the main task is that i make a programm which will be an object-oriented database.
    i have already made this (the object - oriented database program) and all i need is to make a UI for my programm which must show how does my database works for example in the library. (like a library program)
    i have tested my database programm and it works!
    it saves database and loads it, and it adds and deletes objects from it and it can make search, but when i tryed to add an UI to my program, exception appeared:
    when i call
    database datbs = new database();
    Object[] result = datbs.search(Book.class, srch); // here exception occurs
    // srch is an object which is used by database.search to filter the objects in the database
    the exception is:
    Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException
         at findbook.FindBook.search(FindBook.java:267)
         at findbook.FindBook.search(FindBook.java:259)
         at findbook.FindBook.actionPerformed(FindBook.java:182)
         at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1995)
         at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2318)
         at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:387)
         at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:242)
         at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:236)
         at java.awt.Component.processMouseEvent(Component.java:6041)
         at javax.swing.JComponent.processMouseEvent(JComponent.java:3265)
         at java.awt.Component.processEvent(Component.java:5806)
         at java.awt.Container.processEvent(Container.java:2058)
         at java.awt.Component.dispatchEventImpl(Component.java:4413)
         at java.awt.Container.dispatchEventImpl(Container.java:2116)
         at java.awt.Component.dispatchEvent(Component.java:4243)
         at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4322)
         at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3986)
         at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3916)
         at java.awt.Container.dispatchEventImpl(Container.java:2102)
         at java.awt.Window.dispatchEventImpl(Window.java:2440)
         at java.awt.Component.dispatchEvent(Component.java:4243)
         at java.awt.EventQueue.dispatchEvent(EventQueue.java:599)
         at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:273)
         at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:183)
         at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:173)
         at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:168)
         at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:160)
         at java.awt.EventDispatchThread.run(EventDispatchThread.java:121)
    but in the test program the same call works without exceptions, (in the test program UI is not used)

    are you sure that the database object is created before you call the method?

Maybe you are looking for

  • Is there any report to see the Latest GR receipts materials wise

    Dear Experts,                           is there any report to see the Latest GR receipts materials wise , thanks in advance regards rajakarthik

  • Calculator and clock on desktop

    I want to add world clock and calculator which is their in dashboard to my desktop how to do?

  • How to call a FM from batch in a report.

    Hi, In a Z_FM, I am using CO_DR_PRINT_ORDER_EXTERNAL to print production orders and displaying the success msg  but it is giving performance issues. So we are planning to run this FM (CO_DR_PRINT_ORDER_EXTERNAL) in a batch job and immediately return

  • Checking whether field-symbol from another program is assigned?

    Hi all I'm attempting to access a FS from another program. As the FS can be assigned, or unassigned within that program, how do I checked for that in my calling program? e.g. calling program; FIELD-SYMBOLS: <fs> TYPE STANDARD TABLE. DATA: lv_var(40)

  • Photoshop CS5 strange brush jumping bug

    Strange brush bug with Photoshop CS5 Extended English (Updated to 12.0.2 latest). Youtube link of my screen recording http://www.youtube.com/watch?v=UxwUi35TMYo When  I first start (quick) brushing on top right, the strokes appear at bottom  right...