locked
Certification failed because of 256MB device RRS feed

  • Question

  • My tiny app (DeviceInfo) now failed the second time for the same reason: App does not start on a 256 MB device.

    Since I have no 256 MB device and I am also not willed to buy such a device (only have two 512 MB devices) I have to rely on the 256 MB emulator. The app runs fine on the 256 MB emulator!

    So I decided to remove support for 256 MB  devices for the moment since I'll have to wait again ONE WEEK for the certification process to complete (so it seems that MS needs ONE WEEK to deploy a XAP on a device and start it ^^)

    I also recognized that the 256 MB device emulator completely ignores the ID_REQ_MEMORY_90 setting in the WMManifest.xml! So I am a bit confused why should I use the 256 MB device emulator since it is completely useless for me (my app runs perfect but the certification fails since it will not launch on a REAL device!?)

    Testing if the app runs on a low memory device:

    		private static bool? GetIsLowMemoryDevice()
    		{
    			try
    			{
    				long applicationWorkingSetLimit = (long)DeviceExtendedProperties.GetValue("ApplicationWorkingSetLimit");
    				return applicationWorkingSetLimit < 94371840L;
    			}
    			catch (ArgumentOutOfRangeException)
    			{
    				// Windows Phone OS update not installed, which indicates a 512 MiB device!
    				// INFO: When building without the "Windows Phone SDK 7.1.1 Update" the exception will be thrown but
    				// the app does NOT work on 256 MB devices and the certification will fail!
    				return false;
    			}
    			catch
    			{
    				// Just ensure that certification will fail not fail again for the same reason:
    				//  5.2 Performance and Resource Management
    				//  5.2.5 An application must not exceed 90 MB of RAM usage,
    				//        except on devices that have more than 256 MB of memory.
    				return null;
    			}
    		}

    This works fine on BOTH emulators (256 MB AND 512 MB) and it runs perfectly on a REAL 512 MB device. So where is the problem with 256 MB sticky devices!? I have no clue!

    --hfrmobile


    Programming is a kind of art but not all programmers are artists.

    Wednesday, October 31, 2012 7:41 PM

Answers

  • Sorry, didn't catch it. Are you talking about the Betaplace? 


    Programming is a kind of art but not all programmers are artists.

    The crashes that happen during testing generate stack traces that go into your stacktrace report page when you submit updates to an application.  With the time zone difference and the time it takes them to write a failure report, I generally see the stack traces the morning that I get a failure notification on an update.
    • Marked as answer by hfrmobile Wednesday, November 7, 2012 9:49 AM
    Tuesday, November 6, 2012 7:17 AM
  • Since the error report did not contain the OS version number I was thinking to the wrong direction since the error claimed that the cause of the issue was 256 MB device!

    The problem was not related to 256 MB devices! It was just random that my app worked on 512 MB and not for 256 MB devices. Indeed the problem was related to the OS version number ... (that is also the reason why the app worked for me on the 256 MB XDE).

    Would be nice if MS would improve their error reports:

    • App version: (empty)  --> display version as major.minor.build.revision
    • Phone version: Mango --> more details (full version number)

    --hfrmobile


    Programming is a kind of art but not all programmers are artists.

    • Marked as answer by hfrmobile Sunday, November 25, 2012 1:52 PM
    Sunday, November 25, 2012 1:51 PM

