Touch "Stuck"

Having problems with building or using CEF's C/C++ APIs? This forum is here to help. Please do not post bug reports or feature requests here.

Touch "Stuck"

Postby Runt8 » Tue Feb 05, 2019 12:45 pm

I've been trying to track down a touch issue in my app that I can duplicate reasonably easy but I haven't been able to make happen in the sample client.

In my app (Windows 64 bit, CEF release branch 3626) we have a CEF view inside the main frame along with some other sibling views. There are options in the UI for re-arranging or hiding the various views, including the CEF view.

When the problem occurs it appears as though a previous touch is still in effect, which causes the view to behave like there is an extra finger being pressed to the screen. For example, one finger scrolling causes a two finger scale to occur.

The process for making the problem occur:
  1. Long press on a link and release to show the context menu.
  2. Hide the CEF view (this actually sets the parent window handle to be not visible, sets the size of the browser HWND to (0, 0), and removes the parent window from the main frame).
  3. Show the CEF view.
  4. If the problem is not exhibited, repeat.

I've also been able to get the problem to occur without showing the context menu by long pressing a link and then dragging, but it seems to be highly dependent on amount of time of the long press, and therefore much more difficult to reproduce. Hiding the CEF view seems to be required.

Every once in a while, after the problem has occurred, a fatal exception is thrown when doing a one-finger scroll : latency_tracker.cc(399) Check failed: (event_timestamp - last_event_timestamp_).InMilliseconds() >=0.

I've attempted to discern if any touch messages were being missed using Spy++, but the act of logging the messages appears to prevent the issue from occurring.

After two days trying to track down the issue I feel as though I've exhausted my (very limited) knowledge of CEF. If anyone has any ideas of where to go from here I would be very grateful!
Runt8
Techie
 
Posts: 29
Joined: Wed Dec 19, 2018 5:17 pm

Re: Touch "Stuck"

Postby Czarek » Thu Feb 07, 2019 6:58 am

A quick search and found this Chromium commit that is related to the error message you get:
https://chromium-review.googlesource.co ... /+/1359311

I suggest you try test other versions of CEF to see if the issue also occurs.
Maintainer of the CEF Python, PHP Desktop and CEF C API projects. My LinkedIn.
User avatar
Czarek
Virtuoso
 
Posts: 1927
Joined: Sun Nov 06, 2011 2:12 am

Re: Touch "Stuck"

Postby Runt8 » Mon Feb 11, 2019 11:44 am

Thank you for the reply!

Is there anyway to determine which version this change was made in? I tried looking for dates to at least see when the change was made and try to determine when it would have been pushed to a release branch but as far as I can tell none of the dates include years...

I'm sure there has to be a better way!

Thanks again!
Runt8
Techie
 
Posts: 29
Joined: Wed Dec 19, 2018 5:17 pm

Re: Touch "Stuck"

Postby ndesktop » Mon Feb 11, 2019 1:08 pm

The specified bug was marked as Android only, which was closed on December 18, so I'd say it might be in beta.
Maybe there is another one?
ndesktop
Master
 
Posts: 756
Joined: Thu Dec 03, 2015 10:10 am

Re: Touch "Stuck"

Postby Runt8 » Tue Mar 05, 2019 5:33 pm

I've tested build 3683, and the latency_tracker exception is no longer thrown. However, the stuck finger issue still occurs. I have found that this only happens when I use the version of CEF that I compiled (in order to get support for proprietary codecs). Using an automated build (in this case branch 3626 since 3683 doesn't seem to be posted yet) doesn't exhibit this issue.

In theory, if I exactly follow the instructions found at https://bitbucket.org/chromiumembedded/ ... QuickStart, should I end up with the same binaries as the automated builds? Or are there differing compile options that are used for the automated builds?
Runt8
Techie
 
Posts: 29
Joined: Wed Dec 19, 2018 5:17 pm

Re: Touch "Stuck"

Postby amaitland » Tue Mar 05, 2019 5:42 pm

Maintainer of the CefSharp project.
amaitland
Virtuoso
 
Posts: 1291
Joined: Wed Jan 14, 2015 2:35 am

Re: Touch "Stuck"

Postby Czarek » Wed Mar 06, 2019 2:25 am

Master branch is not stable and is a different branch then the one available on Spotify builds. The "use_jumbo_build=true" variable may result in some cases in broken code generated by compiler/linker and manifests itself with strange issues occuring in app. Reported cases in the past were on Windows and with proprietary codecs enabled.
Maintainer of the CEF Python, PHP Desktop and CEF C API projects. My LinkedIn.
User avatar
Czarek
Virtuoso
 
Posts: 1927
Joined: Sun Nov 06, 2011 2:12 am

Re: Touch "Stuck"

