konrad1977 / loco

A linter for Swift Localizations
MIT License
73 stars 2 forks source link

Swift/UnsafeBufferPointer.swift:898: Fatal error #1

Closed ryanisnhp closed 2 years ago

ryanisnhp commented 2 years ago

Hi bro I just clone and use this one and it crash with this error, can you help me to check this

Screen Shot 2022-07-27 at 17 54 29
konrad1977 commented 2 years ago

I´ve seen the error while developing but I can not reproduce (nor on X86 or Apple Silicon). Is this a public repo? Can you reproduce it everytime?

ryanisnhp commented 2 years ago

No, it's a private project so I cannot share, but I try on 3 different laptops ( all of them is chip M1) but not work

konrad1977 commented 2 years ago

Coud you try adding the path to the scheme (Edit Scheme | Options -> Working Directory] in Xcode and see if you get more info from the LLDB when running the program directoy from within Xcode.

I am running Loco on my M1 Pro with M1 Pro chip just fine. Ill do a few more checks, but I will be away for a week or two right now. If you find the bug please do a Pull Request.

aokj4ck commented 2 years ago

I'm seeing the same issue on an M1 Mac.

Steps to reproduce:

git clone git@github.com:konrad1977/loco.git
swift build
# At this time .build/debug is an alias directory to .build/arm64-apple-macosx/debug/
# When I invoke the executable in an Xcode project directory it using the full path
# /Users/jack/dev/loco/.build/arm64-apple-macosx/debug/loco
Swift/UnsafeBufferPointer.swift:898: Fatal error
[1]    50049 trace trap  /Users/jack/dev/loco/.build/arm64-apple-macosx/debug/loco
konrad1977 commented 2 years ago

I updated the repo today, could you please check if you can reproduce it again?

aokj4ck commented 2 years ago

Yes that worked for me building from Terminal. Thank you!

What are the steps to build a flat file binary for regular usage? If I move .build/arm64-apple-macosx/debug/loco will it have everything it needs to execute? I can try moving it and open new issue.

konrad1977 commented 2 years ago
cd /loco
swift build -c release

This should produce a release binary. Put it in /usr/local/bin and you are ready to go

ryanisnhp commented 2 years ago

just checked, it works on my side also

konrad1977 commented 2 years ago

I am closing this bug then. Happy linting and thanks for reporting the bug!