Opened 11 years ago

Closed 11 years ago

Last modified 7 years ago

#1341 closed defect (fixed)

Sugar craches during undo for the first Keyboard component startup

Reported by: alsroot Owned by: sayamindu
Priority: Immediate Milestone:
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 (5)

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

Download all attachments as: .zip

Change History (17)

comment:1 Changed 11 years ago by alsroot

  • Milestone changed from Unspecified by Release Team to 0.86
  • 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

comment:2 Changed 11 years ago by tomeu

  • Priority changed from High to Immediate

Changed 11 years ago by sayamindu

Proposed fix

comment:3 Changed 11 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).

comment:4 follow-up: Changed 11 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 11 years ago by sayamindu

Slightly updated patch to handle the Options problem.

comment:5 in reply to: ↑ 4 Changed 11 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 ?

comment:6 Changed 11 years ago by alsroot

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

Changed 11 years ago by alsroot

Changed 11 years ago by alsroot

comment:9 Changed 11 years ago by sayamindu

  • Resolution fixed deleted
  • Status changed from closed to reopened

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
  1. In certain situations, model may get set as None or and so on, and we need to take care of those values.

Changed 11 years ago by sayamindu

Patch to fix the new issues

comment:10 Changed 11 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!

comment:11 Changed 11 years ago by sayamindu

  • Resolution set to fixed
  • Status changed from reopened to closed

comment:12 Changed 7 years ago by dnarvaez

  • Milestone 0.86 deleted

Milestone 0.86 deleted

Note: See TracTickets for help on using tickets.