[CS3 JS] event crashes InDesign

Scripting ladies and gentlemen,
I'm working on this event script that searches for linked PDF files and
lets the user copy/relink them. Using the afterOpen eventListener however
crashes InDesign no matter what I do. This is also the case with
beforeClose. It appears that my function cnvrtPDFlnk is causing the crash
(I'm able to alert succesfully with the afterOpen event if I //-comment
the cnvrtPDFLnk(myDocument)).
Do one of you scripting gurues have a tip?
#targetengine "session"
main();
function main() {
   app.addEventListener("afterOpen", myEventFunction, false);
function myEventFunction(myEvent) {
   var myDocument = myEvent.parent;
   var label = docLabel(myDocument, "PDFCheck");
   if(label) {
      //myEvent.stopPropagation();
      //myEvent.preventDefault();
      exit();
   else {
      cnvrtPDFLnk(myDocument);
function docLabel(myDocument, key) {
   var hasLabel = (eval(myDocument.extractLabel(key))?true:false);
   return hasLabel;
function cnvrtPDFLnk(myDocument) {
   var graphics = myDocument.allGraphics;
   var link; var linkExt; var linkType; var linkPath; var linkPageRef; var myConfirm; var myFolder; var myFile; var myOrgPath;
   var myLinkObjects = [];
   for (var i = 0; i < graphics.length; i++) {        
      link = graphics[i].itemLink;
      linkExt = link.filePath.split('.').pop().toLowerCase(); 
      linkType = link.linkType.toLowerCase();       
      if (linkExt == 'pdf' || linkType.match('pdf') != null) {
         link.show();
         if(myConfirm= confirm(link.name+"\nDo you want to convert this link?")?myLinkObjects.push(link):alert("Link skipped!\n"+link.name));
   if (myLinkObjects.length > 0) {
      myFolder = Folder.selectDialog("Point me to a hotfolder..");
      copyLink(myLinkObjects, myFolder); // run copyLink function - copies links according to myfolder
      if(myConfirm = confirm("Do you want to relink now?")) {
         reLink(myLinkObjects); // run reLink function - relinks according to myFile dialogue
         app.menuActions.item("Fit Page in Window").invoke();
         app.menuActions.item("First Page").invoke();    
   myDocument.insertLabel("PDFCheck", "true");
   }// no links
}// end cnvrtPDFLnk
Best regards,
Rasmus

Hi Rasmus,
Here is an example of scripted plug-in — very simple yet useful for me.
Its goal is to check color settings in InDesign and Photoshop after a document opens. We use two profiles at work: one for the main part of our magazine and another profile for its cover and the inset for another magazine. Sometimes, although rarely, we forget to switch on the correct setting.
That's where the plug-in comes to the aid. After a document opens it checks if the file name contains certain characters – e.g. if file name starts with "Obl_" that means that this is a cover and the script checks the color settings, if they are not correct it gives warning.
Here is short description of how to do it:
Create a new scripted plug-in project from APIDTemplate.indd file.
Open APID panel
Enter 'docLoaded' into Event Filter field and press Enter
Here is the script that does the job (the script file is generated in the same folder as indd-file):
if (theItem.eventCode == "docLoaded") {
   var gKasmyDoc = app.activeDocument;
   var gKasDocumentName = app.activeDocument.name;
   KasCheckProfile();
   KasinfoFromPS();
function KasCheckProfile(){
   var myIssueNumber = parseInt(gKasDocumentName.substr(2, 3));
   if (gKasDocumentName.substr(0, 2) == "Q_" && myIssueNumber >= 730 && myIssueNumber <= 999 && gKasDocumentName.match("_Vshivka") == null){
      if (app.colorSettings.workingSpaceCMYK != "ISO Web Coated"){
         alert("Внимание! Для газеты должен использоваться провиль \"ISO Web Coated\", а установлен. — " + app.colorSettings.workingSpaceCMYK);
   if (gKasDocumentName.substr(0, 2) == "Q_" && myIssueNumber >= 730 && myIssueNumber <= 999 && gKasDocumentName.match("_Vshivka") != null){
      if (app.colorSettings.workingSpaceCMYK != "ImationMatchprn175lpi_avr.icc          "){
         alert("Внимание! Для вшивки должен использоваться провиль \"ImationMatchprn175lpi_avr.icc\", а установлен. — " + app.colorSettings.workingSpaceCMYK);
   else if (gKasDocumentName.substr(0, 4) == "Obl_"){
      if (app.colorSettings.workingSpaceCMYK != "ImationMatchprn175lpi_avr.icc          "){
//         alert("Внимание! Для обложки должен использоваться провиль \"ImationMatchprn175lpi_avr.icc\", а установлен. — " + app.colorSettings.workingSpaceCMYK);
         if (confirm("Внимание! Для обложки должен использоваться провиль \"ImationMatchprn175lpi_avr.icc\", а установлен. — " + app.colorSettings.workingSpaceCMYK)) {
            app.colorSettings.cmsSettings = "Listovaya Mashina";
function KasinfoFromPS() {
   var bt = new BridgeTalk;
   bt.target = "photoshop";
   bt.body = "app.colorSettings;"
   bt.onResult = function(resObj) {
      var myResult = resObj.body;
      KascheckPsColorSettings(myResult);
   bt.send();
function KascheckPsColorSettings(myColorSettings){
   var myIssueNumber = parseInt(gKasDocumentName.substr(2, 3));
   if (gKasDocumentName.substr(0, 2) == "Q_" && myIssueNumber >= 730 && myIssueNumber <= 999 && gKasDocumentName.match("_Vshivka") == null){
      if (myColorSettings != "ISO Web Coated"){
         alert("Внимание в Photoshop! Для газеты должен использоваться провиль \"ISO Web Coated\", а установлен. — \"" + myColorSettings + "\"");
   if (gKasDocumentName.substr(0, 2) == "Q_" && myIssueNumber >= 730 && myIssueNumber <= 999 && gKasDocumentName.match("_Vshivka") != null){
      if (myColorSettings != "Listovaya Mashina"){
         alert("Внимание в Photoshop! Для вшивки должен использоваться провиль \"ImationMatchprn175lpi_avr.icc\", а установлен. — \"" + myColorSettings + "\"");
   else if (gKasDocumentName.substr(0, 4) == "Obl_"){
      if (myColorSettings != "Listovaya Mashina"){
         alert("Внимание в Photoshop! Для обложки должен использоваться провиль \"ImationMatchprn175lpi_avr.icc\", а установлен. — \"" + myColorSettings + "\"");
You can put your own stuff into the script:
if (theItem.eventCode == "docLoaded") {
// do your stuff here
And finally generate the plug-in.
Kasyan

Similar Messages

  • CS3: Inner Shadow crashes InDesign

    When placing images in large documents (1745 x 995 mm) and using the effect Inner Shadow on the image, InDesign crashes when exporting to PDF.
    This is a real puzzle cause when I use the same image with that effect in a smaller document (A4) I have NO problem in exporting the document. Why is that? Is there a work-around, some settings I've missed or an upgrade that fixes this problem (I have IND CS3 5.0.3).

    I've isolated the problem. Took me about 15 InDesign restarts.
    The problem has nothing to do with PDF settings (I tried all the defaults with or without transparency. High-res and Low-res. RGB and CMYK). InDesign crashes when it's trying to download the image with the effect. It doesn't really get to making the PDF.
    The problem is...The file size! I tried it with different kind of file-types (jpg, tif, psd - 8 bit, RGB and CMYK with or without icc-profiles)No matter what kind of file InDesign crashes when handling the effect on the image (120 MB). When I used another smaller image (only 20 MB) or the same image downsampled, InDesign made the PDF. So it seems to be the amount of pixels in the image that has an effect on InDesign handling the effects.
    Has this something to do with my hardware (PC, 4 GB RAM, 8*3158 MHz processors, Virtual memory: 3 GB) or is it the software?

  • CS2 Javascript crashing InDesign works as 2 parts and in CS3.

    I have a script which works fine in CS3 but when I set it up in CS2 I found it was crashing InDesign. I've tried to cut it down to the minimum and set the 2 parts as functions.
    The first function makeMyslug create a new layer called slug and then some text frames on all master pages, with details about the document. The second function printMyslug prints all pages to postscript and adds a page number to the postscript file.
    If I have a document open and run each of the functions separately all is well. If I try and run both function in one go InDesign crashes. The script seems to crash InDesign once the printing process begins.
    NOTE for this example to work you will need to have a document open and make sure there are no blank pages. I'll post in as a reply so that it can be copied if anyone is able to help me out.
    Any suggestions would be greatly appreciated.

    //Here is the script.
    var mySluglay, myBlueBlk, mySlugChr, mySlugPar, myPageNo, myTitle
    myPageNo = 1;
    myTitle = "Test";
    myDocument = app.activeDocument;
    function makeMyslug(){
    //Create a layer for the slug items.
    mySluglay = myDocument.layers.item("Slug");
    if (mySluglay == null){
    mySluglay = myDocument.layers.add({name:"Slug"});
    //Create a blue background color.
    myBlueBlk = myDocument.colors.item("BlueBack");
    if (myBlueBlk == null){
    myDocument.colors.add({name:"BlueBack", model:ColorModel.process, colorSpace:ColorSpace.cmyk, colorValue:[100, 60, 0, 0]});
    //Create a cahr style.
    mySlugChr = myDocument.characterStyles.item("SlugChar");
    if (mySlugChr == null){
    myDocument.characterStyles.add({name:"SlugChar", appliedFont:"Arial"});
    //Create a para style.
    mySlugPar = myDocument.paragraphStyles.item("SlugPar");
    if (mySlugPar == null){
    myDocument.paragraphStyles.add({name:"SlugPar"});
    // Set units to mm.
    app.activeDocument.viewPreferences.horizontalMeasurementUnits = MeasurementUnits.MILLIMETERS
    app.activeDocument.viewPreferences.verticalMeasurementUnits = MeasurementUnits.MILLIMETERS;
    with(myDocument.documentPreferences){
    //Slug
    slugBottomOffset = "20";
    slugTopOffset = "20";
    slugInsideOrLeftOffset = "0";
    slugRightOrOutsideOffset = "0";
    //Set the documents ruler origin to page origin. This is very important
    //--if you dont do this, getting objects to the correct position on the
    //page is much more difficult.
    myDocument.viewPreferences.rulerOrigin = RulerOrigin.pageOrigin;
    //Create the slug details on all master pages.
    with(myDocument.masterSpreads.item(0)){
    myDocument.pages[0].appliedSection.continueNumbering = false;
    myDocument.pages[0].appliedSection.pageNumberStart = parseInt(myPageNo);
    var myDetails = "Title: "+myTitle;
    var myPageWidth = myDocument.documentPreferences.pageWidth;
    var myPageHeight = myDocument.documentPreferences.pageHeight;
    mp = app.activeDocument.masterSpreads.everyItem().pages.everyItem().getElements();
    for (i = 0; i < mp.length; i++){
    var myTitleBox = mp[i].textFrames.add(myDocument.layers.item("Slug"), undefined, undefined, {geometricBounds:[myPageHeight+6,10,myPageHeight+14, myPageWidth-10], contents:myDetails});
    myTitleBox.label = "Title";
    myTitleBox.textFramePreferences.verticalJustification = VerticalJustification.bottomAlign;
    myTitleBox.parentStory.paragraphs[0].appliedCharacterStyle = "SlugChar";
    myTitleBox.parentStory.paragraphs[0].appliedParagraphStyle = "SlugPar";
    myTitleBox.parentStory.fillColor = myDocument.swatches.item("Paper");
    myTitleBox.parentStory.pointSize = 10;
    myTitleBox.bringToFront();
    myTitleBox.textFramePreferences.ignoreWrap = true;
    myTitleBox.textFramePreferences.textColumnCount = 1;
    var mycount = app.activeDocument.masterSpreads.item(0).pages.item(0).textFrames.item("Title");
    var myBlueBlock = mp[i].textFrames.add(myDocument.layers.item("Slug"), undefined, undefined, {geometricBounds:[myPageHeight+6, 8,myPageHeight+20, myPageWidth-8]});
    myBlueBlock.label = "BlueBlock";
    myBlueBlock.fillColor = "BlueBack";
    myBlueBlock.textFramePreferences.verticalJustification = VerticalJustification.bottomAlign;
    myBlueBlock.sendToBack();
    var myWhiteBlock = mp[i].textFrames.add(myDocument.layers.item("Slug"), undefined, undefined, {geometricBounds:[myPageHeight+14.5, 9,myPageHeight+19, myPageWidth-9]});
    myWhiteBlock.label = "WhiteBlock";
    myWhiteBlock.fillColor = myDocument.swatches.item("Paper");
    var myPageNoBox = mp[i].textFrames.add(myDocument.layers.item("Slug"), undefined, undefined, {geometricBounds:[myPageHeight-5, 10, myPageHeight+18, myPageWidth-10]});
    myPageNoBox.label = "PageNo";
    myPageNoBox.insertionPoints.item(0).contents = SpecialCharacters.autoPageNumber;
    myPageNoBox.insertionPoints.item(0).contents = SpecialCharacters.emSpace;
    myPageNoBox.insertionPoints.item(0).contents = "Page No";
    myPageNoBox.parentStory.paragraphs[0].appliedCharacterStyle = "SlugChar";
    myPageNoBox.parentStory.paragraphs[0].appliedParagraphStyle = "SlugPar";
    myPageNoBox.textFramePreferences.verticalJustification = VerticalJustification.bottomAlign;
    myPageNoBox.textFramePreferences.ignoreWrap = true;
    myPageNoBox.textFramePreferences.textColumnCount = 1;
    //print function
    function printMyslug(){
    alert("Start print process.");
    myDocument.printPreferences.printer = Printer.POSTSCRIPT_FILE;
    myDocument.printPreferences.ppd = PPDValues.DEVICE_INDEPENDENT;
    for(var myCounter = 0; myCounter < myDocument.pages.length; myCounter++){
    myPageName = myDocument.pages.item(myCounter).name;
    myDocument.printPreferences.pageRange = myPageName;
    //The name of the exported files will be the base name + the page name + ".pdf".
    //If the page name contains a colon (as it will if the document contains sections),
    //then remove the colon.
    var myRegExp = new RegExp(":","gi");
    myPageName = myPageName.replace(myRegExp, "_");
    myFilePath = "/c/idjavascript/test_" + myPageName + ".ps";
    myFile = new File(myFilePath);
    document.printPreferences.printFile = myFile;
    try{
    myDocument.print(false);
    catch(e){
    alert("Page "+myPageName+" may be blank plesae check.");
    //call the makeMyslug function
    makeMyslug();
    //call the printMyslug function
    printMyslug();

  • CS3: Period in findWhat crashes InDesign

    This code crashes InDesign CS3:
    app.findTextPreferences.findWhat = ", .";
    app.changeTextPreferences.changeTo = ".";
    app.changeText();
    This works fine:
    app.findGrepPreferences.findWhat = ", \\.";
    app.changeGrepPreferences.changeTo = ".";
    app.changeGrep();
    Hope this helps someone.
    Walt

    Sadly, CS3 may crash on virtually any scripted search/replace. I had it crash on double quotes, tabs, and even spaces. Usually, moving the specific s&r from regular to GREP or the other way around clears it for that offending file only.
    The symptom seems connected to a specific file (as it may always fail on one and never on another), but saving as INX and re-loading never cleared it up for me. As it is quite a hassle to find the exact code it crashes on this time (with intermittant crashes on each new try), I usually shrug and do my replaces from memory. After all, it's just a few hundred of'em.

  • InDesign CS3 (XP SP2) crashes when placing files

    Hi,
    every time I try to place an image file etc. into InDesign CS3 (Windows XP, service pack 2) the "place" dialogue pops up for a split second. Then, InDesign freezes. Version Cue is not activated (when I was activated Photoshop CS3 would do the same).
    I'd be more than happy if someone has a hint since naturally InDesign is pretty useless when you cannot place anything. On a sidenote though you can drag files from the explorer into CS3 without it crashing.
    Any help's greatly appreciated.

    Sorry to hear the trick didn't work. Another oft mentioned idea is to open a dialog in Photoshop and resize it. A third is to hit Alt + Spacebar, then M, and then an arrow key, and finally to move the mouse around and see if the dialog appears at the edge of the screen.
    The 3-key keyboard shortcut only works when you are opening InDesign from the start menu or a desktop shortcut, and you have to be REALLY fast. Renaming the prefs files (while ID is closed) is more reliable, but won't give you any indication that the files are being replaced, other than you'll see the welcome screen and everything will be reset to defaults.

  • Flash CS3 / Adobe products: crashes or acting erraticly

    HI -
    I recently posted a thread conserning Flash CS3 deleting the
    contents or erroring out my built and working .fla's and .swf's
    apon opeing them to edit the .fla's.
    Suspected a virus - scanned etc etc.
    an Avast boot scan showed a corrupt cab archive avast error
    #42127 on a boot scan for a DW20.exe adn 4 or 5 other cab
    archives... thes are all related to Visual Basic C# - the DW20 .exe
    is for error reporting to MS about crashes. - thsi may be an "avast
    error" - but no viruses detected.
    I checking my WinXP error logs for a further clue they showed
    at the time of Flash CS3 crashing when trying to preview - it was
    due to FFMpeg.exe
    is this something that flash implements in importing a video
    file or perhaps a mpeg?
    When these crashes started, i was attempting to import a .wmv
    (- which btw - i thought past flash 8 there was no problems with -
    it now asks for Direct Show to be installed or Quicktime.?? Maybe
    someone can give an answer to this as well My understanding was
    that past Flash 8 - this was no longer nessasary - if this is true
    - any thoughts as to why CS3 is asking me to install these products
    to import or encode a wmv file?
    Back to topic: Since attempting to bring in the wmv video
    and/or mpeg audio and/or the flv i was experimentiing with
    - Flash not only crashes on me when attempting to open any
    .fla now.
    - but also destroys or corrupts all other .fla's and .swf's
    in the same file folder as the one i'm working on.
    My questiion is - since ffmeg is not a win exe - is this
    something that Flash implements in it's importing of a video or
    audio file? or at all.
    I have 12 error event crashes listed from Flash - all list
    the same:
    " faulty application ffmeg.exe
    - faulty module: ffmeg.exe
    - fault address 0x001be5e3
    - event id:1000
    anyone have knowledge on how to fix this or what may cause
    this -
    I mentioned the cab errors because i'mm not sure if one is
    related to the other - i had C# installed but removed it from the
    comp.
    as mentioned in my other post related to this - Photoshop
    Lightbox is also acting complety crazy as well - all adobe products
    are the ones seemly - that i know of or noticed thus far - the only
    products acting up.
    I need this issue fixed - as i have to finish my fla! lol
    I'd much rather be doing that than trouble shooting crashes
    from Flash or other Adobe products acting up.
    Any help would really be appriciated since this goes beyond
    my skills and knowledge.
    thanx

    Sure wish I had a quick fix, but it will take more info than
    what you have entered. I was having a lot of trouble also, until I
    did the 5 tasks listed below.
    1. Is there enough memory for Flash CS3? Setup tells you how
    much and if you have enough to install the program.
    2. Is there enough storage space for Flash CS3? Again, Setup
    tells you how much it needs and if ;you have enough to install the
    program.
    3. How many files do you have on your hard disk? The amount
    of directories and files on your hard disk matters a great deal
    when you are installing new programs. I usually go through my c:\
    directory and get rid of programs I don't use. I try to keep my
    folders and files at the lowest I can get away with.
    4. When was the last time you cleaned and defragged the
    registry?
    This matters a great deal too. If you have an overabundance
    of empty registry keys, etc. it can hang up your computer too. I
    use RegCure, it's a great program.
    5. When was the last time you did a defrag on C:\? Many
    people don't realize that just these 5 tasks can have a bad effect
    on your hard drive.
    It would be a great thing if you uninstall Flash CS3, do
    tasks 1-5 and then reinstall Flash CS3. Seems like a lot of work,
    but it is extremely important to keep your computer running at its
    best.
    hope this helps.
    jan

  • Bug: Configurator crashing InDesign

    Hello,
    Unfortunately I cannot use Configurator because it crashes InDesign whenever I run certain scripts that would otherwiser run fine when launched from the old script panel.
    I get this messsage:
    "An attached script generated the following error:
    Object is invalid
    Do you want to disable this event handler?
    (No) (Yes)"
    Afterwards, InDesign crashes.
    Can I report this somewhere?

    Sorry for this.
    Could you please send the panel that containing the script to [email protected] ?
    And tell us which objects in the panel containing the script that make InDesign crash.
    We will investigate the problem.
    And here you mentioned:
    that would otherwiser run fine when launched from the old script panel.
    what doesn the "old script panel" mean?
    Thanks
    Xiaoyan

  • Crashes InDesign on saving document

    Hello All,
    I am facing a unique problem for all my plugins under CS5, which are create from Scratch or which are ported. If I try to save my document after i create a new frame on the document or move or resize the existing frame on the document it crashes InDesign.
    Initially I thought it might be my mistake and I might not be passing the proper commands. But later I tried on a sample plugin, which created a new frame with Layout helper and tried to do Save / SaveAs document using LayoutHelper. It still crashed.
    Has anyone faced this type of problem. How can I resolve this problem. Can some one please help.
    Thank you all in advance.
    Regards
    Farzana.

    Hi,
    I am trying on Released version of InDesign.
    Thanks
    Regards
    Farzana.

  • Textframe crashing InDesign...??

    I'm breaking a bunch of documents out of their textframes. I'm basically taking a bunch of objects that have been placed into one textframe and I'm placing them into individual ones. Essentiallly I get the paragraph outlines, and copy the correlative contents into it. There's been a lot of exception handling etc. that I've had to deal with, but for the most part its gone smoothly. Then I stumble into this:
    OS_PopupWindows: InDesign.exe - Application Error
    The instruction at 0x71482357 referenced memory at 0x171d9000. The memory could not be read.
    I feel like that means something is corrupted, but don't really know. The application isn't particularly informative of why it's crashing... I'm sure this means something to a machine. I suppose this is a nice crash in the sense that I get any information at all.
    Is it possible for a single textframe to be somehow "corrupted"? Otherwise any ideas on how this type of thing could happen? Anything at this point would help. Every other document processes fine without crashing InDesign. Ultimately it might be a matter of simply laying it out from scratch...
    A brief summary of some of the testing I've done to try and isolate the problem:
    1) Checked to see if any of the objects were locked and if so I unlocked them.
    2) Tried removing the paragraphs one at a time, I found that a paragraph containing a graphic would crash if I removed it.
    3) If I duplicate the textframe, its duplicate behaves "normally" in the sense I can move it around or remove it without experiencing a crash, however even with a duplicate attempts to remove the original crash the application.
    4) Checked if the textframe was anchored... it's not.

    Ok, ho capito dove è il problema. Cambia i dizionari in Proximity, e togli Hunspell. Ero quasi certo fosse un problema di dizionario.. ed in effetti è quello.
    Ne approfitto per ricordarti che esiste anche un gruppo italiano di InDesign..
    https://www.facebook.com/groups/indesignusergroupit/
    Leonardo Agosti
    AdobeGuru
    PS.. for the english people reading this conversation, the problem is in the HUNSPELL dictionary. Changing it in the preferences and choosing the old (and wise) Proximity, InDesign doesn't crash.

  • Uploading article crashes InDesign

    I am in CS6 and when I upload an article it crashed InDesign. So far out of 32 articles in this folio, this is the only one that crashes. Any ideas?

    Hello Alistair,
    I'm facing the same problem in terms of uploading an article. Is there any way of testing this? I've got a multi-state layer (about 43 states) with separate links within one state and checking them one-by-one isn't very feasible. Alternatively, is there any way of manually uploading an article (not through Folio Builder panel)?
    Any help is appreciated!
    Thanks!

  • FolioBuilder crashes InDesign CS5

    The FolioBuilder crashes InDesign everytime I hit the locate button in the "import article" window.
    Is this a known issue? How can it be fixed?
    I already tried to un/reinstall InDesign and the latest updates on DPS without success.
    Regards
    David

    This is a known issue. The workaround is to paste the pathname into the field.
    Sent from my iPad

  • GREP search crashes InDesign

    Hi,
    I have a script which imports XML and formats it. As part of the formatting, there's numerous GREP searches which remove redundant spaces, returns and so on.
    One in particular crashes InDesign and it's driving me nuts.
    It's supposed to remove redundant returns in a table:
    // GREP Search for redundant returns
    app.findGrepPreferences = app.changeGrepPreferences = null;      
    app.findGrepPreferences.appliedParagraphStyle = "ArticleMinister";
    app.findGrepPreferences.findWhat = "\r$";
    app.changeGrepPreferences.changeTo = "";
    app.activeDocument.changeGrep();
    The problem is there's an XML closing tag between the carriage return and the end of the para, i.e. data{return}</closingtag>, but it works fine when the XML is data</closingtag>{return}.
    Any assistance would be most appreciated.

    Hi Vamitul,
    Thanks very much for the reply and it makes perfect sense.
    This script creates quite a complex document and, for some reason, moving the {return} outside the XML tags makes a mess of the document. I do not know why but I suspect that some of the 'clean up' non-GREP search and replace commands in the script are ignoring the XML data - perhaps not but I cannot for the life of me work out why a simple change is making the text a real mess.
    So the 'harder fix' sounds like something worth pursuing as this is the last step in a long process. Do you have any more information about checking the xmlContents? I don't expect anyone else to do my work for me, but advanced (or even intermediate) scripting is something I struggle with.
    Cheers,
    Simon.

  • Photoshop CS3 started to crash on me ?

    Hello.
    I'm trying to figure out why my Photoshop CS3 and sometimes Bridge CS3 started to crash on me lately.
    I did install a new ATI Radeon HD3870 card and new ram but it dosent look like thats the reason.
    I say that because we have a second Mac Pro with the stock Radeon HD2600 and Photoshop CS3 also started to crash there sometimes.
    It only happen sometimes. I did try to remember if i installed new Plug-ins.
    I have the latest console crash.log file and i was wondering if anybody could translate it for me or check if it says anything helpful.
    Hope to get a answer very soon because i use Photoshop in a daily work.
    Computer specs: Photoshop CS3 & Bridge CS3 (Design Suite CS3) Mac Pro 8 Core 2.8Ghz with 14GB Ram, ATI Radeon HD3870, Mac Os X 10.5.6 (Before 10.5.4 with no crash ?)
    Thank you so much.
    Photographer
    Sjogren-Denmark

    Ups. forgot to post the photoshop CS3 crash.log file, Sorry
    Here it comes.
    Process: Adobe Photoshop CS3 [231]
    Path: /Photoprogrammer/Adobe CS3/Adobe Photoshop CS3/Adobe Photoshop CS3.app/Contents/MacOS/Adobe Photoshop CS3
    Identifier: com.adobe.Photoshop
    Version: 10.0.1 (10.0.1x20071012 [20071012.r.1644 2007/10/12:09:30:00 cutoff; r branch]) (10.0.1)
    Code Type: X86 (Native)
    Parent Process: launchd [85]
    Date/Time: 2009-01-25 18:18:31.746 +0100
    OS Version: Mac OS X 10.5.6 (9G55)
    Report Version: 6
    Exception Type: EXC_CRASH (SIGABRT)
    Exception Codes: 0x0000000000000000, 0x0000000000000000
    Crashed Thread: 44
    Thread 0:
    0 com.apple.QD 0x92007eaa _GetDstBits32BGRA + 6
    1 com.apple.QD 0x91facc93 TransferAnyToAnyMasked + 1332
    2 com.apple.QD 0x91fab02f StretchBlt + 4993
    3 com.apple.QD 0x91f9bc6a Stretch + 3569
    4 com.apple.QD 0x91f9a8e6 CommonBits + 1258
    5 com.apple.QD 0x91fa9c77 CopyDeepMask + 260
    6 com.apple.HIServices 0x9124af9f IconPixMap::CopyMaskedToPort(IconPixMap&, OpaqueGrafPtr*, Rect const&, short) const + 289
    7 com.apple.HIServices 0x9124a55c PlotIconRefInQDPort(Rect const&, short, short, RGBColor const*, unsigned long, unsigned char, void*, char** (*)(unsigned long, void*)) + 644
    8 com.apple.HIServices 0x9124a292 PlotIconRef + 390
    9 com.apple.HIToolbox 0x901e7d22 PlotAnIcon(OpaqueControlRef*, OpaqueIconRef*, CGRect const*, short, short, RGBColor const*, unsigned long, CGContext*) + 136
    10 com.apple.HIToolbox 0x901e7b49 _HIViewPlotAlertIcon + 215
    11 com.apple.HIToolbox 0x901e7a61 PlotIconRefForAlertIcon(OpaqueControlRef*, short, Rect const*, short, short, CGContext*) + 139
    12 com.apple.HIToolbox 0x901b5185 DrawOrUpdateItem(_DialogRec*, short, DITLItem*, long) + 1285
    13 com.apple.HIToolbox 0x901a692d ForEachDialogItem(_DialogRec*, unsigned char (*)(_DialogRec*, short, DITLItem*, long), long) + 75
    14 com.apple.HIToolbox 0x901b47e8 DrawDialog + 144
    15 com.apple.HIToolbox 0x901b4274 DialogSelect + 2300
    16 com.adobe.Photoshop 0x000606dd 0x1000 + 390877
    17 com.adobe.Photoshop 0x006e7957 0x1000 + 7235927
    18 com.adobe.Photoshop 0x00060f9d 0x1000 + 393117
    19 com.adobe.Photoshop 0x00078605 0x1000 + 488965
    20 com.adobe.Photoshop 0x00061461 0x1000 + 394337
    21 com.adobe.Photoshop 0x006e365b 0x1000 + 7218779
    22 com.adobe.Photoshop 0x000a07db 0x1000 + 653275
    23 com.apple.HIToolbox 0x901b17d8 ModalDialog + 1854
    24 com.apple.HIToolbox 0x901e7972 RunStandardAlert + 776
    25 com.adobe.Photoshop 0x0007813e 0x1000 + 487742
    26 com.adobe.Photoshop 0x0007846c 0x1000 + 488556
    27 com.adobe.Photoshop 0x000d6835 0x1000 + 874549
    28 com.adobe.Photoshop 0x000d6c21 0x1000 + 875553
    29 com.adobe.Photoshop 0x0021973f 0x1000 + 2197311
    30 libstdc++.6.dylib 0x9678010c __gxx_personality_v0 + 1108
    31 libstdc++.6.dylib 0x9678014b std::terminate() + 29
    32 libstdc++.6.dylib 0x96780261 __cxa_throw + 101
    33 libstdc++.6.dylib 0x967805d8 operator new(unsigned long) + 100
    34 libstdc++.6.dylib 0x96780689 operator new[](unsigned long) + 17
    35 Portraiture 0xe0d58a79 CImagePSDataProvider::LoadTile(CImageTile*) + 1211
    36 Portraiture 0xe0d63cce CImagePSTile::LoadData() + 70
    37 Portraiture 0xe0d55be3 CImageFilter::FilterNextTile(CImage*) + 441
    38 Portraiture 0xe0d534ea CImageFilter::CheckForNextTile(CImage*) + 46
    39 Portraiture 0xe0d53574 CImageFilter::OnTimer() + 28
    40 com.apple.CoreFoundation 0x958a2b25 CFRunLoopRunSpecific + 4469
    41 com.apple.CoreFoundation 0x958a2cd8 CFRunLoopRunInMode + 88
    42 com.apple.HIToolbox 0x900ff2c0 RunCurrentEventLoopInMode + 283
    43 com.apple.HIToolbox 0x900ff0d9 ReceiveNextEventCommon + 374
    44 com.apple.HIToolbox 0x9015dc6e _AcquireNextEvent + 58
    45 com.apple.HIToolbox 0x902f1aa9 _RunAppModalLoop + 103
    46 com.apple.HIToolbox 0x902f1c48 RunAppModalLoopForWindow + 96
    47 Portraiture 0xe0d87adc CGenericDialog::DoModal(CGenericDialog*, char const*, bool) + 554
    48 Portraiture 0xe0d66c07 CApplication::DoUI() + 251
    49 Portraiture 0xe0d66f9b CApplication::Run() + 719
    50 Portraiture 0xe0d38851 DoStart() + 217
    51 Portraiture 0xe0d38c45 PluginMain + 761
    52 com.adobe.Photoshop 0x0073cb5a 0x1000 + 7584602
    53 com.adobe.Photoshop 0x00442119 0x1000 + 4460825
    54 com.adobe.Photoshop 0x00446877 0x1000 + 4479095
    55 com.adobe.Photoshop 0x0043fa70 0x1000 + 4450928
    56 com.adobe.Photoshop 0x00444581 0x1000 + 4470145
    57 com.adobe.Photoshop 0x00789fde 0x1000 + 7901150
    58 com.adobe.Photoshop 0x0078a73e 0x1000 + 7903038
    59 com.adobe.Photoshop 0x00440cd6 0x1000 + 4455638
    60 com.adobe.Photoshop 0x00787371 0x1000 + 7889777
    61 com.adobe.Photoshop 0x007876c9 0x1000 + 7890633
    62 com.adobe.Photoshop 0x00440978 0x1000 + 4454776
    63 com.adobe.Photoshop 0x0044453f 0x1000 + 4470079
    64 com.adobe.Photoshop 0x004c1ef6 0x1000 + 4984566
    65 com.adobe.Photoshop 0x004c3301 0x1000 + 4989697
    66 com.adobe.Photoshop 0x000688cb 0x1000 + 424139
    67 com.adobe.Photoshop 0x000676c7 0x1000 + 419527
    68 com.adobe.Photoshop 0x000602ee 0x1000 + 389870
    69 com.adobe.Photoshop 0x0006045d 0x1000 + 390237
    70 com.adobe.Photoshop 0x00060570 0x1000 + 390512
    71 com.adobe.Photoshop 0x00219cd6 0x1000 + 2198742
    72 com.adobe.Photoshop 0x00219d31 0x1000 + 2198833
    73 com.adobe.Photoshop 0x00003272 0x1000 + 8818
    74 com.adobe.Photoshop 0x00003199 0x1000 + 8601
    Thread 1:
    0 libSystem.B.dylib 0x905c11c6 mach_msg_trap + 10
    1 libSystem.B.dylib 0x905c89bc mach_msg + 72
    2 ...ple.CoreServices.CarbonCore 0x95dcd56b TS_exception_listener_thread + 155
    3 libSystem.B.dylib 0x905f2095 _pthread_start + 321
    4 libSystem.B.dylib 0x905f1f52 thread_start + 34
    Thread 2:
    0 libSystem.B.dylib 0x905c1226 semaphore_timedwait_signal_trap + 10
    1 libSystem.B.dylib 0x905f31ef _pthread_cond_wait + 1244
    2 libSystem.B.dylib 0x905f4a73 pthread_cond_timedwait_relative_np + 47
    3 com.apple.Foundation 0x947db75c -[NSCondition waitUntilDate:] + 236
    4 com.apple.Foundation 0x947db570 -[NSConditionLock lockWhenCondition:beforeDate:] + 144
    5 com.apple.Foundation 0x947db4d5 -[NSConditionLock lockWhenCondition:] + 69
    6 com.adobe.Photoshop 0x00e70db5 0x1000 + 15138229
    7 com.adobe.Photoshop 0x00e0c611 0x1000 + 14726673
    8 com.adobe.Photoshop 0x00e6f2e0 0x1000 + 15131360
    9 com.apple.Foundation 0x947957ed -[NSThread main] + 45
    10 com.apple.Foundation 0x94795394 __NSThread__main__ + 308
    11 libSystem.B.dylib 0x905f2095 _pthread_start + 321
    12 libSystem.B.dylib 0x905f1f52 thread_start + 34
    Thread 3:
    0 libSystem.B.dylib 0x905c121a semaphore_timedwait_trap + 10
    1 ...ple.CoreServices.CarbonCore 0x95e024c3 MPWaitOnSemaphore + 125
    2 MultiProcessor Support 0x1ab5f06b 0x1ab29000 + 221291
    3 ...ple.CoreServices.CarbonCore 0x95def10b PrivateMPEntryPoint + 56
    4 libSystem.B

  • Idml open and idml Save As crash InDesign CS6 8.0.1

    I am using:
    2012 MacMini
    Mac OSX 10.8.3
    2.6 GHz Intel Core i7, 8 gb 1600 MHz DDR3
    InDesign CS6
    Version 8.0.1
    I have run software update
    Opening an idml file crashes InDesign.
    Saving a file to idml crashes InDesign.
    Assistance would be very much appreciated.
    Thank you.

    Via Font Book, I checked all fonts with pro in the name. All appear OK.
    I created a new document with nothing in it with same result. My crash report (http://pastebin.com/Rgd5AAHZ) was a little different under VM Regions.
    Do you believe a re-install would solve the issue?
    Thanks again for your help. It is appreciated.

  • SmartStream crashes InDesign CS6

    The SmartStream Designer plugin crashes InDesign every other time I use it. Here is the bug report:
    Process:          
    Adobe InDesign CS6 [382]
    Path:             
    /Applications/Adobe InDesign CS6/Adobe InDesign CS6.app/Contents/MacOS/Adobe InDesign CS6
    Identifier:       
    com.adobe.InDesign
    Version:          
    8.0.0.370 (8000)
    Code Type:        
    X86 (Native)
    Parent Process:   
    ??? [1]
    Responsible:      
    Adobe InDesign CS6 [382]
    Date/Time:        
    2014-12-22 14:20:54.756 -0700
    OS Version:       
    Mac OS X 10.10.1 (14B25)
    Report Version:   
    11
    Time Awake Since Boot: 470 seconds
    Crashed Thread:   
    0  Dispatch queue: com.apple.main-thread
    Exception Type:   
    EXC_BAD_ACCESS (SIGSEGV)
    Exception Codes:  
    KERN_INVALID_ADDRESS at 0x0000000000000003
    VM Regions Near 0x3:
    -->
    __TEXT            
    0000000000001000-0000000000005000 [   16K] r-x/rwx SM=COW  /Applications/Adobe InDesign CS6/Adobe InDesign CS6.app/Contents/MacOS/Adobe InDesign CS6
    Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
    0   com.apple.applescript   
    0x10589e99 CreateStyleMapFromLegacyData(STElement**) + 99
    1   com.apple.applescript   
    0x10589dce TASDialect::SetStyleMapObsolete(STElement**) + 24
    2   com.apple.applescript   
    0x105866fd ASSetSourceStylesLocal(STElement**) + 32
    3   com.apple.CoreServices.CarbonCore    0x97091983 callComponent_4 + 18
    4   com.apple.CoreServices.CarbonCore    0x9707f062 CallComponentFunction + 42
    5   com.apple.applescript   
    0x1057d1d6 AppleScriptComponent + 728
    6   com.apple.CoreServices.CarbonCore    0x96fee848 CallComponent + 190
    7   com.apple.CoreServices.CarbonCore    0x96fee89c CallComponentDispatch + 29
    8   com.apple.openscripting 
    0x90fa39fc OSASetDefaultScriptingComponent + 43
    9   com.apple.openscripting 
    0x90f9b4b3 OSADoIt(short, ComponentInstanceRecord*, FSRef const*, unsigned long, unsigned long, long, unsigned long*, AEDesc*, unsigned char*) + 2772
    10  com.apple.openscripting 
    0x90f9bacf OSALoadFile + 79
    11  com.adobe.InDesign.Support for AppleScript    0x17ad17cf 0x17ac5000 + 51151
    12  com.adobe.InDesign.Support for AppleScript    0x17ad2fd4 0x17ac5000 + 57300
    13  com.adobe.InDesign.Merger.sdk     0x1bcb085b YTDDMEUtils::RunAppleScriptGetMyDocumentsPath() + 939
    14  com.adobe.InDesign.Merger.sdk     0x1bcb0b2b YTDDMEUtils::GetMyDocumentsPath(PMString, PMString) + 43
    15  com.adobe.InDesign.Merger.sdk     0x1bcab216 YTDDMEUtils::GetSmartStreamUserDataPath(PMString, PMString) + 166
    16  com.adobe.InDesign.Merger.sdk     0x1bcae4db YTDDMEUtils::GetImpositionUserPresetsFolderPath(PMString) + 171
    17  com.adobe.InDesign.Imposition UI.sdk    0x1bfb4bb5 YTDImpUtils::getImpUserTemplatesPath(PMString&) + 133
    18  com.adobe.InDesign.Imposition UI.sdk    0x1bf7c091 YTDImpGlobal::buildTemplatesVec() + 209
    19  com.adobe.InDesign.Imposition UI.sdk    0x1bf7c97d YTDImpGlobal::initImpGlobal() + 269
    20  com.adobe.InDesign.Imposition UI.sdk    0x1bf6ac05 YTImpositionDialogController::InitializeDialogFields(IActiveContext*) + 37
    21  WidgetBinLib.dylib      
    0x00034b4d CDialogController::InitializeDialog(IActiveContext*) + 61
    22  com.adobe.InDesign.Widgets  
    0x158a560d 0x1588e000 + 95757
    23  com.adobe.InDesign.Widgets  
    0x158a4c4e 0x1588e000 + 93262
    24  com.adobe.InDesign.Imposition UI.sdk    0x1bf68313 YTDImpActionComponent::DoImpositionDialog() + 387
    25  com.adobe.InDesign.Actions  
    0x1a859bc4 GetPlugIn + 19908
    26  com.adobe.InDesign.Actions  
    0x1a85e7b2 GetPlugIn + 39346
    27  com.adobe.InDesign.AppFramework    0x11620614 0x11610000 + 67092
    28  com.apple.HIToolbox     
    0x9401d5d4 _InvokeEventHandlerUPP(OpaqueEventHandlerCallRef*, OpaqueEventRef*, void*, long (*)(OpaqueEventHandlerCallRef*, OpaqueEventRef*, void*)) + 36
    29  com.apple.HIToolbox     
    0x93e67501 DispatchEventToHandlers(EventTargetRec*, OpaqueEventRef*, HandlerCallRec*) + 2291
    30  com.apple.HIToolbox     
    0x93e664dc SendEventToEventTargetInternal(OpaqueEventRef*, OpaqueEventTargetRef*, HandlerCallRec*) + 402
    31  com.apple.HIToolbox     
    0x93e79d25 SendEventToEventTarget + 88
    32  com.adobe.InDesign.AppFramework    0x1161ee21 0x11610000 + 60961
    33  com.adobe.InDesign.AppFramework    0x1163d327 GetPlugIn + 12007
    34  com.adobe.InDesign      
    0x00001ec5 main + 341
    35  com.adobe.InDesign      
    0x00001d55 start + 53
    That is just the first chunk of text that seemed relevant to the crash. If more is needed I can easily recreate the scenario and get the whole report.
    I initially tried using the latest release of Indesign CS6 (8.0.2) with the same results. I thought that going to a previous version would help. If anyone can make sense of the text above, it would be greatly appreciated.
    Thanks,
    Dan

    Hi Danariotti,
    My workmate and I are having the same problem here, with the same report you are getting with Indesign CS6.
    This started with the upgrade to Yosemite, so we trialled the latest update to Smartstream with Adobe Indesign CC 2014 but this caused the programme to shutdown as soon as you start running indesign. I am hesitant to fully upgrade our Smartstream, as it is expensive for an unstable plug-in. The problem we are having is Adobe blame HP Smartstream and they blame Apple and back around again, we don't seem to get much support. Can you tell me if you get an answer to this please.
    Cheers Tony

Maybe you are looking for