Ticket #1341 (closed defect: fixed)

Opened 4 years ago

Last modified 4 years ago

Sugar craches during undo for the first Keyboard component startup

Reported by: alsroot Owned by: sayamindu
Priority: Immediate Milestone: 0.86
Component: sugar Version: 0.85.x
Severity: Unspecified Keywords: r+
Cc: Distribution/OS: Unspecified
Bug Status: Unconfirmed

Description

|TestCase|
* remove all gconf options for desktop/sugar/peripherals/keyboard
* open Keyboard control panel component
* click Cancel button
* sugar crashes due to None value for self._group_switch_option in Keyboard.undo()

Also Keyboard doesn't handle initial values for self._klayouts properly.

Attachments

dslo1341.patch Download (2.0 KB) - added by sayamindu 4 years ago.
Proposed fix
dslo1341_2.patch Download (2.3 KB) - added by sayamindu 4 years ago.
Slightly updated patch to handle the Options problem.
sugar-1341.patch Download (6.2 KB) - added by alsroot 4 years ago.
sugar-1341.2.patch Download (6.2 KB) - added by alsroot 4 years ago.
dslo1341_3.patch Download (2.1 KB) - added by sayamindu 4 years ago.
Patch to fix the new issues

Change History

  Changed 4 years ago by alsroot

  • priority changed from Unspecified by Maintainer to High
  • summary changed from Sugar craches during undo for new .sugar environment to Sugar craches during undo for the first Keyboard component startup
  • milestone changed from Unspecified by Release Team to 0.86

  Changed 4 years ago by tomeu

  • priority changed from High to Immediate

Changed 4 years ago by sayamindu

Proposed fix

  Changed 4 years ago by sayamindu

  • keywords r? added

The proposed patch checks for None value in each *_set() method in the model.

However, it also reduces the APPLY_TIMEOUT value to .5 second, as in some cases, even after an undo, the changed selection would kick in (if the undo was done within 3 seconds of the last layout selection change).

follow-up: ↓ 5   Changed 4 years ago by alsroot

  • keywords r! added; r? removed

after applying patch, there is one undo issue

|TestCase|
* remove all gconf options for desktop/sugar/peripherals/keyboard
* start sugar and open Keyboard component
* change all parameters
* click cancel button
* open Keyboard again
* "Key(s) to change layout" has chosen value from previous session

Changed 4 years ago by sayamindu

Slightly updated patch to handle the Options problem.

in reply to: ↑ 4   Changed 4 years ago by sayamindu

  • keywords r? added; r! removed

Replying to alsroot:

after applying patch, there is one undo issue

|TestCase|
* remove all gconf options for desktop/sugar/peripherals/keyboard
* start sugar and open Keyboard component
* change all parameters
* click cancel button
* open Keyboard again
* "Key(s) to change layout" has chosen value from previous session

Good catch!! Could you see if the second patch fixes this ?

  Changed 4 years ago by alsroot

it still has problem with "Key(s) to change layout"

Changed 4 years ago by alsroot

Changed 4 years ago by alsroot

  Changed 4 years ago by alsroot

  • status changed from new to closed
  • resolution set to fixed

  Changed 4 years ago by sayamindu

  • status changed from closed to reopened
  • resolution fixed deleted

Our patching have exposed a few more bugs.

1. During startup, the model may get set to , which causes havoc with the other XKB settings as well

2. In certain situations, model may get set as None or and so on, and we need to take care of those values.

Changed 4 years ago by sayamindu

Patch to fix the new issues

  Changed 4 years ago by tomeu

  • keywords r+ added; r? removed

Patch looks good to me, but if the user visible effect of the patch doesn't matches this ticket any more, would be better to open new tickets. Please push, thanks!

  Changed 4 years ago by sayamindu

  • status changed from reopened to closed
  • resolution set to fixed
Note: See TracTickets for help on using tickets.