LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Regular Expression causes LabVIEW crash

This VI causes my LV 2021 32bit to crash, but not with 64bit LV. Is there something wrong with the regex itself? On regex101 it works flawlessly.

0 Kudos
Message 1 of 6
(1,509 Views)

Even it crashes LV2023 (32bit).

 

Note: I don't have 64bit installed

----------------------------------------------------------------------------------------------------------------
Palanivel Thiruvenkadam | பழனிவேல் திருவெங்கடம்
LabVIEW™ Champion |Certified LabVIEW™ Architect |Certified TestStand Developer

Kidlin's Law -If you can write the problem down clearly then the matter is half solved.
-----------------------------------------------------------------------------------------------------------------
0 Kudos
Message 2 of 6
(1,504 Views)

Some more investigation - if I shorten the string part between the "recipeAttributeList", it works and executes in no time. I did some benchmark with putting more and more text in the string input and for me it stops working at ~ 2780 characters, see the example. No memory raise detected.

0 Kudos
Message 3 of 6
(1,492 Views)

I have a regex example that crashes LabVIEW 2022Q3 64 bits by calling Search and Replace String.

Pretty sure some excessive greedy backtracking is causing the problem and we've replaced this with something that doesn't crash, though maybe LabVIEW could just error out somehow and not go puff.

0 Kudos
Message 4 of 6
(55 Views)

Is it a crash or does it just return an error? LV regex I think is based on PCRE so will return an error on encountering a null character.

Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
0 Kudos
Message 5 of 6
(48 Views)

@billko wrote:

Is it a crash or does it just return an error? LV regex I think is based on PCRE so will return an error on encountering a null character.


Hard crash.  No nulls in the string.  Probably recursion / out of stack space when doing greedy backtracking.

0 Kudos
Message 6 of 6
(44 Views)