[LH4572] [RC6] Scrivener crashes if composition mode is opened multiple times.

Don’t ask how I triggered this specific scenario, but there is a bug that causes the whole application to crash.

Just press F11 - ESC - F11 - ESC in rapid succession and booom.

Confirmed this. In my case, I’d set the keystroke for composition mode to F10. So F10 - Esc - (repeat until crash. Doesn’t take long).

Minidump attached.
ebf4afd7-f482-4fc8-b2e7-4d86550cd80f.zip (27.3 KB)

Sorry, I wasn’t able to duplicate this after banging away at it for almost 5 minutes. My fingers got tired and crashed without getting the program to crash. :frowning:

I can confirm that holding down the Composition mode key and letting it cycle as it repeats does NOT cause the crash. It’s something with the Esc key. Hmm. I wonder.

Crashed it again. The repeats have to be done at speed, which leads me to suspect some sort of buffer overflow and a slow clearance rate of the command queue in this case.
dcea678d-a8fd-49ff-8abd-7f6c7aab5bf5.zip (22.3 KB)

I was doing the F11-ESC-F11-ESC sequence and didn’t get a crash. Don’t get a crash with the F11 cycle either. Maybe I am not able to overflow my keyboard buffer? Might be interesting to try it on my Surface Pro at home - it is not quite as uber as my work PC.

I was able to reproduce it but I had to go berserk on my keyboard.

Thanks, this has been filed. In the meanwhile as a workaround I’ll just have to suggest typing a little more slowly. :slight_smile:

Okay, I was able to reproduce on the Surface Pro. Awesome that you were able to figure out what it was and fix it.
Workaround #2: Increase RAM to 32 GB with a fast i7 CPU and an SSD. :slight_smile:

I went house on the key combination, and couldn’t make it crash. Maybe a video card thing? (Nvidia, proprietary, geforce 1050ti.)

:laughing: :laughing: :laughing:

Funny thing is, I don’t need to type that fast to trigger this bug. I believe it’s a matter of keyboard sensitivity. Mine is a mechanical one, a Corsair with Cherry MX Red switches with a polling rate of 1000Hz/1ms. It’s like typing with a gun trigger.

Also, key rollover may come into play. The majority of keyboards cannot process many key press at once and that could be the reason why it’s not easy to reproduce this bug for you.

Anyway, this is not major issue, but it’s something that once seen, canno’t be unseen. :smiley:

Not that it matters (the bug is already filed), but to shed some light on this, I believe that overflowing the keyboard buffer would actually avoid this bug, because your keyboard will “forget” keys pressed as the buffer is full. So, I believe it gets easier to trigger this bug as high performant your keyboard can be.

I’ve got a Corsair K55; I have no idea what kind of switches are in it. I think I’ve got also a 1ms polling rate.

I think the “buffer” (not really sure it’s a buffer, but it acts kind of like one) being overflowed is inside Scrivener. If I only do a set of fast inputs 3 times, wait a few seconds, and then do 3 fast inputs, and wait some seconds, the crash does not occur. So it behaves like a buffer isn’t being cleared quickly enough.

Not that a normal user would do this input sequence, but there may be others that cause similar issues.


F11/ESC/F11 etc crashes on my Surface Pro too. However, machine gun tapping F11 does the same toggle on/off, but doesn’t seem to crash. I suspect it is slightly more involved than just the keyboard buffer.

The problem has to do with a view being deleted before it’s been fully constructed because of the quick toggling. It’s been fixed for the next beta. In the meantime, you should be OK if you just avoid jumping into and out of composition mode too quickly.