lainsce / quilter

[DEPRECATED] Focus on your writing.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[crash] Quilter crashes when switching to preview

janxkoci opened this issue · comments

Hi, I'm drafting my thesis using Quilter and it crashes everytime I try to preview the file. I attached a backtrace I saved a few days ago.

The file has quite simple structure, some headings, bullet lists (nested with max 2 levels), italics & bold, and few quotes. No images, tables or even links. If I try to preview even simpler files, just text with no markup, Quilter is able to preview them, so I guess the issue is with rendering markdown.

EDIT: In the attached file I first run Quilter from terminal to catch warnings and then I run the coredumpctl tool. Line 5 is where I pressed F1 to enter preview.

quilter-error-backtrace.txt

commented

Is this with AppCenter's version? If so, I fixed this on the PR that's here. Maybe I should do an update with only these fixes to help people out.

commented

Should be fixed in 2.5.0

Yes, this was the AppCenter version. I will check it when the update arrives, thanks.

Hi! This error is still present on 2.5.0:

(com.github.lainsce.quilter:7865): Gdk-ERROR **: 09:44:16.655: The program 'com.github.lainsce.quilter' received an X Window System error.
This probably reflects a bug in the program.
The error was 'BadAlloc (insufficient resources for operation)'.
  (Details: serial 3322 error_code 11 request_code 53 (core protocol) minor_code 0)
  (Note to programmers: normally, X errors are reported asynchronously;
   that is, you will receive the error a while after causing it.
   To debug your program, run it with the GDK_SYNCHRONIZE environment
   variable to change this behavior. You can then get a meaningful
   backtrace from your debugger if you break on the gdk_x_error() function.)
Trace/breakpoint trap

This is the full output. I can provide the md file if needed.

So for me the crash is gone, but the preview is empty, with just a super long scrolling canvas. If I open simpler files, the preview works, but I haven't been able to figure out if it's a problem with particular syntax or something else - Short dummy file with the same syntax elements works okay. Maybe the problem is file size or length of the document - I only noticed the issue with longer texts.

Anyway, I will do some testing on longer documents and open a new issue if I find something.

commented

I'll look into this, I'm sure I fixed this on Quilter Next, so a backport is in order.

I don't think its a syntax problem, I'm using a basic syntax on my document. I've been testing with a sample file, and I believe its related to the size of the document after you load it:

I started with a small sample text (~ 8kB) and added new paragraphs, testing the preview after each one. Around the ~11 kB, I closed the document (the preview worked fine), and after loading it again it was broken.

I deleted each paragraph and test the preview, it kept not working until I reach a point (~8kB) where the preview worked AFTER I loaded the document again (so it didn't work after I deleted the paragraph, but worked when I closed and opened it again).

commented

I already backported the fix to the 2.5.0 version. Weird...

I'll bring more stuff back that might help fix this.

Just got the update to 2.5.0 and the preview now works flawlessly - Quilter now rocks again! Thanks!

Edit: sorry I have 2.5.1 now. The AppCenter reports the updates' versions oddly sometimes.

commented

Nice! 😎