eclipsesource / eclipsesource/tabris-js

Some warnings cause Android Not Responding error

Open
#1,996 8 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
1.4k
Forks
171
PR merge metrics
No merged PRs in 30d

Description

# Problem description
The function responsible for logging warnings is called incorrectly.
It seems to me that instead of executing a certain piece of JS code, everything is executed at once, which leads to ANR (you can see it in log)

### Expected behavior
???

### Environment
- Tabris.js version: Tabris 3.3.0-20200127-0519
- Device: Xiaomi Redmi 5 Plus
- OS: Android 8.1.0

### Code snippet
```javascript
import { ImageView, contentView } from 'tabris';

// I don't know why, but if you call this immediately after launch, nothing bad will happen.
setTimeout(() => {
// Here I specifically left a layout error to trigger a warning in the console
new ImageView({ top: 'prev() 15', right: 0, width: 40, height: 40, cornerRadius: 15, background: '#eee', centerX: 0, highlightOnTouch: true, image: 'https://i.imgur.com/O0g4J0f.png', padding: 15, tintColor: 'gray' })
.appendTo(contentView);
}, 1000);
```

ANR Log: https://hastebin.com/migexujaya.pl

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.