Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Bug: Stata 18 MP4 (15nov2023) crashes on regexmatch() in gen on MacOS

    Good day! I'm sorry to bring up the topic of crashing again, but I'm experiencing problems with this line of code:
    Code:
     cap gen D_FVA = regexmatch(ROW, "^IMP_")
    Stata 18 MP4 (15nov2023) crashes on it both in CLI and in GUI, no errors are displayed. I have MacOS of the latest version.

    On the contrary,
    Code:
     list if regexmatch(ROW, "^IMP_")
    and
    Code:
     drop if regexmatch(ROW, "^IMP_")
    work fine.

    Maybe the issue can be fixed in future updates? Thank you!
    Last edited by Ilya Bolotov; 01 Dec 2023, 13:36.

  • #2
    This is a bug. The newly introduced (Stata18) regexmatch() function, when run in StataMP and if the dataset is large enough to trigger parallelized code, will crash Stata. We will get it fixed in the next update. Meanwhile, you can use ustrregexm() as a work around:

    Code:
     
     cap gen D_FVA =  ustrregexm(ROW, "^IMP_")

    Comment


    • #3
      Originally posted by Hua Peng (StataCorp) View Post
      This is a bug. The newly introduced (Stata18) regexmatch() function, when run in StataMP and if the dataset is large enough to trigger parallelized code, will crash Stata. We will get it fixed in the next update. Meanwhile, you can use ustrregexm() as a work around:
      Code:
      cap gen D_FVA = ustrregexm(ROW, "^IMP_")
      Thanks! I used:
      Code:
      cap gen D_FVA = strpos(ROW, "IMP_") == 1

      Comment

      Working...
      X