Ticket #7856 (closed defect: fixed)

Opened 6 years ago

Last modified 6 years ago

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
Action Needed: no action Verified: no
Deployments affected: Blocked By:
Blocking: #7467, #7771

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

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

Change History

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

Changed 6 years ago by marco

  • priority changed from normal to high
  • next_action changed from never set to diagnose

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.

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?

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.

Changed 6 years ago by marco

  • next_action changed from diagnose to code

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.

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

Changed 6 years ago by erikos

  • keywords r? added
  • next_action changed from code to review

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:

Changed 6 years ago by erikos

  • next_action changed from review to package

Thanks for the comments. Pushed to both branches.

Changed 6 years ago by marco

  • next_action changed from package to test in build

Changed 6 years ago by erikos

package: sugar-0.82.3-1.olpc3

Changed 6 years ago by erikos

  • next_action changed from test in build to approve for release

|TestCase|

verify that launching of activities works as expected

Changed 6 years ago by mstone

  • next_action changed from approve for release to add to release

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

Changed 6 years ago by cscott

  • next_action 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.

Changed 6 years ago by morgs

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

Changed 6 years ago by mchua

  • cc joe added
  • next_action changed from test in release to no action

Measure worksforme in 8.2-760. Closing.

Changed 6 years ago by mchua

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

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 ?

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.