Opened 6 years ago

Closed 6 years ago

Last modified 6 years ago

#7856 closed defect (fixed)

notify::active behaviour change

Reported by: dsd Owned by: tomeu
Priority: high Milestone: 8.2.0 (was Update.2)
Component: sugar Version: not specified
Keywords: blocks-:8.2.0 polish:8.2.0 r+ Cc: joe, arjs
Blocked By: Blocking: #7467, #7771
Deployments affected: Action Needed: no action
Verified: no

Description

In update1, when you launch an activity by clicking an icon, the
activity receives a notify::active signal immediately after it has
launched. Measure relies on this assumption.

In 8.2, when launching an activity by clicking on the icon, no
notify::active signal arrives on launch. However, if you launch from
terminal with the sugar-launch command, the signal is indeed generated.

Attachments (1)

7856.patch (2.4 KB) - added by erikos 6 years ago.
set property of activity to active when the service is up

Download all attachments as: .zip

Change History (23)

comment:1 Changed 6 years ago by dsd

  • Blocking 7467 added

(In #7467) Problems are:

  • Porting to numpy needed (trivially easy)
  • notify::active behaviour change in #7856

comment:2 Changed 6 years ago by marco

  • Action Needed changed from never set to diagnose
  • Priority changed from normal to high

comment:3 Changed 6 years ago by kimquirk

  • Keywords blocks?:8.2.0 added
  • Owner changed from marco to tomeu

tomeu - can you take a look as this is stale but important - possible blocker.

comment:4 Changed 6 years ago by tomeu

Bug in the shell:

  1. User clicks the icon
  2. Shell calls Shell.NotifyLaunch
  3. Shell tries to call SetActive(True) on the activity, but it isn't launched yet
  4. Shell calls Rainbow.CreateActivity
  5. Rainbow launches activity
  6. Activity sets up its dbus service, now it is ready to receive the SetActive call

Marco, can you give your opinion on the best way to fix this one?

comment:5 Changed 6 years ago by marco

I think set_active should go through homeactivity, which should only propagate it to the dbus service when it's available (it's already tracking the service).

I'm surprised that this bug has been exposed only now.

comment:6 Changed 6 years ago by marco

  • Action Needed changed from diagnose to code

comment:7 Changed 6 years ago by thomaswamm

  • Blocking 7771 added

(In #7771) In 8.2-757, Measure-18 still starts with a grey screen. Same work-around helps: switch to Journal, then back to Measure, then it works.

comment:8 Changed 6 years ago by mstone

  • Keywords blocks-:8.2.0 polish:8.2.0 added; blocks?:8.2.0 removed

This issue has an acceptable workaround so it is not a release-blocker. However, since it is an API regression, I would probably accept a clean fix if one appeared in the next week.

Changed 6 years ago by erikos

set property of activity to active when the service is up

comment:9 Changed 6 years ago by erikos

  • Action Needed changed from code to review
  • Keywords r? added

comment:10 Changed 6 years ago by tomeu

  • Keywords r+ added; r? removed
            if self._service != None:
                self.set_active(True) 

No need to test it here as we are testing inside the method.

        if self._service: 
            self._service.SetActive(state, 

Better use if self._service is None:

comment:11 Changed 6 years ago by erikos

  • Action Needed changed from review to package

Thanks for the comments. Pushed to both branches.

comment:12 Changed 6 years ago by marco

  • Action Needed changed from package to test in build

comment:13 Changed 6 years ago by erikos

package: sugar-0.82.3-1.olpc3

comment:14 Changed 6 years ago by erikos

  • Action Needed changed from test in build to approve for release

|TestCase|

verify that launching of activities works as expected

comment:15 Changed 6 years ago by mstone

  • Action Needed changed from approve for release to add to release

Please record positive test results for me when you generate them.

comment:16 Changed 6 years ago by cscott

  • Action Needed changed from add to release to test in release

sugar 0.82.5-1 added to 8.2 repo; should be in build 760 and later. Please test.

comment:18 Changed 6 years ago by morgs

Measure now launches and is functional immediately. Looks good to me.

comment:19 Changed 6 years ago by mchua

  • Action Needed changed from test in release to no action
  • Cc joe added

Measure worksforme in 8.2-760. Closing.

comment:20 Changed 6 years ago by mchua

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

comment:21 Changed 6 years ago by arjs

  • Cc arjs added

I confirm that on launch the signal is being correctly launched. However when Measure goes into the background, it doesn't release the audio resources until another activity becomes active. Is there a signal supposed to be fired when from the Activity view, one goes to the home view ? If there is code related to this, could someone please point me to that ?

comment:22 Changed 6 years ago by marco

I'm not clear if an activity should release audio resources in that case, we discussed this at lenght but I don't think we have a clear policy about it yet. Anyway see visibility-notify-event in activity.py you can do something similar.

Note: See TracTickets for help on using tickets.