none
Very Odd Problem, programs crash unless DIR name changed RRS feed

  • Question

  • I have a number of .net programs that a couple of days ago were running fine but today wont

    as an example i have a program in C:\Development\Live\Feedback.exe that ran perfectly well 2pm yesterday
    my initial thought was that the file was corrupted so i recompiled and copied it over the top of the original

    still didn't work

    so next i copied the entire directory from the release folder and tried to run it
    Success
    so i deleted the old folder and renamed the copy to the same name as the orginal and tried to run it again
    Failure
    renamed the folder
    Sucess
    Restored the name
    Failure

    what ever the problem is it seems to relate to the name of the folder that the program is in
    with this one example i shrugged it of as an unimportant mystery however i have since noticed the same problem with a 1click application that i've been using for over a year with out issue

    the only error message is the report problem to microsoft box popping up
    with
    EventType : clr20r3     P1 : feedback.exe     P2 : 1.0.0.0    
    P3 : 4b9529e0     P4 : mscorlib     P5 : 2.0.0.0     P6 : 4add54dc     P7 : 37a0
    P8 : 26     P9 : system.security.xmlsyntax

    Additional Note
    I have now done a repair on the .Net frameworks and the 1 click application is working again but not the one in the Live folder.
    however the one in the live folder will run as long as its not in the live folder

    Definition of a Beginner
    Someone that is unaware of the rules that need to be obeyed

    Definition of an Expert
    Someone that know when and which rules to ignore
    Wednesday, March 10, 2010 9:39 AM

Answers

  • ok the problem has now gone away as mysteriously as it appeared
    Definition of a Beginner
    Someone that is unaware of the rules that need to be obeyed

    Definition of an Expert
    Someone that know when and which rules to ignore
    • Marked as answer by MIkeTims Wednesday, May 26, 2010 11:33 AM
    Thursday, March 11, 2010 1:36 PM

All replies

  • Your app started throwing an unhandled exception (System.Security.XmlSyntax).
    Run it under debugger and see what is happening - get a call stack and fix the bug. If it doesn't repro under debugger, subscribe to UnhandledException event and log the exception call stack.

    -Karel
    Thursday, March 11, 2010 1:41 AM
    Moderator
  • the code wont error in debug, and is erroring before launching so no handlers inside my code are in effect and can't catch the error

    as i said the only change is the name of the DIR the exe is contained within.
    and there are no references to the directory in any part of the code i have written.
    plus this code has been running with out a single problem for 6 months and at the same time the 1 click launcher also becomes none functional.

    Definition of a Beginner
    Someone that is unaware of the rules that need to be obeyed

    Definition of an Expert
    Someone that know when and which rules to ignore
    • Marked as answer by MIkeTims Wednesday, May 26, 2010 11:32 AM
    • Unmarked as answer by MIkeTims Wednesday, May 26, 2010 11:33 AM
    Thursday, March 11, 2010 9:26 AM
  • ok the problem has now gone away as mysteriously as it appeared
    Definition of a Beginner
    Someone that is unaware of the rules that need to be obeyed

    Definition of an Expert
    Someone that know when and which rules to ignore
    • Marked as answer by MIkeTims Wednesday, May 26, 2010 11:33 AM
    Thursday, March 11, 2010 1:36 PM
  • If it happens next time, setup up your machine such that you can attach debugger when your application crashes. Get the call stack at that moment then.
    Or use only native debugger in VS or light-weight debuggers like windbg.

    -Karel
    Thursday, March 11, 2010 5:41 PM
    Moderator
  • spoke to soon while that one program is working others are not

    attempting to attach the debugger results in
    System.IO.FileLoadException was unhandled
    Message: Could not load file or assembly 'WebServiceTestApp, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. Failed to grant permission to execute. (Exception from HRESULT: 0x80131418)


    or using the Microsoft CLR Debugger 2003
    Unable to attack to process

    this program is even simpler than the last

        Public Sub Main()
    Try Dim ws2 As New Webservice.SendTo_V2 If Not ws2.TestConnecttion() Then Throw New Exception("Test Connection failed") End If Catch ex As Exception MsgBox(ex.Message, MsgBoxStyle.Critical, "Web Service Not responding") End Try
    End Sub
    thats it in it's entirety

    though this time the error is
    AppName: webservicetestapp.exe      AppVer: 1.0.0.0     AppStamp:4b9a54fe
    ModName: kernel32.dll      ModVer: 5.1.2600.5781      ModStamp:49c4f482
    fDebug: 0       Offset: 00012afb

    again changing the exe dir cures the problem


    Definition of a Beginner
    Someone that is unaware of the rules that need to be obeyed

    Definition of an Expert
    Someone that know when and which rules to ignore
    Friday, March 12, 2010 2:50 PM
  • the only common item between each of these programs is all CLR
    the 1 click app was on a network location as was a standard 1 click installer for a straight winforms App

    the other is a complied console app that was installed via a deployment project that reads from a SQL database and dumps date into a 3rd party webservice

    and this is a simple winforms app that sends a ping to in-house websevice that checks that the webservice in running in the solutions bin/realease folder

    on all cases the problem is cured by renaming the folder the exe is in
    Definition of a Beginner
    Someone that is unaware of the rules that need to be obeyed

    Definition of an Expert
    Someone that know when and which rules to ignore
    Friday, March 12, 2010 3:19 PM
  • If unrelated managed applications fail in similar way, then there's something wrong on your computer. Maybe anti-virus intervening, or some malware/virus/rootkit/other kind of "smart software" on your box?

    The fact that you cannot attach debugger is suspicious as well. Focus on fixing that (e.g. by disabling as much SW on your box as possible) and you will likely find the root cause.

    -Karel
    Friday, March 12, 2010 8:36 PM
    Moderator
  • that was my initial thought to, but the AV (symantex version 10) is upto date and not finding any threats and is managed centrally by the sys ad and means i can't disable it.

    i'm beginning to wonder if something in windows or the .Net framework has been corrupted.
    but even then is seems odd that it would only block some CLR programs and why that blocking is stopped when the directory is changed
    Definition of a Beginner
    Someone that is unaware of the rules that need to be obeyed

    Definition of an Expert
    Someone that know when and which rules to ignore
    Monday, March 15, 2010 11:46 AM
  • unfortunately short of doing a full uninstall and reinstall of the entire VS and .net i don't see a way to locate the problem and thats just not feasable at the minute
    Definition of a Beginner
    Someone that is unaware of the rules that need to be obeyed

    Definition of an Expert
    Someone that know when and which rules to ignore
    Tuesday, March 16, 2010 3:16 PM
  • Did you ever find a solution to this issue? This is happening at 2 of our clients sites with our application.

    A quicker fix than copying the folder is to set WinXP compatibility for the app, but I'd like to give them a firm answer as to the cause as it has caused them considerable downtime.

     

    Cheers

     

    Michael

    Tuesday, June 14, 2011 11:02 PM