The combination Xcode 9.3 beta 3 and Eureka 4.1.0 is not working properly on my physical iPhone X device with iOS 11.3 beta 3. The simulator (for iPhone X) is working fine however.
I'm getting an error Thread 1: EXC_BAD_ACCESS (code=2, address=0x16b7eff30) when I click on a Pushrow. A Textrow or Daterow does work normally.
The branch with the latest beta was working fine, so I tried to go back. But that is not working any more:
[!] Error installing Eureka
[!] Failed to download 'Eureka'
Even a small pushrow like the one below is causing the error.
<<< PushRow<String>() {
$0.value = "Test"
$0.title = "Test"
$0.options = ["Test 1","Test 2"]
$0.tag = "test"
}
I have exactly the same issue, works fine on iPhone X simulator but not on physical device.
(I'm on xCode 9.2)
Thanks for letting me know... so it isn't iOS firmware related.
With Xcode 9.3 beta 4 and iOS 11.3 beta 4 on my physical iPhone X the problem is the same. The simulator works fine. Running my app on my iPad with iOS 11.3 beta 4 also works fine.
So it is not related to Xcode 9.3, nor iOS 11.3. It is a specific iPhone X issue.
Hey Guys! Can anyone take a look at this ? I can provide some help if needed.
Yes please we are completely stuck with this problem :(
@mtnbarreto
Stack overflowed and infinite recursion at setup(or init) method on changing some properties, like tintColor
(Cell.tintColorDidChange()
called in that case).
So, quick fix for users would be to move setup of such properties somewhere after update()
event of lifecycle.
Thanks, but I don't know what you propse?!
Even this pushrow crashes:
<<< PushRow<String>() {
$0.value = "Test"
$0.title = "Test"
$0.options = ["Test 1","Test 2"]
$0.tag = "test"
}
There is no update( ) event in there. Or are you asking me to add in one like so:
<<< PushRow<String>() {
.cellUpdate { cell, row in
if !row.isValid {
cell.titleLabel?.textColor = .red } }
$0.value = "Test"
$0.title = "Test"
$0.options = ["Test 1","Test 2"]
$0.tag = "test"
}
Please advise.
@arakweker I am not sure about suggested PushRow
, because my case was related with custom row, and I can have an influence on that behaviour.
So, yes, could you try to move your initialisation in cellUpdate callback parameter?
As well, you can just rollback a Eureka to 4.0.1. I think there wouldn't be such issue.
How do I roll back to 4.01?
I tried pod 'Eureka', '4.01' and still have 4.1.
Downloading dependencies
-> Using Charts (3.0.5)
-> Using Eureka (4.1.0)
-> Using SwiftDate (4.5.1)
@arakweker Have you missed a . in 4.01 ? Should be 4.0.1
Thanks... what a difference a . makes!
Putting cellUpdate 'on top' (see above) generates an error: Reference to member 'cellSetup' cannot be resolved without a contextual type
So, what do you mean with: So, quick fix for users would be to move setup of such properties somewhere after update() event of lifecycle.
What do I have to change here to get it working?
<<< PushRow() {
$0.value = "Test"
$0.title = "Test"
$0.options = ["Test 1","Test 2"]
$0.tag = "test"
}
Oh, and rolling back to 4.0.1 means also I get the compiler error back: Type 'Section' does not conform to protocol 'RangeReplaceableCollection'
So that doesn't make sense.
@arakweker
It looks like you forgot to add the generic constraint <String>
Whatever I do I get a compiler error with 4.0.1 (see screendump). That error goes away when I update to 4.1.0.
Then everything works in the simulator. On my physical iPhone X it doesn't work, my iPhone freezes when I click on a pushrow (even pretty simple pushrows).
So what are you asking me? I really don't understand.
Guess I better wait for a new version.
.
@arakweker seems, we might have different kinds of issues
Could you try, please, on Eureka 4.0.1 the last resort like that:
let row = PushRow<String>().cellUpdate { (cell, row) in
row.value = "Test"
row.title = "Test"
row.options = ["Test 1","Test 2"]
row.tag = "test"
}
Nope doesn't compile with 4.0.1. I get the Swift Compiler error (see screendump above).
I've Xcode 9.3 beta 4, so I guess Eureka 4.1.0 is the minumum version to get rid of the compiler error.
@arakweker I am sorry, there was a misspell in version number, could you run again that snippet, please, with Eureka 4.1.0? Thank you in advance
Ok... update to 4.1.0 again :-)
let row = PushRow
row.value = "Test"
row.title = "Test"
row.options = ["Test 1","Test 2"]
row.tag = "test"
}
So in Xcode the following screen.
Result... this screen in my app (all rows are gone).
What it should look like is:
@arakweker
Wait, but you didn't add row to the section and form :-) So, you can put <<<
operator instead let row
, Xcode tell you about that :)
ok... if I literally do what you ask me, the code is:
<<< = PushRow().cellUpdate { (cell, row) in
row.value = "Test"
row.title = "Test"
row.options = ["Test 1","Test 2"]
row.tag = "test"
}
That is giving errors: 'Expected expression after operator' and 'Cannot convert value of type '(_) -> ()' to expected argument type 'String?'
@arakweker ok, let's fix this, could you try that(remove underscore), please,
<<< PushRow_<_String_>_().cellUpdate { (cell, row) in
row.value = "Test"
row.title = "Test"
row.options = ["Test 1","Test 2"]
row.tag = "test"
}
?
Ok, thanks for your patience.
That is compiling ok and running on the simulator ok.
When I run it on my physical iPhone X I get a freeze...
On my physical iPad it is running ok.
If I tether my physical iPhone X to my Mac, the error I get is: 'Thread 1: EXC_BAD_ACCESS (code=2, address=0x16b0b3f30)' and it occurs in Update( ) - see screen.
That is why I called this issue ' Thread 1: EXC_BAD_ACCESS (code=2, address=0x16b7eff30) - in function Cell.update() ' in the first place...
And now Begoodi can react again with his message:
'I have exactly the same issue, works fine on iPhone X simulator but not on physical device. (I'm on xCode 9.2)'
@arakweker Happy to hear, that code was compiled and run 馃憤
Could you give me a a full stacktrace for that screen? I suggesting, that there is a long recursive call.
On my side, I tried with the simpliest pushrow I could make.
Everything is working except on physical iPhone X device.
I also get this kind of recursive trace.
@mtnbarreto root of the call is at ListCheckRow.swift:48, setting the tint color.
Infinite update cycle happen after that.
It makes sense to me that if tintColorDidChange
calls row.updateCell and the cell's update changes the tintColor then there could be an infinite loop.
But why would that happen only on iPhone X?
To try and see if that is really the error, could somebody try adding a private variable in Cell to store the previous tintColor
and then in tintColorDidChange
only call row.updateCell
if the new tintColor
is different from the previous one?
Let's remove https://github.com/xmartlabs/Eureka/commit/7931948c61ac55027e06ce91fb390429179152fa for now.
Could anyone make a pull request with the fix? Thanks
I don't get it. I don't use tintColorDidChange in my form?
And then why does it work in the simulator? And not on a physical iPhone X?
More than willing to test... but I do need instructions... I'm a newbee with Xcode.
I'm seeing this error (I think) in reported crashes, but unable to reproduce myself (even on a physical iPhone X). I'm also not using tintColorDidChange
at all. The crashes are all reported as occurring on iPhone 7 running iOS 11.2.6.
I have an enormous stack trace which repeats the following 10 lines over and over:
6094 Eureka 0x103062bf4 ListCheckCell.update() -> () (ListCheckRow.swift:48)
6095 Eureka 0x103070f08 Row.updateCell() -> () (Row.swift:163)
6096 Eureka 0x102ffba68 Cell.tintColorDidChange() -> () (Cell.swift:156)
6097 Eureka 0x102ffbaa0 @objc Cell.tintColorDidChange() -> () (Cell.swift)
6098 UIKit 0x18e4a400c -[_UITintColorVisitor _visitView:] + 376
6099 UIKit 0x18e4a47e4 _UIViewVisitorEntertainVisitors + 104
6100 UIKit 0x18e4a37e0 _UIViewVisitorRecursivelyEntertainDescendingVisitors + 188
6101 UIKit 0x18e4a3464 +[_UIViewVisitor _startTraversalOfVisitor:withView:] + 232
6102 UIKit 0x18e1d1428 -[UIView _dispatchTintColorVisitorWithReasons:] + 144
6103 UIKit 0x18df70bb8 -[UIView setTintColor:] + 120
I tried iOS 11.3 beta 5. Problem persists.
Nope, workaround isn't working for me.
Is there other similar tools available to replace Eureka ?
It seems they will not fix that :(
@mtnbarreto I've made a pull request reverting 7931948 as you suggested
merged! We will release a new version containing the fix.
After 4.1.1 everything is working fine on my physical iPhone X. Thanks for the support!
I'm sorry about all the trouble my contribution caused!
I've seen the same crash now in my crash reports, although I haven't been able to personally reproduce it. I believe the issue is the ListCheckCell
which updates the tintColor
inside its update method. This of course creates the infinite loop and the stack overflow that we've seen.
CheckCell
does the same thing.
I have updated and resubmitted my PR with some changes, described therein. Perhaps people who experienced this issue would be able to test the branch my PR is from in order to confirm that this issue does not resurface?
Thread 1: EXC_BAD_ACCESS (code=2, address=0x103eec110)
while (cur) {
for (uint j = 0; j < cur->rebindings_nel; j++) {
if (strcmp(&symbol_name[1], cur->rebindings[j].name) == 0) {
if (cur->rebindings[j].replaced != NULL &&
indirect_symbol_bindings[i] != cur->rebindings[j].replacement) {
*(cur->rebindings[j].replaced) = indirect_symbol_bindings[i];
}
indirect_symbol_bindings[i] = cur->rebindings[j].replacement;
goto symbol_loop;
}
}
cur = cur->next;
}
symbol_loop:;
}
}
Most helpful comment
merged! We will release a new version containing the fix.