this post was submitted on 09 Aug 2023
7 points (88.9% liked)
Avelon App
205 readers
1 users here now
Official community for the native iOS Lemmy app Avelon.
Available on the App Store!
Download Avelon
Wanna be a beta tester and see new features early?
Rules
- Posts should be related to the Avelon app in some way. Be civil :)
- If you have a feature request/bug report, mark the post with [Feature Request] or [Bug]. That way they're easier to find for everyone!
- If you're reporting a bug, please include the iOS version, Avelon version, the device you're using, and any steps necessary to reproduce the bug. Screenshots are also very helpful. The more information you include, the quicker the bug can be squashed! Thanks!
founded 1 year ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
Hi, thanks for reporting this bug. My phone doesn't freeze, but the post caused the app to crash yeah. Uploading a build that fixes the problem now.
For anyone interested in dev stuff, this issue was caused by an infinite loop in the regex replace function in swift. A part of my comment processing code fixes a few markdown issues where people often place an image inline that should actually be a big regular image. I forgot a single character in the regex that in some very rare circumstances (like the post you mentioned) caused the matcher to create another string that also matched, which is then replaced again, and again and again and again. Regex is great.
Works now!
Kinda ironic that this little bug guy caused the biggest bug in Avelon so far.
Best developer, thank you so much
Regular expressions at the input boundary eh? You should give this video a look: https://youtu.be/LLkbzt4ms6M?si=h71e7ZozcZAUGXil
Haven’t given it a try but you should check something like this out: https://github.com/tryswift/TryParsec
or
https://github.com/aaaron7/swift_monadic_parser
You realize you have a problem that you can solve with regex. Now you have two problems 😂
Great work on the app. It’s gotten to a point where I’m considering switching to it as my main (from Memmy/Voyager). I’m really enjoying the UI.