locked
Works fine, but published version crashes RRS feed

Answers

  • Add this:

     

                // We MUST have MediaLibrary access else when we are signed we cant get to the BAP
                Microsoft.Xna.Framework.Media.MediaLibrary library = new Microsoft.Xna.Framework.Media.MediaLibrary();
    

    BAP requires medialib capability but the Marketplace parser doesnt know that, so you have to force its inclusion. I had the same problem.

     

    Monday, October 17, 2011 1:33 AM

All replies

  • i haven't looked at your app but most frequent cause of errors is due to float.parse or datetime.parse methods. Each culture has its own format.
    You should always use Invariant culture

    http://msdn.microsoft.com/en-us/library/4c5zdc6a(v=VS.100).aspx

    you should also try to use TryParse instead of Parse
    Wednesday, October 5, 2011 7:47 PM
  • Have a look at the crash reports on your AppHub Dashboard.  That should give you an idea of why they are crashing.
    Thursday, October 6, 2011 12:39 AM
  • There is no such kind of parsing.

    The stack trace points me to BackgroundAudioPlayer.set_Track ...and again, if i mannualy deploy this, it works fine!
    Thursday, October 6, 2011 4:35 AM
  • Guys, what should i do?
    i'm so tired with all this problems on market.. i was trying to register on the market for 2 weeks and after that, i created the account with my wife's Live Id, yes, this account is my wife's account..

    now this...
    What does Microsoft do with my application, that it stops working?)
    Could some one manually deploy my app and test how it works?
    all the best...
    Thursday, October 6, 2011 6:05 AM
  • any idea?
    Thursday, October 6, 2011 4:35 PM
  • Hi,

    1. When you conducted your tests did you do so with the phone disconnected from the USB cable attached to your development PC, in order to test over-the-air network paths?
    2. Did you try Wi-Fi only, and cell network only connections (adjusting Wi-Fi and airplane mode settings)?
    3. I understand that there are a few known issues where BackgroundAudioPlayer can crash such as when a user launches a youtube video via the webbrowser running in a foreground app (details here). You should handle PlayState.Stopped and PlayState.Shutdown, and wrap your BackGroundAudioPlayer code in a try/catch as a workaround, to automatically recover from the crash; and then test this scenario.
    4. You might consider publishing a special version of your app as a Beta app, in which case it does not become published.  Add whatever test code, instrumentation, logging etc. that you want to it. For each beta app, supply a unique app name.
    5. When you publish an app, it acquires a unique ProductID (GUID). Make sure that your code does not contain, and make any references to, an old (static) copy of the pre-marketing ProductID that is created by Visual Studio.  This is the only real difference between pre and post publishing.

    Hope this helps,
    Mark
    Thursday, October 6, 2011 5:47 PM
  • Thanks for the help.
    1,2.yes, i tried everything, everything is fine
    3. it crashes on play
    4.i'll try
    5. i dont use productid..
    Thursday, October 6, 2011 6:52 PM
  • coredll.dll       xxx_RaiseException 
    mscoree3_7.dll 520892     2       
    mscoree3_7.dll
    mscoree3_7.dll
    TransitionStub                                                    
    Microsoft.Phone.BackgroundAudio.BackgroundAudioPlayer.set_Track
    DeepmixRadioClient.Workflow.Logic.PlaySelectedTrack DeepmixRadioClient.MainPage.selLst_SelectionChanged
    -----------------------
    coredll.dll    xxx_RaiseException
    Microsoft.Phone.BackgroundAudio.BackgroundAudioPlayer.set_Track
    DeepmixRadioClient.Workflow.Logic._PlayRadio_b__22
    .WorkItem.WaitCallback_Context
    System.Threading.ExecutionContext.Run

    and so on..

    set_Track fails from different places in differente situtaions..
    Thursday, October 6, 2011 7:16 PM
  • I have the same problem, calling set_Track on BackgroundAudioAgent throws COMExpcetion.

    It was working with the beta SDK but failed after re-compiling with the RTM SDK.

    Update: Turns out I am missing the the ID_CAP_MEDIALIB capability in the manifest file. Interestingly is the Marketplace Test Kit doesn't say I need one.
    Friday, October 7, 2011 1:30 AM
  • The common theme here seems to be the use of BackgroundAudio.  Have you both followed the Background Audio Overview (including the best practices listed) and the How to?
    Friday, October 7, 2011 1:50 AM
  • i've done everything as guided..

    this caps im using for the WPAppManifest.xml:

    <

     

     

    Capabilities>

     

    <

     

     

    Capability Name="ID_CAP_NETWORKING" />
    <
    Capability Name="ID_CAP_MEDIALIB" />
    </
    Capabilities>

     

     

     

     

     


    this shows at application details from my dashboard:

    Required Device capabilities
    data services
    Silverlight framework
    background audio
    background audio internet streaming

    But, this, is what user see on application about at the Market:

    data services

    that's all, is it normal, that background audio and internet streaming are not listed in market?
    Friday, October 7, 2011 10:43 AM
  • now, in beta i'm trying to use every caps
    Friday, October 7, 2011 10:54 AM
  • ComException 0x800704EC at set_Track
    Friday, October 7, 2011 4:18 PM
  • Hi,

    That error code maps to "ERROR_ACCESS_DISABLED_BY_POLICY".

    That error has been reported when the application is missing a required capability (ID_CAP_..)

    I recommend that you restore to the correct list of capabilities, confirm that you get the same error, and then if you haven't done so already, create an App Hub support ticket since this appears to be related to Marketplace application ingestion.

    I have a hunch it has something to do with the already-known limitations and problems with the background audio player.

    Hope this helps,
    Mark

    Friday, October 7, 2011 5:08 PM
  • Thank you very much for the response.
    i tried the beta where i used capabilities from template project: from game_service til appointments and the result is not different - comexception.
    Also, i tried to deploy the application manually - it works as expected, there is a sound, so i'm going to create the ticket.
    Saturday, October 8, 2011 12:24 AM
  • Hi,
    You'll likely need to implement more detailed reporting and/or logging in your application, where you can report all parameters that might affect your track setting code. 

    Write your code so that just before the failure normally occurs, you report all parameters that might be the source of the problem to the screen, in a message box.

    Use Beta mode for your application until this is resolved. You indicate that it always fails in the same place (set_Track) which will make this easier.

    If you wish you can capture the information as a log, in isolated storage, or via a service in a server.

    Here are a couple of approaches for data logging:
    http://www.mobilemancer.com/2011/08/21/manipulating-isolated-storage-on-windows-phone-7/
    http://silverlightlogging.codeplex.com/

    Hope this helps,
    Mark
    Monday, October 10, 2011 7:27 PM
  • I am working on it, but still nothing interesting.
    I have published the project: http://deepmixwp7.codeplex.com/
    The comments are russian, but you can deploy and try it.
    Wednesday, October 12, 2011 10:11 PM
  • So.
    The code:
       

    CommonHelper.Log("Audio Request"); var audioTrack = new AudioTrack(null,deepMixTrack.Title,deepMixTrack.Artist,AppResources.Selected,null,tag,EnabledPlayerControls.SkipNext | EnabledPlayerControls.SkipPrevious | EnabledPlayerControls.Pause); 

    CommonHelper

     

     

    .Log(audioTrack.AboutTrack());
    Player.Track = audioTrack;

    Logging:
    Audio Request.
    AboutTrack: Album: Selected; Artist:Max Grabke & Dima Deepmix - Sapovnela Studio; Duration: Not Set; Controls: SkipNext,SkipPrevious,Pause;Source:Not Set; Tag: [DM][Selected]http://www.deepmix.ru/selected/www.deepmix.ru - Sapovnela_Max_Grabke_&_Dima_Deepmix_Pion.mp3; Title: Pion[2011]:13.10.3011
    -----
    thats all. BackgroundPlayer is not called, the exception is thrown on set_Track, as
    ----
    If i mannualy deploy the app, after setting Track property BackgroundPlayback agent is loading, and the StreamingSource is loading as well

    Thursday, October 13, 2011 5:53 PM
  • Hi,
    I downloaded the source code that you published, for inspection.
    Here are some additional thoughts.

    1. Your selLst_SelectionChanged() and PlaySelectedTrack() functions are not wrapped in try/catch blocks. Because of the known problems with Background Audio, you should wrap them because of the known exception issues that occur if MediaElement is running at the same time. Playing other media will cause the background player to crash and the workaround is to use try/catch to avoid crashing the system, to more gracefully fail background audio by canceling it. It might be possible that this is what is actually happening.

    2. Provided with the Windows Phone SDK 7.1 is the Application Deployment tool (via the Start menu). You might want to try deploying your XAP using this tool, to see if it can make it fail.

    3. Perhaps something is getting messed up in the published XAP.  Create a support ticket, specifically asking for the published, signed XAP (reference this thread and my recommendation).  When you get the XAP file, note that you cannot actually test it by running it (because it is signed). However you can open it up and look for differences between it, and your pre-publishing development XAP (which you indicated works). Rename both XAP files from .XAP to .ZIP and then open them up using Winzip or a tool that can read zip files.  Run WINDIFF or your favorite comparing tool to look for file differences. Inspect its WMAppManifest to see if the capabilities are different than what you expect. Compare the DLL files, in particular make sure all the same files are there, and they are the same version.

    Hope this helps,
    Mark
    Thursday, October 13, 2011 8:18 PM
  • 1. I dont use MediaElement, and I have tested playing the radio while zune were playing. But i'll work on it.
    2. I have deployed the app with Application Demployment tool, and every think is fine.
    3. I've created a support ticket and going to compare the archives
    Saturday, October 15, 2011 1:31 PM
  • Add this:

     

                // We MUST have MediaLibrary access else when we are signed we cant get to the BAP
                Microsoft.Xna.Framework.Media.MediaLibrary library = new Microsoft.Xna.Framework.Media.MediaLibrary();
    

    BAP requires medialib capability but the Marketplace parser doesnt know that, so you have to force its inclusion. I had the same problem.

     

    Monday, October 17, 2011 1:33 AM
  • Thanks a lot!
    trying it.
    after submitting "music and video library" become visible:

    Required Device capabilities
    data services
    music and video library
    Silverlight framework
    background audio
    background audio internet streaming

    Now i'm waiting for beta publishing.. lets see
    • Proposed as answer by PJR_07 Wednesday, April 3, 2013 11:17 AM
    • Unproposed as answer by PJR_07 Wednesday, April 3, 2013 11:17 AM
    Monday, October 17, 2011 4:37 AM
  • I've run into the same issue.  The capability issues definitely seems like the likely culprit.  I'm waiting for my beta submission to hit the marketplace to see if it solves my issue as well.
    Monday, October 17, 2011 5:12 AM
  • I can confirm the fix works!  Thanks for that!
    Monday, October 17, 2011 4:06 PM
  • +1
    fixed
    Monday, October 17, 2011 6:18 PM
  • Hi,
    3. Perhaps something is getting messed up in the published XAP. Create a support ticket, specifically asking for the published, signed XAP (reference this thread and my recommendation). When you get the XAP file, note that you cannot actually test it by running it (because it is signed). However you can open it up and look for differences between it, and your pre-publishing development XAP (which you indicated works). Rename both XAP files from .XAP to .ZIP and then open them up using Winzip or a tool that can read zip files. Run WINDIFF or your favorite comparing tool to look for file differences. Inspect its WMAppManifest to see if the capabilities are different than what you expect. Compare the DLL files, in particular make sure all the same files are there, and they are the same version.

    Hope this helps,
    Mark

    There is only one cap in  published xap file:
    ID_CAP_NETWORKING.

    as expected media cap is absente
    Monday, October 17, 2011 11:15 PM
  • Looks like a bug in the capability detection (not looking for the BAP APIs) that can be fixed on the submission side.  Hopefully they will get that addressed soon.
    Monday, October 17, 2011 11:40 PM
  • It is a known bug in the capability detection, yes. I wouldn't hold your breath waiting for it to be fixed though.
    Tuesday, October 18, 2011 4:55 PM
  • I am adding a reference to post Beta App download from MarketPlace crashes whereas deploy works fine to this post as it seems similar issues.

    @Mark: Can you help to figure out a solution for that issue. It would be a great help. 
    Tuesday, October 25, 2011 5:00 PM
  • It works now.
    But people dont want to download it again because of bad reviews.. ((
    Friday, October 28, 2011 2:06 PM