Postby Runt8 » Wed Mar 06, 2019 5:07 pm

I've been doing more testing and it appears as though some of my previous findings were incorrect.

  1. The latency_tracker exception is unrelated to the stuck touch. It appears to be thrown when using a pinch gesture, and is only thrown in branch 3626. Both 3578 and 3683 do not throw it.
  2. The precompiled binaries for branch 3578 does not have the stuck touch problem.
  3. Both 3626 (precompiled and compiled by me) and 3683 (compiled by me) have the stuck touch problem.

I'm now attempting to compile branch 3578 to verify that am able to build binaries without this issue. I'm using this update.bat file:
Code: Select all
set GN_DEFINES=is_official_build=true
set GN_ARGUMENTS=--ide=vs2017 --sln=cef --filters=//cef/*
set GYP_MSVS_VERSION=2017
set CEF_ARCHIVE_FORMAT=tar.bz2
python ..\automate\automate-git.py --download-dir=c:\code\chromium_git3578 --depot-tools-dir=c:\code\depot_tools --branch=3578 --minimal-distrib --client-distrib --force-clean --x64-build

After many hours of downloading I'm getting stopped here:
Code: Select all
Generating CEF project files...
Creating c:\code\chromium_git3578\chromium\src\out\Release_GN_x86 directory.
________ running 'gn gen out\Release_GN_x86 --ide=vs2017 --sln=cef --filters=//cef/*' in 'c:\code\chromium_git3578\chromium\src'
Traceback (most recent call last):
  File "c:/code/chromium_git3578/chromium/src/build/toolchain/win/setup_toolchain.py", line 295, in <module>
    main()
  File "c:/code/chromium_git3578/chromium/src/build/toolchain/win/setup_toolchain.py", line 287, in main
    assert vc_lib_um_path
AssertionError
ERROR at //build/toolchain/win/BUILD.gn:355:30: Script returned non-zero exit code.
  build_cpu_toolchain_data = exec_script("setup_toolchain.py",
                             ^----------
Current dir: c:/code/chromium_git3578/chromium/src/out/Release_GN_x86/
Command: c:/code/depot_tools/win_tools-2_7_6_bin/python/bin/python.exe c:/code/chromium_git3578/chromium/src/build/toolchain/win/setup_toolchain.py "C:\Program Files (x86)/Microsoft Visual Studio/2017/Professional" "C:\Program Files (x86)\Windows Kits\10" "C:\WINDOWS\Sysnative;C:\WINDOWS/SysWOW64" win x86 environment.x86
Returned 1 and printed out:

vc_bin_dir = "C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Professional\\VC\\Tools\\MSVC\\14.16.27023\\bin\\HostX64\\x86"
include_flags_I = "\"/I..\\..\\..\\..\\..\\..\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Professional\\VC\\Tools\\MSVC\\14.16.27023\\ATLMFC\\include\" \"/I..\\..\\..\\..\\..\\..\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Professional\\VC\\Tools\\MSVC\\14.16.27023\\include\" \"/I..\\..\\..\\..\\..\\..\\Program Files (x86)\\Windows Kits\\NETFXSDK\\4.6.1\\include\\um\" \"/I..\\..\\..\\..\\..\\..\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.17763.0\\ucrt\" \"/I..\\..\\..\\..\\..\\..\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.17134.0\\shared\" \"/I..\\..\\..\\..\\..\\..\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.17134.0\\um\" \"/I..\\..\\..\\..\\..\\..\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.17134.0\\winrt\" \"/I..\\..\\..\\..\\..\\..\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.17134.0\\cppwinrt\""
include_flags_imsvc = "\"-imsvc..\\..\\..\\..\\..\\..\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Professional\\VC\\Tools\\MSVC\\14.16.27023\\ATLMFC\\include\" \"-imsvc..\\..\\..\\..\\..\\..\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Professional\\VC\\Tools\\MSVC\\14.16.27023\\include\" \"-imsvc..\\..\\..\\..\\..\\..\\Program Files (x86)\\Windows Kits\\NETFXSDK\\4.6.1\\include\\um\" \"-imsvc..\\..\\..\\..\\..\\..\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.17763.0\\ucrt\" \"-imsvc..\\..\\..\\..\\..\\..\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.17134.0\\shared\" \"-imsvc..\\..\\..\\..\\..\\..\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.17134.0\\um\" \"-imsvc..\\..\\..\\..\\..\\..\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.17134.0\\winrt\" \"-imsvc..\\..\\..\\..\\..\\..\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.17134.0\\cppwinrt\""
vc_lib_path = "C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Professional\\VC\\Tools\\MSVC\\14.16.27023\\lib\\x86"
vc_lib_atlmfc_path = "C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Professional\\VC\\Tools\\MSVC\\14.16.27023\\ATLMFC\\lib\\x86"

See //BUILD.gn:61:1: which caused the file to be included.
group("gn_all") {
^----------------
Traceback (most recent call last):
  File "c:/code/chromium_git3578/chromium/src/build/toolchain/win/setup_toolchain.py", line 295, in <module>
    main()
  File "c:/code/chromium_git3578/chromium/src/build/toolchain/win/setup_toolchain.py", line 287, in main
    assert vc_lib_um_path
AssertionError
Traceback (most recent call last):
  File "tools\gclient_hook.py", line 133, in <module>
    RunAction(src_dir, cmd)
  File "c:\code\chromium_git3578\chromium\src\cef\tools\gclient_util.py", line 39, in RunAction
    gclient_utils.CheckCallAndFilterAndHeader(command, cwd=dir, always=True)
  File "c:\code\depot_tools\gclient_utils.py", line 314, in CheckCallAndFilterAndHeader
    return CheckCallAndFilter(args, **kwargs)
  File "c:\code\depot_tools\gclient_utils.py", line 576, in CheckCallAndFilter
    rv, args, kwargs.get('cwd', None), None, None)
subprocess2.CalledProcessError: Command 'gn gen out\\Release_GN_x86 --ide=vs2017 --sln=cef --filters=//cef/*' returned non-zero exit status 1 in c:\code\chromium_git3578\chromium\src
Traceback (most recent call last):
  File "..\automate\automate-git.py", line 1504, in <module>
    run(path, cef_src_dir, depot_tools_dir)
  File "..\automate\automate-git.py", line 61, in run
    args, cwd=working_dir, env=env, shell=(sys.platform == 'win32'))
  File "C:\Python27\lib\subprocess.py", line 190, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['c:\\code\\chromium_git3578\\chromium\\src\\cef\\cef_create_projects.bat']' returned non-zero exit status 1


