locked
Why Resource-Intensive Task won't run in release mode? RRS feed

  • Question

  • I have been trying to get a Resource-Intensive Task to run in release mode after deploying to the phone for several days and have never seen it run. Has anyone got this to work outside of the debugger? How long did you have to wait before it ran?

    I am able to launch and successfully run the Resource-Intensive Task using the LaunchForTest but have never gotten it to run as it should in release mode even though the task shows that it is scheduled. I have followed the samples and the phone should have met the requirements for launch. I have set the manifest up for auto-upload as well so shouldn't need to set an expiration date on the task.

    The phone is plugged in and charging and battery is 100%.
    The phone has wifi access.
    The phone is on the lock screen and left this way over night for 2 nights.

    I have tried this both on a Nokia Lumia 920 and HTC 699OL

    I am able to get a Periodic Task to run but not the Resource-Intensive Task. If the Periodic runs, I'm assuming I have configured everything correctly in the manifest and the Resource-Intensive Task should run at some point?

    The Resource-Intensive Task shows the following:
    IsEnabled = true
    IsShceduled = true
    LastScheduledTime: 1/1/0001 12:00:00
    ExpirationTime: 12/31/9999 11:59:59
    LastExitReason: None

    Running the Store Kit test shows no API call problems for the phone application.

    Here is my WMAppManifest setting for the agent;

    <ExtendedTask Name="BackgroundTask">
            <BackgroundServiceAgent Name="SML.Sync.WP8.Agent" Specifier="ScheduledTaskAgent" Source="SML.Sync.WP8.Agent" Type="SML.Sync.WP8.Agent.BackgroundUploadAgent" />
    </ExtendedTask>
    

    This seems correct based on the MSDN documentation here: MSDN Task Element documentation

    Here is the auto-upload setting:

    Here is the auto-upload extension, which follows the Tokens node:

    <Extensions>
          <Extension ExtensionName="Photos_Auto_Upload" ConsumerID="{5B04B775-356B-4AA0-AAF8-6491FFEA5632}" TaskID="_default" />
    </Extensions>

    I have also tried it without the auto-upload setting and had the same result of never running.

    I have also tried getting the example from here http://msdn.microsoft.com/en-us/library/windowsphone/develop/hh202941(v=vs.105).aspx to run but after removing the debug and trying to run as release, I see the same issue, never gets run even though it says its scheduled.

    Would be greatly appreciative of any guidance or tips if you have gotten a Resource-Intensive task to actually run in release mode.

    Saturday, February 2, 2013 5:20 PM

Answers

  • I opened a support incident February 4, 2013 with Microsoft and they confirmed this is a bug. I will probably explore the background file transfer capability as a semi-workaround until its fixed.

    This was their February 5th response:

    I collaborated with the internal Windows Phone developers and confirmed the following: 

    1.       ResourceIntensiveTask (i.e. Resource Intensive Agent) does not get triggered in the Windows Phone 8 operating system in Release Mode.

    2.       FYI,  Auto-upload uses ResourceIntensiveTasks, so it does not work in WP8 either.

    3.       A fix is scheduled for inclusion in a future Windows OS update, most likely later this spring. The fix needs to propagate through the OEMs who build their hardware-specific versions of the Windows Phone 8 OS.

    4.       There is no known immediate/official workaround.


    • Marked as answer by Jzickgra Monday, February 11, 2013 9:29 PM
    Monday, February 11, 2013 9:29 PM

All replies

  • LaunchForTest only works when you are building your app aka debug mode.  It will not work in release mode.  

    http://msdn.microsoft.com/en-US/library/windowsphone/develop/microsoft.phone.scheduler.scheduledactionservice.launchfortest(v=vs.105).aspx

    Saturday, February 2, 2013 6:29 PM
  • Ken, 

    I mentioned that I am unable to get the task to run when in release mode. I am not trying to do LaunchForTest from release mode, its wrapped in #if DEBUG statements. I want the phone to run and invoke the task in release mode via its own scheduler.

    Have you ever gotten a Resource-Intensive task to run in release mode through the phone scheduling and running it? I believe that all of the constraints have been met from here: http://msdn.microsoft.com/en-US/library/windowsphone/develop/hh202942(v=vs.105).aspx and the task says its scheduled, it just never runs.

    Sunday, February 3, 2013 4:03 PM
  • I opened a support incident February 4, 2013 with Microsoft and they confirmed this is a bug. I will probably explore the background file transfer capability as a semi-workaround until its fixed.

    This was their February 5th response:

    I collaborated with the internal Windows Phone developers and confirmed the following: 

    1.       ResourceIntensiveTask (i.e. Resource Intensive Agent) does not get triggered in the Windows Phone 8 operating system in Release Mode.

    2.       FYI,  Auto-upload uses ResourceIntensiveTasks, so it does not work in WP8 either.

    3.       A fix is scheduled for inclusion in a future Windows OS update, most likely later this spring. The fix needs to propagate through the OEMs who build their hardware-specific versions of the Windows Phone 8 OS.

    4.       There is no known immediate/official workaround.


    • Marked as answer by Jzickgra Monday, February 11, 2013 9:29 PM
    Monday, February 11, 2013 9:29 PM
  • Hi

    I encountered the same issue and decided to stop working on it when I saw this post. I am wondering if anyone has update on this bug since then.

    I notice that MSDN last updated the article on Sept 2013 (http://msdn.microsoft.com/en-us/library/windowsphone/develop/jj571205%28v=vs.105%29.aspx) which is 7 months after these post.

    I tried it out again, but unfortunately it doesn't seems to have been fixed. Can anyone verify?

    Monday, October 7, 2013 3:20 PM