Tao
Tao
> @ntdiary can you take a look at [this PR](https://github.com/Expensify/App/pull/51855) and see if it's causing the problem? @garrettmknight, I think this issue wasn't introduced by that PR. The problem is...
> That is saying to replace UrlPatterns.MARKDOWN_URL_REGEX with UrlPatterns.LOOSE_URL_REGEX, which has a reasonable regexp part. App still gets stuck. 🤔 https://github.com/user-attachments/assets/e6ad59d1-e7b4-4ec2-8219-d62102da8bda
I think it would be better to provide an accurate and clear root cause, it will help us determine how to prevent similar issues in the future. :)
> I have updated [my proposal](https://github.com/Expensify/App/issues/52475#issuecomment-2478497680), with a more accurate root cause. @badeggg, thank you! will review again about 12 hours. :)
> A regexp looks like (\w*)*m can lead to stuck situation Hi, @badeggg, is this a pattern you found in expensify-common, or is it just an example?
> **Notice:** This solution will work fine if the user is pasting a valid video markdown, a valid image markdown or a valid link, but **does not work** if a...
@badeggg, using your primary solution, a few unit tests fail. As for your alternative solution, I don’t think we’d want to simplify url pattern to that extent, since domain name...
> * Guess my description "regexp execution get stuck when too many possibilities before failing" has a formal name: catastrophic backtracking. > * I looked into the regex, the reason...
Under review. still verifying the RCA, will provide an update tomorrow.
@bernhardoj's RCA is accurate, with only a slight difference from what I checked. :) `pause` is called here (in `saveUpdateInformation`), and `shouldPauseQueue` is also set to `true` here: https://github.com/Expensify/App/blob/e453cfd324396fc81b42b234aece97ebeb1e2246/src/libs/Middleware/SaveResponseInOnyx.ts#L38-L45 BTW,...