[TIMOB-18541] iOS: Unable to receive touchesBegan on ViewProxy
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Critical |
Status | Closed |
Resolution | Invalid |
Resolution Date | 2017-01-14T23:31:49.000+0000 |
Affected Version/s | n/a |
Fix Version/s | n/a |
Components | iOS |
Labels | n/a |
Reporter | Andrew McElroy |
Assignee | Eric Merriman |
Created | 2015-02-06T18:46:26.000+0000 |
Updated | 2017-01-14T23:31:49.000+0000 |
Description
I have been attempting to squash a truly mind twisting bizarre bug with the Platino module.
I have observed that no matter what I do, on 64 bit I can't receive touchesBegan on a viewproxy.
Can you please tell me what the last githash on titanium_mobile that is free of any 64bit compatibility improvements, and what the first (64bit is now supported) git hash is?
I would be happy to get on a skype or call regarding this issue in further detail
Eric is aware of some of the details.
Thanks.
at this point it is worth asking, what is the purpose of OSAtomicIncrement32Barrier inside TiBase.m I get that the definition of OSAtomicIncrement32Barrier is __inline static int32_t OSAtomicIncrement32Barrier( volatile int32_t *__theValue ) { return OSAtomicAdd32Barrier( 1, __theValue); } But why does kroll use it, why not OSAtomicIncrement64Barrier? Can we be absolutely 100% sure that the JSContext in kroll is 64bit?
[~sophrinix] There are two pieces to the updates. One is the inclusion of a 64-bit version of JSCore. This happened across a few different commits as we updated JSCore more than once as we uncovered bugs. The second piece was the fix of some 64-bit issues in the Titanium SDK, the debugger and the profiler. I am _positive_ that we are at least compiling the SDK and all related properties with a 64-bit slice. * Overall ticket: TIMOB-15327 * Upgrade JSCore: TIMOB-11093 (see PRs at bottom) There are a number of tickets that relate to specific SDK fixes (as linked in the overall ticket) If you'd like us to help, could you provide a test case that reproduces the issue?
If you need access to this repository ( Ingo has read and write access) please comment on this thread or email me sophrinix @ gmail I have created a git repo https://github.com/BlackGateGames/tankgame-with-module and sent out invites to be able to read and write to this repo. It has a copy of the platino code base, a platino game, some screenshots detailing what we are specifically seeing. It also has a zip file which will probably be the most useful: in the build/iphone folder, there is a generated xcodeproj with the platino code included ( so there is no need to building the module and link). The 1 sentence issue we are having is : On armv7 you can see that _sendTouchesForEvent (from TiUIWindow) is being passed to coLanicaPlatinoGameView touchesBegan; whereas, arm64, it is going directly to TiUIView and bypassing the gameview object all together.
[~sophrinix] can you give github access to vishalduggal?
done.
[~vduggal] TIMOB-18545 seems possibly related.
TIMOB-18545 is not related. That is a bug in TiViewProxy. Regarding this bug, the basic issue is that
- (UIView *)hitTest:(CGPoint) point withEvent:(UIEvent *)event
returns nil on the GameView object on 64bit builds. So touches are not delivered to the GameView I have no idea why that method returns nil. I also noticed that the method- (BOOL)pointInside:(CGPoint)point withEvent:(UIEvent *)event
is not called for the GameView when hitTest is invoked . Could be an issue with the layer class they are using (CAEAGLLayer) or a bug in their implementation of hitTest. Either ways I can not reproduce this issue in regular titanium views. I just hacked the hitTest code in TiUIView as shown below and got things to work again though I think the bug needs further investigationSo are you saying that if we add this hack that we shouldn't use to TiUIView that the game view object works in 64bit?
it does totally work. Okay, so why this code is not suitable for being swizzled into a production module?
@[~sophrinix] Like I said, this is just a workaround. The real problem is trying to find out why exactly hitTest returns nil. The workaround just covers the problem doesn't solve it. If I had to use the workaround, I would not put it in the TiUIView class but in the GameView class (CoLanicaPlatinoGameView.m). That way the side effects if any would be localized.
this ticket can be closed. Platino isn't relevant anymore ( unless you happen to be named john or possibly peach). I can't prove that this is an issue outside of the platino codebase.
Closing per Andrew's comment above.