Ticket #461 (closed defect: fixed)

Opened 4 years ago

Last modified 4 years ago

Sometimes an activity will not start

Reported by: erikos Owned by: erikos
Priority: Unspecified by Maintainer Milestone: 0.84
Component: sugar Version: Git as of bugdate
Severity: Blocker Keywords: r+
Cc: tomeu, sascha_silbe, alsroot Distribution/OS: Unspecified
Bug Status: New

Description

With patches from #282 applied I do test 'sugar-emulator -s 72' and sometimes an activity will not start. Nothing in the logs besides:

1235985553.237079 DEBUG root: None launched in 0.004011 seconds.

I could not reproduce yet with 'sugar-emulator -s 100'. I did always erase the ~/.sugar/ before testing.

Attachments

none.png Download (31.5 KB) - added by erikos 4 years ago.
the launcher is flashing but the activity is not launched
sugar-461.patch Download (1.0 KB) - added by alsroot 4 years ago.
workaround fix
0001-Take-into-account-launcher-windows-when-checking-if.patch Download (1.8 KB) - added by tomeu 4 years ago.

Change History

Changed 4 years ago by erikos

the launcher is flashing but the activity is not launched

  Changed 4 years ago by tomeu

Maybe a dupe of #426?

  Changed 4 years ago by erikos

  • status_field changed from Unconfimed to New

Nope I actually still see this. And I just reproduced it (with SCALING 100) when checking #426. So I did start Terminal and restarted it again from the home view and closed it then. Then I started Write (it did not have an entry in the Journal yet) and I saw the pulsing launcher but no start - like described above.

  Changed 4 years ago by sascha_silbe

  • cc sascha_silbe added

  Changed 4 years ago by alsroot

  • cc alsroot added

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

  • keywords r? added

there is a race condition between ActivateActivity()[1] invoking from sugar-toolkit/src/sugar/activity/activityfactory.py:_launch_activity() and add_launcher()[2] invoking from sugar/src/jarabe/view/palettes.py:start_activate_cb():

- [2] creates new launcher window
- this window could be(still) not-registered before invoking [1]

attached patch adds workaround code(for 0.84 release only) - creating activity in any case(launcher window was registered or not)

Changed 4 years ago by alsroot

workaround fix

in reply to: ↑ 5   Changed 4 years ago by tomeu

Replying to alsroot:

there is a race condition between ActivateActivity()[1] invoking from sugar-toolkit/src/sugar/activity/activityfactory.py:_launch_activity() and add_launcher()[2] invoking from sugar/src/jarabe/view/palettes.py:start_activate_cb():

- [2] creates new launcher window
- this window could be(still) not-registered before invoking [1]

Thanks for the analysis, seems to be right.

Your patch fixes the race, but doesn't take into account switching to an existing instance. The one I'm attaching should work for that as well.

  Changed 4 years ago by tomeu

  • keywords r+ added; r? removed
  • status changed from new to closed
  • resolution set to fixed

r+'ed in #sugar by Simon and Aleksey.

Fixed by  http://git.sugarlabs.org/projects/sugar/repos/mainline/commits/a4dad1b0

Thanks a lot to Aleksey for tracking this one down.

Note: See TracTickets for help on using tickets.