CS4 Crashes when attempting to change color of characters in story

Below is a function that we have been using since forever. It changes the color of a specified number of characters in a story starting at a specific position in the textmodel.<br /><br />The crash happens when processing the command (immediately after "11" is displayed).<br /><br />classID is kTextAttrColorBoss.<br /><br />Any help would be greatly appreciated.<br /><br />ErrorCode ApplyTextAttributes(ITextModel * pTextModel, int32 position, int32 length, UID swatchUID, ClassID classID)<br />{<br />     ErrorCode rc = kFailure;<br />     do<br />     {<br />          InterfacePtr<ITextAttrUID> textAttrUID_Color(::CreateObject2<ITextAttrUID>(classID));<br />          if (textAttrUID_Color == nil)<br />          {<br />//               ASSERT_FAIL("TSCore::CreateCharStyle: color invalid");<br />//               CAlert::ErrorAlert("textAttrUID obj is nuil");<br />               break;<br />          }<br /><br />          if (swatchUID == kInvalidUID)<br />          {<br />               ASSERT_FAIL("TSCore::CreateCharStyle: ResolveRGBColorSwatch failed");<br />//               CAlert::ErrorAlert("Invalid color UID");<br />               break;<br />          }<br />          <br />          // Set our color attribute and store it:<br />          textAttrUID_Color->SetUIDData(swatchUID);<br />          <br />          InterfacePtr<ICommand> pApplyTextAttrCmd ( Utils<ITextAttrUtils>()->BuildApplyTextAttrCmd(pTextModel, position,  length, textAttrUID_Color, kCharAttrStrandBoss) );<br />          //pApplyTextAttrCmd->SetUndoability(ICommand::kUndoNotRequired);     <br />CAlert::WarningAlert("11");<br />          rc = CmdUtils::ProcessCommand(pApplyTextAttrCmd);<br />CAlert::WarningAlert("12");<br />          if (rc != kSuccess)<br />               CAlert::WarningAlert("Error on ApplyTextAttrCmd");<br />     }while(false);<br />     <br />     return rc;               <br />}

Hi Rick,
I've just been chasing a crash in the Debug version of CS4 InDsign which was asserting with Protective shutdown.
Like you the manifestation was on a call to ProcessCommand.
I don't know if it's the same, but on the off chance I'll detail what I discovered.
I traced back the cause of the crash to an earlier call through our ASB-CSB using the function template and macros, Process and make_functor.
The function template Process which is in the SelectionASBTemplates.tpp sets up a abortable command sequence on the stack.
If the result from the CSB function wasn't kSuccess then the sequence was aborted.
Unfortunately in our CS2 version of the ASB/CSB's we were rather naughtily using the return to pass  a value and not an ErrorCode.
the result was that our call was forcing an abort everytime.
I've duplicated and renamed the Process function at the top of our ASB code and missed out the command sequence and it works fine.
This isn't really the best solution and I'll have to investigate further but at least it solves the crash.
Below is the new version of Process. I hope it helps you (or someone else out).
All the best
Caerwyn  Pearce
#if (CREATIVE_SUITE_VERSION == CS2)
// Use standard function template from SelectionASBTemplates.tpp for CS2.
// It doesn't seem to cause problems, and I'd prefer not to fix it if it's working.
#define ATLASB_Process        Process
#else
//    DESCR:        Call each CSB suite to process the request, wrapping the entire call in a sequence.
//                Compare this with the one in SelectionASBTemplates.tpp.   
//                Essentially I've removed the command sequence, and the possibility of an abort.
//                For some reason this was causing a Protective shutdown in CS4.
//                Also note the abort takes place if the return value from Process is not kSuccess(aka 0).
//                For GetSelection we are returning ATLCSB::SelectionType which has a value of -1, -2 or -3
//                which is most definitely not kSuccess and which was provoking an abort.
//                However that's not the end of the problem, and the line ErrorUtils::PMSetGlobalErrorCode
//                seems to be causing problems else where outside of the Process function template.
//                It may be that our code is not resilient to aborting command sequences.
//    NOTE:        Most definitely doesn't abort the sequence regardless of errors.
//    RETURNS:    Error Code.
template <typename Functor>
typename Functor::result_type ATLASB_Process (Functor& f, typename Functor::argument_type object, PMIID iid)
    InterfacePtr<const IIntegratorTarget>                     iIntegratorTarget (object, UseDefaultIID ());
    std::auto_ptr<IIntegratorTarget::TargetSuiteCollection> selectionSuites (iIntegratorTarget->GetTarget (iid));
    ErrorCode                                                errorCode = kSuccess;
    if (!selectionSuites->empty())
        for (int32 i = selectionSuites->size () - 1; i >= 0 && errorCode == kSuccess; i--)
            typename Functor::argument_type        iUnknown = static_cast<typename Functor::argument_type>(static_cast<IPMUnknown*>((*selectionSuites) [i]));
            errorCode = f(iUnknown);
    return (errorCode);
template <typename Functor>
typename Functor::result_type ATLASB_Process (Functor& f, typename Functor::argument_type object)
    return (ATLASB_Process (f, object, GetDefaultIID (object)));
#endif

Similar Messages

  • PS CS4 crash when attempting to view preferences

    Hi all,
    I’m running Photoshop CS4 on Windows XP (32bit). Photoshop itself seems to work fine, but if I try to view certain menus such as preferences, it will display the  “CS4 has encountered an error and needs to close” message before crashing out. Any idea why?
    I thought that perhaps it could be that my PC doesn’t have the specs to handle CS4, but it seems to work just fine.
    I can’t use rotate view, but if I go to change my graphics card settings in preferences to allow use of open GL, that’s when PS crashes.
    I also have the “encountered a problem with the display drive, and has temporarily disabled GPU enhancements” message.
    Any advice would be much appreciated.

    Update your graphics driver! Pretty clearly it is bunked up and not correctly installed at all or hopelessly misconfigured...
    Mylenium

  • IDVD crashing when attempting to change font in Theme

    Hi, all:
    I'm writing on behalf of my 13-year-old daughter, who with a friend used iMovie HD to make a movie for a school project, and then used iDVD '08 to burn that project to a disc. She's had to edit the movie a bit, and has shared the edited version with iDVD, but is now having a problem. Here's her exact e-mail to me (I'm in Europe right now; she's at home in the US)...
    "hey i had to do a few touch ups to the movie that me and jill made, and every time a tried 2 share it 2 idvd, it worked, but when i tried 2 change the font on the themes thingy, it always said, "idvd has to close unexpectedly. we apologize for the inconvenience." or something like that that made me have 2 force quit it more than once. dont panic, the new version of the movie is still saved on imovie, but i dont know whats wrong with the other thing. please email me back ASAP! xoxo"
    TIA for your help & suggestions!
    Bill from CT (but in France)

    Just an additional thought to add to Glo H's excellent recommendation.....if your daughter sends her movie to iDVD and then needs to change anything in the movie, iDVD will recognize that something has changed and ask if it should update. And you think, nice, all is well. But, if you have chapter markers in the movie, iDVD will not 'update' properly. If you don't know this, you will see iDVD going ahead and encoding and burning, but the DVD disk will not play correctly. From the chapter marker nearest the change, all further chapter selections will default to that one.
    I have had this happen three times now, and it has been with iDVD8. The previous version made the changes appropriately. The last time the only change I made was to change the spelling in a title! The other changes were to delete one song in an audio track and add another.
    The only way to fix it was to create a new iDVD project and drop the movie in again.
    I am using iMovie 6. Maybe iMovie 8 or 9 would be different. I just wanted to caution you. I know how difficult it can be to provide your kids with assistance from a distance. Mine used to call from college and it took at least 20 minutes just to figure out what they were doing......then I had to find the answer!

  • Muse crashes when attempting to change font

    Hi,
    Just tested Muse from Creative Cloud and can't past changing fonts. Each time I try, the app crashes.
    Removed all duplicate and corrupt fonts with Font Book, restarted, but crashing persists.
    Any advice on font management using Muse would be appreciated.
    Thanks,
    Chris
    Macbook Pro, OSX 10.8.4, 2.8GHz, 8GB RAM
    Muse v4.1, Build 8, CL 77415
    AIR Runtime:3.6.05970

    Unrelated.
    LolliMotion has an old version of AIR with a bug that causes Muse to crash.
    Topelovely, please delete the two "tk" folders within the AdobeMusePrelease folder structure in Preferences (on Mac) or (%localappdata% on Windows).
    <from my phone>

  • Help: photoshop cs4 crashes when i drag a layer under or over another layer/try to change layer orde

    help: photoshop cs4 crashes when i drag a layer under or over another layer/try to change layer order
    this problem orcurred suddenly after having used the programm for years.
    i tried to reinstall cs4 and install all available updates, but it di not help...
    please help ! thanks

    What is the exact version and what’s your OS?
    What does the crash report state?
    Boilerplate-text:
    Are Photoshop and OS fully updated and have you performed the usual trouble-shooting routines (trashing prefs by pressing command-alt-shift/ctrl-alt-shift while starting Photoshop until the appropriate dialog appears after making sure all customized presets like Actions, Patterns, Brushes etc. have been saved and making a note of the Preferences you’ve changed, 3rd party plug-ins deactivation, system maintenance, cleaning caches, font validation, etc.)

  • Application Crashes/Quits when attempting to change sequence settings

    Application (Final Cut Pro 4) suddenly quits/crashes when attempting to changwe sequence settings. How can this be fixed.
    Also changes made in "user preferences", "timeline options" are not saved.
    Also, audio wave forms no longer show up in "timeline".

    Welcome to the discussions, Streetart.
    This was a bug in 4.0 - you need to upgrade to at least 4.1 to fix it - you can go all the way to 4.5 for free...
    Patrick

  • Illustrator CS4 crashes when I attempt to print with Mountain Lion 10.8.2

    Illustrator CS4 crashes when I attempt to print with Mountain Lion 10.8.2.
    Two questions:
    1. Does any one else have this problem?
    2. My version of Illustrator is 14.0.0. Is there a later version?
    Jim

    2. My version of Illustrator is 14.0.0. Is there a later version?
    Nope, there were no update for Illustrator 14.
    however yes if I have got it right then the Kb link should help you.
    http://helpx.adobe.com/x-productkb/multi/crash-printing-illustrator-indesign-cs3.html

  • Have downloaded new Lightroom 5.4 from CC. When trying to launch am getting following error message and then Lightroom crashes: "an error occurred when attempting to change modules". Can't find a thread which relates to this error message.

    Have downloaded new Lightroom 5.4 from CC. When trying to launch am getting following error message and then Lightroom crashes: "an error occurred when attempting to change modules". Can't find a thread which relates to this error message.

    Hi 99jon,
    Many thanks for that. Had been going through this list yesterday and now again today:
    Ref  Solution 1: Lightroom is at its latest update
    Ref  Solution 2: It's interesting how I cannot find the Preferences file anywhere on my mac. (new mac pro, OS 10/9.2) . . .
    Ref  Solution 3: Lightroom doesn't allow me to do anything after the error message appears
    Ref  Solution 4: don't have any Nik Software plug-ins
    Ref  Solution 5: checked permissions and changed all to "Read & Write" - makes no difference
    Ref  Solution 6: I don't have a different user account on my mac.
    Not sure what else to do.

  • InDesign CS4 crashes when selecting New Color Swatch

    Any idea why InDesign would be crashing when I select New Color Swatch?  I can Load Color Swatches or choose from the swatched in the menu, but if I try to add a new color it crashes no matter what type of document I am working on.

    This is the sort of error, if happening in all files, that is usually fixed if you Replace Your Preferences

  • CS4 Crashes when copying effects

    Every once in a while, AE CS4 crashes when I attempt to copy one or more effects from a composition. It's unpredictable, it works fine 10-20 times, then crashes. It happens whether I use the keyboard shortcut or the edit menu. It's happened 15 times in the last few days (I'm color grading a feature film), and despite my best efforts, I've found no solution to this rather annoying problem. Fortunately I haven't lost any progress, as it successfully saves during crash, but the long time it takes to reopen the project is seriously slowing down my work, and I have a deadline approaching fast.
    CS4 Master Collection
    Windows 7 Home Edition x64
    12GB ram
    Core i7 980x Extreme
    An error message appears, I think it usually says something about ae.blitpipe being the last thing sent. I've tried it in numerous compatibility modes, some seem to work better than others, but they all eventually crash.
    Let me know what additional information you need to help me work through this problem, it's making my job very frustrating.

    The usual combination is:
    Halsubalance (Pixel Bender)
    HDR Highlight Compression
    Linear_Vignette (Pixel Bender)
    Curves
    Hue/Saturation
    However the crash has also happened when copying just one or a subset of these filters.
    Color space: 16bpc, HDTV (Rec.709)
    I've considered the Animation Preset route, but with the number of scenes/shots in the project and the frequent changes I have to make, it seems like it would quickly become very unwieldy. I may go that route regardless if there is no other option, but I would really like to fix the copy/paste situation.

  • Lightroom 4: An error occurred when attempting to change modules.

    I downloaded Lightroom 4 a few days ago and installed it on my MacBook Pro. Everything worked great. I thought it would overwrite Lightroom 3, but it didn't. So Lightroom 3 is still installed, but I haven't opened it since I installed Lightroom 4.
    I downloaded Lightroom 4.3 this morning and installed it on the same MacBook Pro.  Using my MacBook Pro and a second monitor, I opened Lightroom 4.3 and worked on some photos. Everything worked great.
    Then I began watching a slideshow in the Lightroom 4.3 slideshow module on the second monitor with my MacBook Pro in the library module. During the slideshow I clicked on the slideshow module on my MacBook Pro and got this error message:
    An error occurred when attempting to change modules.
    Now I can’t get into the slideshow module. I just get the error message.
    I moved the preferences file to the trash and reopened Lightroom 4 but lost color labels, so I put it back in the preferences folder.
    Thanks for your help

    I called Adobe and let them fiddle online with Lightroom on my MacBook Pro. The Adobe tech claims I have a corrupt permissions file. He told me to contact Apple and have them rebuild my permissions file.
    When I contacted Apple, the tech said to startup my MackBook Pro with the option key held down until the first screen appears. Then click on: Recovery HD, arrow, Language, Disk Utility, Macintosh HD, Repair Disk Permissions.
    I did this three times, but some permissions were not repaired. Another Apple tech then suggested I bring my MackBook Pro to a Macintosh authorized repair shop, and have them repair my permissions file. I asked if I can buy Norton Utilities or a similar program and do it myself. The Apple tech said yes, but an authorized repair person will know which permissions to repair and which ones not to touch.
    Unless someone on this forum can tell me how to do this repair myself, I’ll get it repaired next week. And, I’ll post the results as soon as I can.

  • Purchased Light Room 5, installed, registered .. but keep getting this screen "An error occurred when attempting to change modules. ... OK" ?? WTF? ?

    Installed Light Room 5.2 from Disc on my mac os x (latest, updated version)
    But keep getting this "An error occurred when attempting to change modules.. OK" no other options/selection and of course if I click OK ... it crashed out ...
    Can anyone help?
    For such a big company .. there isn't any chat option to get to someone to talk to  !!!

    Just because you are the only user on the computer doesn't mean you are the administrator.
    Also, the fact that you are being asked to re-enter your serial number each time you start means that it is not being remembered because something is either preventing it from being written to you disk or (less likely) something is erasing it. This does suggest that you lack certain permissions to make changes to your computer. Not only to save your serial number, but to have access to the Lightroom files needed to change modules (they are just plug-ins within Lightroom).
    Try creating a new user account and run Lightroom from there (making sure that it is part of the Administrator group).
    To get to chat support, you have to choose the options:

  • Acrobat 9.4.4 Pro Crashes When Attempting to Open PDF Form

    OS: Win XP Pro SP3
    The  machine worked fine until Acrobat updated itself to 9.4.4 then the  problem started.  Crashes when attempting to open most PDF Forms - even  when freshly rebooted or repaired.  I originally thought it was related  to a browser or Outlook 2007, but later found that it does it under all  circumstances.  It is my General Manager's machine having the problem,  so I need to get this resolved ASAP.  Your experience and assistance is  much appreciated.
    My temporary fix was to uninstall 9.4.4 - Install 9.0  and turn off automatic updates - worked beautifully.  It would be nice to get to the bottom of this so we can update our CS4 products.
    Another user reported this problem on May 16, 2011 and no one has replied to his post.
    Thanks in advance.

    Please repost in the Acrobat Windows forum.
    http://forums.adobe.com/community/acrobat/acrobat_windows

  • InDesign CS4 crash when printing .."macromedia" apparent culprit..

    (Sorry if this has found its way to the wrong advice Forum: I can't seem to find a way to the appropriate InDesign CS4 "Community" to post it in!)
    My Mac version of InDesign CS4 version 6.0.6 has begun crashing when attempting to print.
    The Crash Log shows the particular crashed thread to always include the line:
    com.macromedia.Flash Player.authplaylib    0x1c5ac2dd ExternalPlayer_Initialize  +  1864739
    ..which is repeated a further twice, with various similar numbers just before and after "ExternalPlayer_Initialize".
    I assume that this is a problem with InDesign calling "macromedia.Flash Player" instead of Adobe Flash Player, but I have no idea where or how to modify the phrase "macromedia.Flash Player" to encourage the program to run correctly.
    NOTE ALSO: That the program was installed on a Mac which had been lost, and was subsequently found and returned, but in the meantime we'd bought a replacement Mac. InDesign was then UNinstalled from the originally-lost Mac, and a full previous backup of that Mac was then restored onto the new Mac so that it was a complete copy of the original (..thus abiding by usage restrictions..)
    After the program was restored onto the new Mac it longer Prints.
    Any help or suggestions, please?

    Thanks for your quick reply!
    I'll hunt for pastebin.com and put a copy of the crash log there, and will reply here when I've done that.
    Meanwhile, regarding restoring, it was the entire Mac contents which were restored, not just the Applications folder (..this was a new Mac which was being "cloned" from the previous backup..) so all the attendant files, hidden here and there, would also have been restored back to their appropriate places as well!
    I'll go and place a crash log at pastebin.com now. Many thanks!

  • Another "An error occurred when attempting to change modules" error

    Hello all:
    After using Adobe Photoshop Lightroom on Mac OSX trouble free for the past 6 months, I opened up Lightroom today and received the following error: "An error occurred when attempting to change modules." I had not made any changes in between when it worked normally and when the error started to occur. I beleive the last thing I did before this error occurred was to go into the Print Module.
    Other information--I keep all my RAW .NEF files on an external Firewire (800) 750 GB drive. This is on Mac OS X 10.5 running Adobe Photoshop Lightroom 1.3 and also with 1.4.1. I'm running an iMac 20" with dual-core 2.2 Ghz Intel processors and 4 GB of RAM. I have around 25k images total.
    When I noticed this problem, I was on Lightroom 1.3. I immediately upgraded to 1.4.1, which did not solve the problem. I have also tried many suggestions in the forums including uninstalling the application and removing the .plist file.
    I thought I had come up with a solution by creating a new catalog, then importing the former into it. While this seems to work immediately after the import process, as soon as I close it, the problem manifests itself again.
    More details that may or (likely) may not help:
    - Going to the Develop and Print Modules gives me no problems. However, when I click on Library, Slideshow, or Web, I see the error.
    - I upgraded my Mac to the latest patch level after observing this error to no avail.
    So it looks like my choices are to create a new file and reimport every single time, or lose all of the work I've done for the past 6 months on thousands of images.
    Can anyone please help???? I promise to post the solution when we fix this darn thing so others may benefit. I'd be happy to run through any troubleshooting that y'all would suggest outside of switching to a Canon.
    Thanks!!!!
    Matt

    I'd first check for the existence of a file ending in .lock, which should be present when LR is in use, but if it exists when LR is quit, it can cause problems, and should be deleted.
    Please post back your results.

Maybe you are looking for

  • URGENT!!!! - select open items from DFKKOP

    Hello experts, I have one big problem. I need to select lots of data using contract account or business partner (the best will be to have FM where is a range of CA or BP at the entry) from DFKKOP (millions..) and the FM FKK_LINE_ITEMS_WITH_SELECTION

  • Read Only Tablespace Backup Issue

    Hii!! I had been trying to to take Read Only Table space Backup. So, firstly changed the tablespace using SQL> alter tablespace users read only; Tablespace altered. 2. Then took backup of all the data files using OS Copy command. Now , the issue i am

  • AD SSO NAC issue

    Dear All, 1) I have configured AD SSO and users gets authenticated. But when the user puts his credentials in windows machines, it takes minimum 5 minutes for the person to log in and also for the nac agent popping up. I disabled the ADSSO and the us

  • Performance root cause

    hi Team, We have XI 7.0 running and 6 hours back we had experienced slowness in message processing. But over period of time, the overall performance back to normal. So now i need analysis why there was slowness in message processing. Please help me w

  • Print during BAPI call in backround

    Hi all... I am creating 351 movement using BAPI_GOODSMVT_CREATE in backround,during transfer Order confirmation...I want to print the details after job as been completed,is there any option to give in the BAPI function module... Note: If I do manuall