All replies

  • Hi hrf,

    I see your point here regarding the app's performance on the emulator. I'm going to try and see what insight (if any) our certification team can provide on this (failure 5.1.1).

    Thanks


    Dev Center Help: http://msdn.microsoft.com/library/windowsphone/help --- Submit Support Request: http://go.microsoft.com/fwlink/?LinkId=256412

    Friday, November 2, 2012 5:51 AM
  • While the requirements say 90 MB, the reported peak usage when running needs to be well under that or it may still fail. I've had to deal with this issue a lot and have found that regardless of the emulator performance or the 90 MB limit, getting your peak memory usage under about 50 MB on low memory devices will allow your app or game to pass certification.

    Monitor this value while running to view your peak memory usage in MB: (DeviceStatus.ApplicationPeakMemoryUsage / 1000000)

    Keep this under 50 MB and you will probably be fine on low memory devices.

    In my case, I turn off certain textures, music, and other features to keep the memory low for those devices.


    Edit: I also want to confirm that the loading performance on the emulators does not seem to match actual devices. The emulator will load a content-heavy game almost instantly while the same game can take 4-6 seconds to load on a device. It seems as though some functions on the emulator rely too heavily on your own computer's performance.

    Sunday, November 4, 2012 4:14 AM
  • Maybe I missed something. My app starts and runs perfectly on the 256 MB emulator. Also starting takes only 1-2 seconds. I guess when it runs on the XDE perfectly on a "old laptop" (Vista Ultimate, 4 GB RAM only) it should also work on a real device.

    Test summary:
    Capabilities Tested: Networking
    Language(s): EnglishNorthAmerica, German
    Result: Failed
    Failure Summary: 5.2.5
    Exception(s) Applied: None

    5.2 Performance and Resource Management
    5.2.5 An application must not exceed 90 MB of RAM
    usage, except on devices that have more than 256
    MB of memory. ....

    Expected result:
    Test Process Required:
    1. Launch the application on devices with less
    than 250MB of memory.
    2. Navigate on the application
    3. Measure peak memory usage and verify it
    does not go over 90MB.

    Comments: The application does not run on devices with 256-MB of memory.
    Steps to reproduce:
    1. Launch the application.
    2. Observe the application does not launch.

    So, I am a bit confused since my app doesn't use network capabilities at startup. Network capability is only used when the user clicks a AppBar button. But the tester claims that the app wouldn't start.

    But I am calling the GetIsLowMemoryDevice() at startup.

    On the first submission I not used the second catch() block (only catched ArgumentOutOfRangeException).

    So it looked like that I should also catch all other exceptions (second catch-block) so the app will also start on 256 MB devices. Used SDK 7.1 on the first submission and on the second submission I used the SDK 7.1.1 Update (which includes the 256 MB device emulator).

    Since the two submissions failed with exactly the same description/reason I am a bit confused.

    Maybe the wrong XAP was tested?

    In the third attempt I removed 256 MB device support with providing ID_REQ_MEMORY_90 in the WMAppManifest.xml! I am still waiting again (whole certification process takes about one week and so I am just waiting three weeks now ...)

    --hfrmobile


    Programming is a kind of art but not all programmers are artists.


    • Edited by hfrmobile Sunday, November 4, 2012 8:59 AM fixed typo
    Sunday, November 4, 2012 8:52 AM
  • It sounds like you are trying to catch an error preventing it from starting, but in my experience that won't work.

    If your app takes longer than about 5 seconds to start the OS will forcibly close it and it will fail. The problem with this is that the emulator will start your app much faster than an actual device; the emulator might start your app in 1-2 seconds while a 256 MB device might not start your app for 6 seconds -- and you can't see this without an actual device to test on.

    The problem with trying to catch the error when starting is that there does not seem to be an error to catch. The OS simply closes your app and returns to the previous screen. I had this problem persist for months before I figured out what was actually going on. In my particular game, a lot of content was being loaded when the game started. To address this, I moved most of the loading procedures to where they would happen after the app actually started. I added a splash screen that came up right away before almost anything was loaded (i.e. Welcome! Loading, please wait...). Once the splash screen was visible the content started loading. This is one way to avoid the 5 second failure. Beyond that get your peak usage to about 50 or less and you should pass regardless.

    • Marked as answer by hfrmobile Sunday, November 4, 2012 4:31 PM
    • Unmarked as answer by hfrmobile Monday, November 5, 2012 10:49 PM
    Sunday, November 4, 2012 3:37 PM
  • Very good input, thanks a lot!

    I actually do "something" on app startup:

    Application_Launching: Copying a file from XAP to IS (~15 KB) - only the first start and only if the file has changed

    Application_Activated: GetIsLowMemoryDevice() etc. - always

    I guess that no exception occurs since I used the SDK 7.1.1 for the GetIsLowMemoryDevice() method for the second failed submission.

    Is it really the case that apps are taking longer to start on 256 MB devices compared to 512 MB devices?

    I thought that 256 MB just having less memory by they are as fast as 512 MB devices ...

    The app always starts without any problems on 512 MB devices (e.g. HTC Trophy, HTC Mozart). Since I do not own a 256 MB device it is hard to test that issue ...

    @MS/Dev Center: In case of an exception I would expect some more details from the "Certification process" (e.g. Stack-Trace) which will help developers finding the cause of the problem more easily than just guessing ...


    Programming is a kind of art but not all programmers are artists.

    Sunday, November 4, 2012 4:43 PM
  • @MS/Dev Center: In case of an exception I would expect some more details from the "Certification process" (e.g. Stack-Trace) which will help developers finding the cause of the problem more easily than just guessing ...


    Programming is a kind of art but not all programmers are artists.

    If your application passes without support for low-memory devices, submit an update that does support them and you will be able to see the stack trace after the reporting delays if the testers have the report logging enabled.  (You would hope that the testers would be required to have that enabled since it helps both Microsoft and the programmers.)

    I do agree with you that the stack traces should be available for us, but I don't see how that MS would be able to do this as the test platforms should be "normal" windows phones.  

    Monday, November 5, 2012 7:17 AM
  • My app passed certification without "low memory" device now.

    Sorry, didn't catch it. Are you talking about the Betaplace? I'll do some investigation/testing to see if the OS really does shut-down a app when starting takes longer than 5 seconds.

    @stack-trace: Well, I guess that it should be no technical problem providing us developers the stack-trace even on "normal phones". Even this was possible on the Windows Mobile platform long time ago ...

    EDIT: I did the following test on XDE and a real device (HTC Trophy): Set breakpoint at Application_Launching and wait 10 seconds: Splash-Screen was displayed during the 10 seconds and then hit F5 and continue launching the app. The app launches normally and works fine (the OS didn't close the app ..)


    Programming is a kind of art but not all programmers are artists.



    • Edited by hfrmobile Monday, November 5, 2012 10:48 PM added EDIT
    Monday, November 5, 2012 8:54 PM
  • Sorry, didn't catch it. Are you talking about the Betaplace? 


    Programming is a kind of art but not all programmers are artists.

    The crashes that happen during testing generate stack traces that go into your stacktrace report page when you submit updates to an application.  With the time zone difference and the time it takes them to write a failure report, I generally see the stack traces the morning that I get a failure notification on an update.
    • Marked as answer by hfrmobile Wednesday, November 7, 2012 9:49 AM
    Tuesday, November 6, 2012 7:17 AM
  • Thanks a lot, just found the "Export stack-trace" link!

    App version       (empty)
    Phone version     Mango
    Problem function  Unknown
    Exception type    NullReferenceException
    Even above information isn't very informative (e.g. "App version", "Problem function") the stack-trace itself gives me a hint of the cause of the problem - I will do some investigation this evening.

    Programming is a kind of art but not all programmers are artists.

    Wednesday, November 7, 2012 9:52 AM
  • Since the error report did not contain the OS version number I was thinking to the wrong direction since the error claimed that the cause of the issue was 256 MB device!

    The problem was not related to 256 MB devices! It was just random that my app worked on 512 MB and not for 256 MB devices. Indeed the problem was related to the OS version number ... (that is also the reason why the app worked for me on the 256 MB XDE).

    Would be nice if MS would improve their error reports:

    • App version: (empty)  --> display version as major.minor.build.revision
    • Phone version: Mango --> more details (full version number)

    --hfrmobile


    Programming is a kind of art but not all programmers are artists.

    • Marked as answer by hfrmobile Sunday, November 25, 2012 1:52 PM
    Sunday, November 25, 2012 1:51 PM
  • How do I tell the store not to try and run my app, which requires Windows Phone 7.5 or better since it uses Microsoft.Bcl.Async, on a phone with Windows Phone 7.1 or older?  I have a post about a problem I am having along those lines here here:

    http://social.msdn.microsoft.com/Forums/en-us/wpdevelop/thread/57bb02ce-0bc0-4077-afb2-2eb2ff278311

    -- roschler


    -- roschler

    Tuesday, May 21, 2013 7:23 PM