Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-25343] Windows: App crashes when attempting to access ApplicationView

GitHub Issuen/a
TypeBug
PriorityHigh
StatusClosed
ResolutionCannot Reproduce
Resolution Date2017-09-30T00:36:53.000+0000
Affected Version/sHyperloop 2.1.3
Fix Version/sn/a
ComponentsWindows
Labelsn/a
Reporter Ricardo Ramirez
AssigneeKota Iguchi
Created2017-09-25T22:00:37.000+0000
Updated2019-05-09T06:47:52.000+0000

Description

Description

When attempting to get the Current ApplicationView using Hyperloop and the function GetForCurrentView(https://docs.microsoft.com/en-us/uwp/api/windows.ui.viewmanagement.applicationview#Windows_UI_ViewManagement_ApplicationView_GetForCurrentView) The App crashes with the error message attached.

Reproduction Steps

Run the attached sample app on Windows Simulator or device

Click on the "Click me to Crash' label

App crashes.

Attachments

FileDateSize
app.zip2017-09-25T21:59:49.000+00007126441

Comments

  1. Kota Iguchi 2017-09-26

  2. Hans Knöchel 2017-09-29

    [~kiguchi] We are in the QE-testing of 2.2.0 already, will this be part of 2.2.0? [~rramirez] Please let us know by Monday so we can decide whether it's already resolved by the supplied version or not, thanks!
  3. Kota Iguchi 2017-09-30

    [~rramirez] I am not able to reproduce the issue even on Hyperloop 2.1.3 & 2.2.0 + Titanium 6.2.0.GA. I guess you need to make sure to call GetForCurrentView() _after Window is actually opened_ because there's no Window to retrieve before Window is opened? I tested the code like below.
       var ApplicationView = require('Windows.UI.ViewManagement.ApplicationView');
       
       var win = Ti.UI.createWindow({ backgroundColor: 'green' }),
           Button = require('Windows.UI.Xaml.Controls.Button'),
           button = new Button();
       
       win.addEventListener('open', function() {
           var view = ApplicationView.GetForCurrentView();
           alert(view);
       });
       
       button.Content = 'CLOSE THIS WINDOW';
       button.addEventListener('Tapped', function (e) {
           win.close();
       });
       
       win.add(button);
       win.open();
       
    [~hknoechel] Currently I'm guessing there's nothing to be fixed for this ticket.

JSON Source