I do have 10.0.15063 of the Windows SDK installed, but it appears as though it may be using a later version (10.0.17763), would this cause the problem I'm seeing? If so, is there a way to specify which SDK to use?

Also, do I need to specify GN_ARGUMENTS?
Runt8
Techie
 
Posts: 29
Joined: Wed Dec 19, 2018 5:17 pm

Re: Touch "Stuck"

Postby Czarek » Wed Mar 06, 2019 5:30 pm

Maintainer of the CEF Python, PHP Desktop and CEF C API projects. My LinkedIn.
User avatar
Czarek
Virtuoso
 
Posts: 1927
Joined: Sun Nov 06, 2011 2:12 am

Re: Touch "Stuck"

Postby Runt8 » Wed Mar 06, 2019 7:15 pm

Thanks for the reply! Lots to parse on that page:

  1. Manually download depot_tools - I've got these from when I built branch 3626.
  2. Sync depot_tools to a revision that existed at the time of the branch - How do I figure out which revision I need to get? Is there a project page for depot_tools?
  3. set the DEPOT_TOOLS_UPDATE=0 environment variable - I've set this in my update.bat script.
  4. Windows build requirements (Win 7+, VS2017 15.7.1+, Win10.0.17134.0 SDK, Ninja) - Same as branch 3626, think I'm all set here.

Using this update script:
Code: Select all
set DEPOT_TOOLS_UPDATE=0
set GN_DEFINES=is_official_build=true
set GYP_MSVS_VERSION=2017
set CEF_ARCHIVE_FORMAT=tar.bz2
python ..\automate\automate-git.py --download-dir=c:\code\chromium_git3578 --depot-tools-dir=c:\code\depot_tools --branch=3578 --minimal-distrib --client-distrib --force-clean --x64-build


Getting this error:
Code: Select all
Generating CEF project files...
Creating c:\code\chromium_git3578\chromium\src\out\Release_GN_x86 directory.
________ running 'gn gen out\Release_GN_x86 --ide=vs2017 --sln=cef --filters=//cef/*' in 'c:\code\chromium_git3578\chromium\src'
Traceback (most recent call last):
  File "c:/code/chromium_git3578/chromium/src/build/toolchain/win/setup_toolchain.py", line 295, in <module>
    main()
  File "c:/code/chromium_git3578/chromium/src/build/toolchain/win/setup_toolchain.py", line 287, in main
    assert vc_lib_um_path
