[TIMOB-25343] Windows: App crashes when attempting to access ApplicationView
| GitHub Issue | n/a |
|---|---|
| Type | Bug |
| Priority | High |
| Status | Closed |
| Resolution | Cannot Reproduce |
| Resolution Date | 2017-09-30T00:36:53.000+0000 |
| Affected Version/s | Hyperloop 2.1.3 |
| Fix Version/s | n/a |
| Components | Windows |
| Labels | n/a |
| Reporter | Ricardo Ramirez |
| Assignee | Kota Iguchi |
| Created | 2017-09-25T22:00:37.000+0000 |
| Updated | 2019-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
| File | Date | Size |
|---|---|---|
| app.zip | 2017-09-25T21:59:49.000+0000 | 7126441 |
[~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!
[~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.[~hknoechel] Currently I'm guessing there's nothing to be fixed for this ticket.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();