Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Windows 8.1 app crashes when accessing settings pane on ARM device. How to find the source?

I am working on a Windows 8.1 Store project and use the following code to add some entries to the settings pane:

protected override void OnWindowCreated(WindowCreatedEventArgs args) {
    SettingsPane.GetForCurrentView().CommandsRequested += OnCommandsRequested;
}

private void OnCommandsRequested(SettingsPane sender, SettingsPaneCommandsRequestedEventArgs args) {
    try {
        args.Request.ApplicationCommands.Add(new SettingsCommand("Setting1", "Setting1", (handler) => ShowSetting1()));
        args.Request.ApplicationCommands.Add(new SettingsCommand("Setting2", "Setting2", (handler) => ShowSetting2()));
        args.Request.ApplicationCommands.Add(new SettingsCommand("Setting3", "Setting3", (handler) => ShowSetting3()));
        args.Request.ApplicationCommands.Add(new SettingsCommand("Setting4", "Setting4", (handler) => ShowSetting4()));
        args.Request.ApplicationCommands.Add(new SettingsCommand("Setting5", "Setting5", (handler) => ShowSetting5()));
        args.Request.ApplicationCommands.Add(new SettingsCommand("Setting6", "Setting6", (handler) => ShowSetting6()));
        args.Request.ApplicationCommands.Add(new SettingsCommand("Setting7", "Setting7", (handler) => ShowSetting7()));

        // Just added
        args.Request.ApplicationCommands.Add(new SettingsCommand("Setting8", "Setting8", (handler) => ShowSetting8()));
    }
    catch (Exception ex) {
        LogExceptionAsync("CommandsRequested Exception", ex);
    }
}

When I only used the first 7 settings everything worked fine. But after I added Setting8 the app crashes as soon as I try to access the settings-charm. The charm is displayed with a loading indicator saying that the items are being loaded. Then the app is closed.

No exception is raised and thus the catch-clause does not catch anything.

If I comment out any of the settings the app runs without any problem. Thus it seems that there is no problem with the settings but their number.

When running under x64 or x84 there is no such problem. Only the ARM version shows this problem.

The Windows EventLog shows two entries about the crash:

Information 16.04.2014 11:11:18 Windows Error Reporting    1001   None
Error       16.04.2014 11:11:10 Application Error          1000   (100)

<Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
  <System>
    <Provider Name="Windows Error Reporting" />
    <EventID Qualifiers="0">1001</EventID>
    <Level>4</Level>
    <Task>0</Task>
    <Keywords>0x80000000000000</Keywords>
    <TimeCreated SystemTime="2014-04-16T09:11:18.000000000Z" />
    <EventRecordID>4361</EventRecordID>
    <Channel>Application</Channel>
    <Computer>Surface2</Computer>
    <Security />
  </System>
  <EventData>
    <Data>98817018907</Data>
    <Data>5</Data>
    <Data>MoAppCrash</Data>
    <Data>Not Available</Data>
    <Data>98813601058</Data>
    <Data>Company.App_1.0.1.0_arm__q6cg89asqnk9m</Data>
    <Data>praid:App</Data>
    <Data>1.0.0.0</Data>
    <Data>534e4900</Data>
    <Data>combase.dll</Data>
    <Data>6.3.9600.16521</Data>
    <Data>52e87dc8</Data>
    <Data>8000000b</Data>
    <Data>00071dad</Data>
    <Data>
    </Data>
    <Data>
C:\Users\xx_000\AppData\Local\Temp\WER202B.tmp.WERInternalMetadata.xml
C:\Users\xx_000\AppData\Local\Temp\WER2414.tmp.appcompat.txt
C:\Users\xx_000\AppData\Local\Temp\WER2482.tmp.dmp
C:\Users\xx_000\AppData\Local\Temp\WER2956.tmp.WERDataCollectionFailure.txt</Data>
    <Data>C:\Users\xx_000\AppData\Local\Microsoft\Windows\WER\ReportArchive\AppCrash_Company.M_b0e4a8876aeb86cdf32abbd585ad11b7189a8480_e874570f_cab_163f3de4</Data>
    <Data>
    </Data>
    <Data>0</Data>
    <Data>0c7cc9a5-c547-11e3-932e-281878576a56</Data>
    <Data>8</Data>
    <Data>4321453f2ef12cbd410b2f7a3de271a8</Data>
  </EventData>
</Event>

The files in temp folder do not exist. The Path to the error report is correct but the report only contains the same data as shown above.

It is quite unusual, that no exception is thrown and that the app is just closed. Any idea what might be the source of the problem and how to handle it?

like image 265
Andrei Herford Avatar asked Nov 18 '25 20:11

Andrei Herford


1 Answers

I think there is a limit as to how many settings commands can be added to the settings pane in Windows 8 and 8.1

http://social.msdn.microsoft.com/Forums/windowsapps/en-US/f6d7a383-6d93-412f-9669-0c1246951830/how-many-settings-command-i-can-add-in-to-settingspane?forum=winappswithcsharp

like image 105
Luke Loescher Avatar answered Nov 20 '25 10:11

Luke Loescher



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!