Titanium JIRA Archive
Alloy (ALOY)

[ALOY-1590] Android: OS_IOS assigned to a variable causes a crash.

GitHub Issuen/a
TypeBug
PriorityCritical
StatusClosed
ResolutionFixed
Resolution Date2017-11-09T22:39:25.000+0000
Affected Version/sn/a
Fix Version/sCLI Release 7.0.0
ComponentsRuntime
Labelsn/a
ReporterJoshua A. Ceaser
AssigneeFeon Sua Xin Miao
Created2017-11-07T17:36:12.000+0000
Updated2017-11-09T23:01:41.000+0000

Description

When opening a window if the controller has a variable assigned eg. var ANIMATION = OS_IOS; on android the app will crash.

Attachments

FileDateSize
index.js2017-11-07T17:38:49.000+000067

Comments

  1. Mostafizur Rahman 2017-11-08

    Hello [~jceaser], Thanks for sharing with us. Can you please visit this [link](https://gist.github.com/rakhimoni/a801f624bc838da0e303a0a3589d8f16) , test the sample code on iOS platform and let us know the results.
  2. Hans Knöchel 2017-11-08

    The OS_IOS, OS_ANDROID and OS_WINDOWS variables are used by the compiler and resolved to classic Titanium code at build-time, so there are not supposed to be assigned to variables, just like the @available(iOS 11.0,*) flag in Swift. [~fmiao] to confirm, but I don't think this is something we should fix.
  3. Joshua A. Ceaser 2017-11-08

    Why would it work prior to 6.3?
  4. Hans Knöchel 2017-11-08

    [~jceaser] That makes it to a different thing :-) Unfortunately, you didn't provide any context so we could only guess. Please attach your full environment (including Alloy- and Appc-CLI-version).
  5. Joshua A. Ceaser 2017-11-08

    Sorry about that, I created the ticket too fast. What information do you need about my environment?
  6. Joshua A. Ceaser 2017-11-08

    I was using 6.3.0.GA when I got this error Appcelerator Command-Line Interface, version 6.3.0 Copyright (c) 2014-2017, Appcelerator, Inc. All Rights Reserved. Operating System Name = Mac OS X Version = 10.12.6 Architecture = 64bit # CPUs = 8 Memory = 16.0GB Node.js Node.js Version = 6.10.3 npm Version = 3.10.10 Titanium CLI CLI Version = 5.0.14 node-appc Version = 0.2.41
  7. Feon Sua Xin Miao 2017-11-09

    PR: https://github.com/appcelerator/alloy/pull/858
  8. Eric Wieber 2017-11-09

    FR Passed. Error is no longer present when using OS_IOS, OS_ANDROID, and OS_WINDOWS in variable assignment.

JSON Source