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

User avatar
mattarmon
Posts: 33
Joined: Mon Sep 23, 2019 9:15 am
Platform: Windows
Contact:

Thu May 28, 2020 4:49 pm Post

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.

rw
rwfranz
Posts: 930
Joined: Thu May 28, 2015 9:41 pm
Platform: Windows

Thu May 28, 2020 5:08 pm Post

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.
Attachments
ebf4afd7-f482-4fc8-b2e7-4d86550cd80f.zip
(27.33 KiB) Downloaded 12 times
Just another user.

User avatar
Jestar
Posts: 297
Joined: Sun Feb 19, 2017 6:51 pm
Platform: Mac + Windows

Thu May 28, 2020 5:17 pm Post

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. :(
Win 10 Ent. 64-Bit 2004
Intel Core i7-2600 @ 3,4 GHz (Quadcore) 32 GB RAM
Samsung SSD 860 EVO 500GB
NVIDIA Quadro K600
Scrivener Version: Version: 1.9.16.0 - 14 Nov 2019 & Version: 2.9.9.8 Beta (984254) 64-bit - 12 Jul 2020

rw
rwfranz
Posts: 930
Joined: Thu May 28, 2015 9:41 pm
Platform: Windows

Thu May 28, 2020 5:34 pm Post

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.
Attachments
dcea678d-a8fd-49ff-8abd-7f6c7aab5bf5.zip
(22.28 KiB) Downloaded 10 times
Just another user.

User avatar
Jestar
Posts: 297
Joined: Sun Feb 19, 2017 6:51 pm
Platform: Mac + Windows

Thu May 28, 2020 6:33 pm Post

rwfranz wrote: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.

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.
Win 10 Ent. 64-Bit 2004
Intel Core i7-2600 @ 3,4 GHz (Quadcore) 32 GB RAM
Samsung SSD 860 EVO 500GB
NVIDIA Quadro K600
Scrivener Version: Version: 1.9.16.0 - 14 Nov 2019 & Version: 2.9.9.8 Beta (984254) 64-bit - 12 Jul 2020

User avatar
krastev
Posts: 526
Joined: Fri Feb 05, 2016 5:21 am
Platform: Windows
Contact:

Thu May 28, 2020 8:48 pm Post

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

Image
Krastev
Windows 10 Home 64-bit
Scrivener for Windows Version 1.9.16.0
Testing Scrivener Beta for Windows

User avatar
MimeticMouton
Posts: 8824
Joined: Wed May 05, 2010 5:39 am
Platform: Mac + Windows
Location: city of rain
Contact:

Fri May 29, 2020 12:09 am Post

Thanks, this has been filed. In the meanwhile as a workaround I'll just have to suggest typing a little more slowly. :)
Jennifer Hughes
(MM for short)

User avatar
Jestar
Posts: 297
Joined: Sun Feb 19, 2017 6:51 pm
Platform: Mac + Windows

Fri May 29, 2020 3:18 pm Post

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

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. :)
Win 10 Ent. 64-Bit 2004
Intel Core i7-2600 @ 3,4 GHz (Quadcore) 32 GB RAM
Samsung SSD 860 EVO 500GB
NVIDIA Quadro K600
Scrivener Version: Version: 1.9.16.0 - 14 Nov 2019 & Version: 2.9.9.8 Beta (984254) 64-bit - 12 Jul 2020

User avatar
garpu
Posts: 2049
Joined: Mon Oct 25, 2010 9:38 pm
Platform: Linux

Fri May 29, 2020 3:27 pm Post

I went house on the key combination, and couldn't make it crash. Maybe a video card thing? (Nvidia, proprietary, geforce 1050ti.)
Slackware-current 64-bit, XFCE

User avatar
mattarmon
Posts: 33
Joined: Mon Sep 23, 2019 9:15 am
Platform: Windows
Contact:

Fri May 29, 2020 10:09 pm Post

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

Image

:lol: :lol: :lol:

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. :D

User avatar
mattarmon
Posts: 33
Joined: Mon Sep 23, 2019 9:15 am
Platform: Windows
Contact:

Fri May 29, 2020 10:17 pm Post

Jestar wrote:
rwfranz wrote: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.

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.


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.

rw
rwfranz
Posts: 930
Joined: Thu May 28, 2015 9:41 pm
Platform: Windows

Sun May 31, 2020 5:42 am Post

mattarmon wrote:
krastev wrote:I was able to reproduce it but I had to go berserk on my keyboard.

Image

:lol: :lol: :lol:

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.

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.
Just another user.

ch
chrisdr2
Posts: 31
Joined: Wed Oct 16, 2019 9:09 am
Platform: Windows

Sun May 31, 2020 2:41 pm Post

Hi,

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.

User avatar
MimeticMouton
Posts: 8824
Joined: Wed May 05, 2010 5:39 am
Platform: Mac + Windows
Location: city of rain
Contact:

Sun May 31, 2020 5:01 pm Post

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.
Jennifer Hughes
(MM for short)