AssertionError
ERROR at //build/toolchain/win/BUILD.gn:355:30: Script returned non-zero exit code.
  build_cpu_toolchain_data = exec_script("setup_toolchain.py",
                             ^----------
Current dir: c:/code/chromium_git3578/chromium/src/out/Release_GN_x86/
Command: c:/code/depot_tools/win_tools-2_7_6_bin/python/bin/python.exe c:/code/chromium_git3578/chromium/src/build/toolchain/win/setup_toolchain.py "C:\Program Files (x86)/Microsoft Visual Studio/2017/Professional" "C:\Program Files (x86)\Windows Kits\10" "C:\WINDOWS\Sysnative;C:\WINDOWS/SysWOW64" win x86 environment.x86
Returned 1 and printed out:

vc_bin_dir = "C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Professional\\VC\\Tools\\MSVC\\14.16.27023\\bin\\HostX64\\x86"
include_flags_I = "\"/I..\\..\\..\\..\\..\\..\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Professional\\VC\\Tools\\MSVC\\14.16.27023\\ATLMFC\\include\" \"/I..\\..\\..\\..\\..\\..\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Professional\\VC\\Tools\\MSVC\\14.16.27023\\include\" \"/I..\\..\\..\\..\\..\\..\\Program Files (x86)\\Windows Kits\\NETFXSDK\\4.6.1\\include\\um\" \"/I..\\..\\..\\..\\..\\..\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.17763.0\\ucrt\" \"/I..\\..\\..\\..\\..\\..\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.17134.0\\shared\" \"/I..\\..\\..\\..\\..\\..\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.17134.0\\um\" \"/I..\\..\\..\\..\\..\\..\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.17134.0\\winrt\" \"/I..\\..\\..\\..\\..\\..\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.17134.0\\cppwinrt\""
include_flags_imsvc = "\"-imsvc..\\..\\..\\..\\..\\..\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Professional\\VC\\Tools\\MSVC\\14.16.27023\\ATLMFC\\include\" \"-imsvc..\\..\\..\\..\\..\\..\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Professional\\VC\\Tools\\MSVC\\14.16.27023\\include\" \"-imsvc..\\..\\..\\..\\..\\..\\Program Files (x86)\\Windows Kits\\NETFXSDK\\4.6.1\\include\\um\" \"-imsvc..\\..\\..\\..\\..\\..\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.17763.0\\ucrt\" \"-imsvc..\\..\\..\\..\\..\\..\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.17134.0\\shared\" \"-imsvc..\\..\\..\\..\\..\\..\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.17134.0\\um\" \"-imsvc..\\..\\..\\..\\..\\..\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.17134.0\\winrt\" \"-imsvc..\\..\\..\\..\\..\\..\\Program Files (x86)\\Windows Kits\\10\\include\\10.0.17134.0\\cppwinrt\""
vc_lib_path = "C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Professional\\VC\\Tools\\MSVC\\14.16.27023\\lib\\x86"
vc_lib_atlmfc_path = "C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Professional\\VC\\Tools\\MSVC\\14.16.27023\\ATLMFC\\lib\\x86"

See //BUILD.gn:61:1: which caused the file to be included.
group("gn_all") {
^----------------
Traceback (most recent call last):
  File "c:/code/chromium_git3578/chromium/src/build/toolchain/win/setup_toolchain.py", line 295, in <module>
    main()
  File "c:/code/chromium_git3578/chromium/src/build/toolchain/win/setup_toolchain.py", line 287, in main
    assert vc_lib_um_path
AssertionError
Traceback (most recent call last):
  File "tools\gclient_hook.py", line 133, in <module>
    RunAction(src_dir, cmd)
  File "c:\code\chromium_git3578\chromium\src\cef\tools\gclient_util.py", line 39, in RunAction
    gclient_utils.CheckCallAndFilterAndHeader(command, cwd=dir, always=True)
  File "c:\code\depot_tools\gclient_utils.py", line 314, in CheckCallAndFilterAndHeader
    return CheckCallAndFilter(args, **kwargs)
  File "c:\code\depot_tools\gclient_utils.py", line 576, in CheckCallAndFilter
    rv, args, kwargs.get('cwd', None), None, None)
subprocess2.CalledProcessError: Command 'gn gen out\\Release_GN_x86 --ide=vs2017 --sln=cef --filters=//cef/*' returned non-zero exit status 1 in c:\code\chromium_git3578\chromium\src
Traceback (most recent call last):
  File "..\automate\automate-git.py", line 1504, in <module>
    run(path, cef_src_dir, depot_tools_dir)
  File "..\automate\automate-git.py", line 61, in run
    args, cwd=working_dir, env=env, shell=(sys.platform == 'win32'))
  File "C:\Python27\lib\subprocess.py", line 190, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['c:\\code\\chromium_git3578\\chromium\\src\\cef\\cef_create_projects.bat']' returned non-zero exit status 1
Runt8
Techie
 
Posts: 29
Joined: Wed Dec 19, 2018 5:17 pm

Next

Return to Support Forum

Who is online

Users browsing this forum: No registered users and 53 guests