Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Application hangs with files with very long lines #40

Open
marzulo opened this issue Aug 9, 2024 · 4 comments
Open

Application hangs with files with very long lines #40

marzulo opened this issue Aug 9, 2024 · 4 comments
Assignees
Labels
bug Something isn't working

Comments

@marzulo
Copy link

marzulo commented Aug 9, 2024

The app is hanging when open more than 10 files with big files or files without LF

@RobertoMachorro
Copy link
Owner

In order to reproduce this issue, could you share the file size in bytes?
Are all the lines without LF or just some lines?
Thanks!

@RobertoMachorro RobertoMachorro self-assigned this Aug 13, 2024
@RobertoMachorro RobertoMachorro added the bug Something isn't working label Aug 13, 2024
@marzulo
Copy link
Author

marzulo commented Aug 20, 2024

Hi Roberto, the file contains only one line without LF at the end (Create View statement for MySQL DB), with 2.523.850 bytes... I was trying to work on ident the T-SQL code but Moped do not like this file and hangs and after a while crashes... I am using Apple M2 Max with 64GB.

@RobertoMachorro
Copy link
Owner

Thanks, I'll test with a similar file. Moped wasn't really meant to handle large files, but that size should be OK. Will get back to you.

@RobertoMachorro
Copy link
Owner

RobertoMachorro commented Aug 21, 2024

I haven't been able to reproduce the issue, I have some thoughts on what may be happening:

  1. Does the file have mixed Unix/Windows end-of-lines? (CR vs LF/CR)
  2. The syntax formatter is failing on some expression and causing the application to crash. This would be specific to your content.
  3. The file is too big and complex for the formatter.

If you have the time and are able to, could you check your file with a hex editor for the line endings?
Would you be able to duplicate the file, then on the duplicate, remove chunks of text until it opens? When it opens, open separately the removed text - does that crash?

It's big ask, and will help debug the issue. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants