How can we improve Adobe InDesign SDK

Indesign crash with findGrep()

findGrep() causes a crash with the following terms:
"w?"
“\\w?”
“h?”
“w?i?”
...

e.g.:
app.findGrepPreferences = NothingEnum.nothing;
app.changeGrepPreferences = NothingEnum.nothing;
app.findGrepPreferences.findWhat = "w?";
var _result = app.activeDocument.findGrep();

4 votes
Sign in
Check!
(thinking…)
Reset
or sign in with
  • facebook
  • google
    Password icon
    Signed in as (Sign out)

    We’ll send you updates on this idea

    Roland Dreger shared this idea  ·   ·  Flag idea as inappropriate…  ·  Admin →

    3 comments

    Sign in
    Check!
    (thinking…)
    Reset
    or sign in with
    • facebook
    • google
      Password icon
      Signed in as (Sign out)
      Submitting...
      • Roland Dreger commented  ·   ·  Flag as inappropriate

        Hi Uwe,

        thanks for confirming the issue and the tests. I didn't pay attention to memory consumption on my last test. If I remember correctly, InDesign crashed completely in the previous versions. Now it freezes.

        This bug is especially annoying if you create scripts with regular expressions input fields for search. Again and again workarounds.

        changeGrep() does not cause problems with the same expressions.

        Roland

      • Uwe Laubender commented  ·   ·  Flag as inappropriate

        What I also see on my machine when testing GREP "w?" with InDesign CC 2018.1:

        Memory consumption goes way up for task "Adobe InDesign CC 2018" as shown in the task manager. After a little while non-reacting InDesign is using more than 50% of my memory, constantly increasing. After two minutes 60% of RAM. So I had to kill the process, because I did not want my machine to crash. Fan is also whirling like mad. Have 68 GByte of RAM installed.

        Regards,
        Uwe Laubender
        ( ACP )

      • Uwe Laubender commented  ·   ·  Flag as inappropriate

        Hi Roland,
        there's already a strange behavior if you are use the findWhat field for GREP in the UI and look for "w?" and there is nothing in the change field. Or formatting change is not defined. The first insertion point of a story is found. And then nothing on, even if there is a "w" somewhere in the text of the same story. ( Tested with CS6 and CC 2018.1 on Windows 10 (1803)).

        And yes, I can confirm, that InDesign is freezing.

        Regards,
        Uwe Laubender
        ( ACP )

      Feedback and Knowledge Base