General XMetaL Discussion

XMetaL Community Forum General XMetaL Discussion Xmetal Author Exit Error

  • krish7

    Xmetal Author Exit Error

    Participants 8
    Replies 9
    Last Activity 13 years ago

    Hi

    I always get the following error message when I close my Xmetal Author application.

    —————————
    xmetal51.exe – Application Error
    —————————
    The instruction at “0x0321ce28” referenced memory at “0x00000004”. The memory could not be “read”.

    Click on OK to terminate the program
    —————————
    OK 
    —————————

    Also, I get this message at times to “terminate the application using Task Manager because some unknown script is running”.

    Why is this happening?What can I do prevent this?

    Help please..

    Reply

    Derek Read

    Reply to: Xmetal Author Exit Error

    This usually occurs when an XMetaL customization is acting up (sometimes triggered by specific steps you have performed) or when the customization is not installed correctly (one or more files are missing or corrupted, etc).

    The last error (…some unknown script is running…) typically indicates that part of the customization you are using is either still actually busy (it may be accessing some other software that has not finished running, etc) or more often it has referenced an ActiveX control and that reference has not been cleaned up after use. When XMetaL finds these types of open references it assumes that it is not allowed to terminate (which is why it shows this message). A customization should be written to avoid this problem.

    You may try reinstalling the customization and if that does not work do a fresh installation of both XMetaL Author and the customization you are using. If that does not resolve the issue, and the issue occurs only after performing specific steps it is best to contact the makers of the customization and have them debug it. In turn, if the people that made the customization cannot resolve the problem they may submit a support case with XMetaL Support along with reproduction details and they will try to help out.

    Reply

    krish7

    Reply to: Xmetal Author Exit Error

    Thanks Derek for the response.

    Can you please tell me what you mean by re-installing the customisation? I use Xmetal Developer with VS 2008 for my project customisations. Is it re-installing the software or re-building the customisation project alone?

    Also, I notice that when I debug a solution, in my “Solution Explorer” pane, there are some dynamic “eval code” script files that appear.
    Are my files corrupted?How do I fix this?
    Can you suggest a way to resolve this?

    Thanks again

    Krish

    Reply

    Derek Read

    Reply to: Xmetal Author Exit Error

    My response assumed you were not the creator of the “customization”. By customization I mean the DTD or XSD and other files including the CSS and anything else, but in particular anything containing script, which would include your CTM, MCR and XFT files. We commonly call this a “customization” of XMetaL Author, in that you are adding behaviour to the product. In XMetaL Developer this is a “project” because that is what VS calls them. In the case of an author or 'user' (I would call you a developer) reinstalling the customization would mean to follow any instructions for installing these files that you as the developer or someone else that manages XMetaL installations would provide to that author (aka: user) for deploying the customization, with the assumption that one or more of their files may have problems.

    As the developer of the customization I would assume you can verify the files are OK so those instructions don't really apply in your case. You may wish to ignore those instructions and concentrate on figuring out if you are referencing any ActiveX controls without cleaning them up in your scripts as that is the most likely issue that I can think of.

    You will want to follow the following basic pattern when instantiating and cleaning up ActiveX controls. This may be coded differently (you may also do this with global variables in some cases allowing you to place the cleanup code in a different script from the instantiating script) but the basic idea is to always and very purposefully “null” (destroy) any references to such controls. Ideally the scripting engines should do this during their garbage collection phase, but there is no guarantee that any scripting engine will get to that at any specific moment in time and if it hasn't and a reference is still counted by XMetaL the product will refuse to close and give you the “…some unknown script is running…” error.

    JScript:
    [code]//Instantiate fso…
    var fso = new ActiveXObject(“Scripting.FileSystemObject”);
    //Do something with fso…
    var myFile = fso.CreateTextFile(“c:\testfile.txt”, true);
    myFile.WriteLine(“This is a test.”);
    myFile.Close();
    //Make sure the reference to fso is cleaned up…
    fso = null;[/code]

    VBScript:
    [code]'Instantiate fso…
    Dim fso, myFile
    fso = CreateObject(“Scripting.FileSystemObject”)
    'Do something with fso…
    MyFile = fso.CreateTextFile(“c:testfile.txt”, True)
    MyFile.WriteLine(“This is a test.”)
    MyFile.Close
    'Make sure the reference to fso is cleaned up…
    fso = nothing[/code]

    I'm not sure why additional files you did not specifically add to your project would be appearing in VS 2008 in the Solution Explorer. Perhaps this is something VS 2008 does during debugging that older releases of VS do not do? I have 2005 readily available so cannot verify this immediately, but it does sound a little odd to me.

    Reply

    krish7

    Reply to: Xmetal Author Exit Error

    Derek,

    Thanks for the information.
    The error was resolved, partly when I checked the files in the “ApplicationDataSoftSquadXmetal5.1” folder.
    There seemed to be some corrupt files there and after deleting them and restarting the machine, the issue was solved.

    But, what does this imply?Why is this location important? Is there anything to be considered regarding this location of files?

    The “eval code” script  files still exist in my VS solution explorer. I am also not sure of the background processes when VS 2008 is debugging.

    Krish

    Reply

    Derek Read

    Reply to: Xmetal Author Exit Error

    The folder %appdata%SoftSquadXMetaL5.1 is where XMetaL Author 5.1 writes files to that it needs to keep track of on a per-user basis, and will typically include xmetal51.ini[/code], the [code]default.tbr file as well as .tbr files for each document type worked on (each DTD gets a different toolbar). If the user has recorded any macros they will also be written to their corresponding *.mcr files in this folder and customizations may also choose to write files here (which would be done on purpose by the person that created a script for a particular customization).

    Reply

    krish7

    Reply to: Xmetal Author Exit Error

    Thanks Derek for the information.

    Reply

    wilhelm

    Reply to: Xmetal Author Exit Error

    Hi,

    I have the same issue since yesterday. I don't know exactly when that happened.

    I tried reinstalling products ( XMetal Dev Edition 5.0 SP1), but that didn't change anything.

    I know that my customization is correct, as it worked yesterday morning. (customization written by a co-worker a few months ago, that hasn't been changed)

    I looked the tbr file, in the Application Data directory, that corresponds to my customization.
    I saw something strange :(here is the case for a DTD, nammed myDTD.dtd)

    So I looked in the Temp folder and found a folder called  myDTDa02680, which contains :

    ElementApplic.xft
    ElementReqPers.xft
    ElementTable.xft
    ElementXref.xft
    ElementXRefExt.xft
    meta-inf.xml
    myDTD.css
    myDTD.ctm
    myDTD.mcr
    myDTD.rlx
    myDTD.tbr
    myDTD_structure.css

    Here are the file my customization folder :

    ElementApplic.xft
    ElementReqPers.xft
    ElementTable.xft
    ElementXref.xft
    ElementXRefExt.xft
    myDTD.css
    myDTD.ctm
    myDTD.dtd
    myDTD.mcr
    myDTD.rlx
    myDTD.tbr
    myDTD.xac
    myDTD_structure.css

    Concerning tbr files, here are the Dtd_Id nodes for each :
    – for the tbr file in the Temp folder :

    – for the tbr file in my customization folder :

    I made a test :
    – I erase the tbr file in the app data folder
    – I erase everything in the temp folder
    – I open a file in XMetal, that corresponds to my custo type
    – When the file is opened, everything is fine (I have my custom toolbar and macros)
    – I close XMetal
    – The “0x00000004” error occurs
    – The tbr file in the app data folder is not created yet
    – the folder in the temps folder, is not created yet
    – I clock the “ok” button of the error message
    – then tbr file and the temps folder are created

    Each time I open a file, a new folder is created into the Temp folder and the tbr in the app data folder is updated (points the new temps folder).

    I don't understand where that can come from.
    Any idea ?

    Thank you in advance,

    Wilhelm

    Reply

    Derek Read

    Reply to: Xmetal Author Exit Error

    The folders in the Temp folder are being created because you are deploying a XAC file. If you remove this file (assuming you do not wish to use it) then you will not see this behavior. The XAC file contains (probably) all of the other files you have listed here but compressed into a ZIP file given a XAC file extension with the meta-inf.xml file (a manifest) added. When XMetaL Author or XMAX find the XAC file they must first unzip this file and that is where the folder myDTDa02680 is coming from (the last part will alter each time it is unpacked). Part of the XMetaL logic is to write out the TBR file at closing, and it does this to the same folder if possible, which is the case for you.

    If you wish to use the XAC deployment method then you do not need any of the other files in your customization. If you do not wish to use the XAC deployment method it looks like your customization does include all the files. XMetaL Developer may not make this clear because when you ask it to Build your project it creates both and puts all the files in the same folder.

    Reply

    LeeHart

    Reply to: Xmetal Author Exit Error

    This usually occurs when an XMetaL customization is acting up (sometimes triggered by specific steps you have performed) or when the customization is not installed correctly (one or more files are missing or corrupted, etc).

    <...>

    You may try reinstalling the customization and if that does not work do a fresh installation of both XMetaL Author and the customization you are using. If that does not resolve the issue, and the issue occurs only after performing specific steps it is best to contact the makers of the customization and have them debug it. In turn, if the people that made the customization cannot resolve the problem they may submit a support case with XMetaL Support along with reproduction details and they will try to help out.

    Is there any tool to help determine why XMetaL doesn't completely exit? If I use a control I built in 2008 XMetaL exits file. If I use the version I just built XMetaL does not exit. Both controls were built using the same major version of VS (2005).

    Thanks,

    Lee

    XMetaL Versions 5.5.0.266, 6.0.0.068, and 4.0.4.429

    Reply

  • You must be logged in to reply to this topic.

Lost Your Password?

Products
Downloads
Support