Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-18541] iOS: Unable to receive touchesBegan on ViewProxy

GitHub Issuen/a
TypeBug
PriorityCritical
StatusClosed
ResolutionInvalid
Resolution Date2017-01-14T23:31:49.000+0000
Affected Version/sn/a
Fix Version/sn/a
ComponentsiOS
Labelsn/a
ReporterAndrew McElroy
AssigneeEric Merriman
Created2015-02-06T18:46:26.000+0000
Updated2017-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.

Comments

  1. Andrew McElroy 2015-02-06

    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?
  2. Ingo Muschenetz 2015-02-09

    [~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?
  3. Andrew McElroy 2015-02-09

    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.
  4. Ingo Muschenetz 2015-02-09

    [~sophrinix] can you give github access to vishalduggal?
  5. Andrew McElroy 2015-02-09

    done.
  6. Ingo Muschenetz 2015-02-10

    [~vduggal] TIMOB-18545 seems possibly related.
  7. Vishal Duggal 2015-02-10

    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 investigation
           //HACK. Do not use
           UIView* returnVal =  [super hitTest:point withEvent:event];
           
           if (returnVal == nil && [self isUserInteractionEnabled]) {
               BOOL pointInside = [self pointInside:point withEvent:event];
               if (pointInside) {
                   returnVal = self;
               }
           }
           return returnVal;
       
  8. Andrew McElroy 2015-02-10

    So are you saying that if we add this hack that we shouldn't use to TiUIView that the game view object works in 64bit?
  9. Andrew McElroy 2015-02-10

    it does totally work. Okay, so why this code is not suitable for being swizzled into a production module?
  10. Vishal Duggal 2015-02-10

    @[~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.
  11. Andrew McElroy 2016-12-07

    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.
  12. Eric Merriman 2017-01-14

    Closing per Andrew's comment above.

JSON Source