Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-26389] iOS: Application throws an error if there is no Ti.UI.Window reference

GitHub Issuen/a
TypeBug
PriorityLow
StatusClosed
ResolutionFixed
Resolution Date2018-09-14T17:24:02.000+0000
Affected Version/sRelease 7.0.0, Release 6.3.0, Release 7.5.0
Fix Version/sRelease 7.5.0
ComponentsiOS
Labelsn/a
ReporterSamir Mohammed
AssigneeVijay Singh
Created2018-09-13T14:02:36.000+0000
Updated2018-09-17T09:28:01.000+0000

Description

When building a blank application or with just console.log/console.time. The following error is shown:
[ERROR] :  ** BUILD FAILED **
[ERROR] :  The following build commands failed:
[ERROR] :  CompileC /Users/Samir/Desktop/newWS/T5/build/iphone/build/Intermediates/T5.build/Debug-iphoneos/T5.build/Objects-normal/armv7/TiViewProxy.o /Users/Samir/Desktop/newWS/T5/build/iphone/Classes/TiViewProxy.m normal armv7 objective-c com.apple.compilers.llvm.clang.1_0.compiler
[ERROR] :  (1 failure)
*Steps to reproduce:*

Create a titanium application

Run the app blank or with something similar to:

console.time('mytimer'); // Start timer
console.timeLog('mytimer'); // Log time taken so far
console.timeLog('mytimer', 'with', 'some', 'extra', 'info'); // Log time taken with extra logging
console.timeLog('mytimer', [ 'a', 'b', 'c' ], { objects: true }); // Should handle Arrays and Objects
console.timeEnd('mytimer');
*Expected result* Application should still build and the console should output something similar to (if the code above is used):
[INFO]  mytimer: 1ms
[INFO]  mytimer: 2ms with some extra info
[INFO]  mytimer: 3ms ["a","b","c"] {"objects":true}
[INFO]  mytimer: 3ms
*Actual result* Build fails and above error is shown.

Attachments

FileDateSize
tlog.txt2018-09-13T14:02:30.000+0000239567

Comments

  1. Vijay Singh 2018-09-14

    [~smohammed] I think this issue will be in previous versions as well e.g. 6.3.0+. Can you please verify once? In my environment I am not able to reproduce this issue. For me macro 'USE_TI_UIWINDOW' is always getting generated in define.h (may be some environment issue for me) . If I comment macro 'USE_TI_UIWINDOW' in define.h, I am able to reproduce the issue. PR (master) - https://github.com/appcelerator/titanium_mobile/pull/10324 PR (7_4_X) - https://github.com/appcelerator/titanium_mobile/pull/10323 Test Case- 1. Mentioned in this ticket 2. Test cases from TIMOB-25301
  2. Samir Mohammed 2018-09-14

  3. Hans Knöchel 2018-09-14

    Quick summary of the root cause: We implemented safe-area support in SDK 6.3.0 to our Ti.UI.Window. But due to our conditional compiling (by using preprocessor statements like USE_TI_UIWINDOW). It seems like we missed one of them, but to be clear: In real apps, there will *always* be at least one window, so this is a minor issue. I'd vote for putting it into 7.5.0, not 7.4.0, since this is not iOS 12 related and no 7.4.0 / 7.x regression.
  4. Samir Mohammed 2018-09-17

    *Closing ticket.* Verified fix in SDK Version: 7.5.0.v20180914153007. Application no longer throws an error when using a blank app. *FR Passed: Test Steps*

    Created a new Titanium application

    Deleted all code

    Ran the application

    Application ran without throwing an error

    This time added the code mentioned in the description (for logging)

    Ran the application

    Application ran without throwing an error and the console displayed the correct output

    *Test Environment*
       APPC Studio: 5.1.0.201808080937
       APPC CLI: 7.0.7-master.1
       iphone 6 (12.0)
       Operating System Name: Mac OS High Sierra
       Operating System Version: 10.13.6
       Node.js Version: 8.9.1
       Xcode 10.0 GM Seed
       

JSON Source