Setting set_intercept_activation() on a JS CategorisedResult causes scope to claim `returned nullptr from activate` and not activate

Bug #1598969 reported by Stuart Langridge on 2016-07-05
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Alexandre Abreu

Bug Description

To test, add CategorisedResult()s in search() as normal, but call cr.set_intercept_activation() on that CategorisedResult. This should call the `activate()` function from the scope.initialize runtime_config. However, it instead throws errors:

Scope (your scope) returned nullptr from activate()
Scope (your scope) threw an exception from activate()

As far as I can tell, this is not being thrown by my code; it happens regardless of what I have in the activate() function, or even if I don't have one at all, and no code inside my activate() function is executed. This, in practice, means it's impossible to write a JS scope which allows tapping on a result item to do anything other than show the preview (for example, launching an app).

Related branches

Changed in unity-js-scopes:
assignee: nobody → Alexandre Abreu (abreu-alexandre)

@alex: The documentation doesn’t actually mention ActivationResponse or even that activate() handlers are possible in scope.initialize(). We should fix this too.

Changed in unity-js-scopes:
importance: Undecided → Medium
status: New → In Progress

@Stuart: I could repro your issue, could you check if the branch linked works for you (so that at least we have a simple common example)?

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers