Repository: opencv
Issue: G-API error in VASObjectTracker test
Labels: bug,category: g-api / gapi

### System Information

OpenCV version: 4.x
OS: Android 14
Device: Google Pixel 8
Compiler: CLang

### Detailed description

`VASObjectTracker.PipelineTest` fails with the following messages:

<details>
<summary>Log</summary>

```
CTEST_FULL_OUTPUT
OpenCV version: 4.10.0-dev
OpenCV VCS version: 4.9.0-551-g1363b7813d-dirty
Build type: Debug
Compiler: /home/savuor/Android/Sdk/ndk/25.1.8937393/toolchains/llvm/prebuilt/linux-x86_64/bin/clang++  (ver 14.0.6)
[ INFO:0@0.942] global registry_parallel.impl.hpp:96 ParallelBackendRegistry core(parallel): Enabled backends(2, sorted by priority): TBB(1000); OPENMP(990)
[ INFO:0@0.943] global parallel_for.tbb.hpp:54 ParallelForBackend Initializing TBB parallel backend: TBB_INTERFACE_VERSION=12110
[ INFO:0@0.943] global parallel.cpp:77 createParallelForAPI core(parallel): using backend: TBB (priority=1000)
Parallel framework: tbb (nthreads=9)
CPU features: NEON FP16 *NEON_DOTPROD *NEON_FP16 *NEON_BF16?
TEST: Skip tests with tags: 'mem_6gb', 'verylong', 'debug_verylong'
Note: Google Test filter = VASObjectTracker.PipelineTest
[==========] Running 1 test from 1 test case.
[----------] Global test environment set-up.
[----------] 1 test from VASObjectTracker
[ RUN      ] VASObjectTracker.PipelineTest
[ INFO:0@1.013] global kernels.cpp:258 expandKernels Final graph: 11 nodes

[ INFO:0@1.016] global gcompiler.cpp:416 runPasses All compiler passes are successful
[ INFO:0@1.018] global videoio_registry.cpp:244 VideoBackendRegistry VIDEOIO: Enabled backends(7, sorted by priority): FFMPEG(1000); GSTREAMER(990); INTEL_MFX(980); CV_IMAGES(970); CV_MJPEG(960); UEYE(950); ANDROID_NATIVE(940)
[ INFO:0@1.018] global backend_plugin.cpp:369 getPluginCandidates VideoIO plugin (FFMPEG): glob is 'libopencv_videoio_ffmpeg*.so', 1 location(s)
[ INFO:0@1.019] global backend_plugin.cpp:379 getPluginCandidates     - /data/local/tmp: 0
[ INFO:0@1.019] global backend_plugin.cpp:383 getPluginCandidates Found 0 plugin(s) for FFMPEG
[ INFO:0@1.019] global backend_plugin.cpp:369 getPluginCandidates VideoIO plugin (GSTREAMER): glob is 'libopencv_videoio_gstreamer*.so', 1 location(s)
[ INFO:0@1.020] global backend_plugin.cpp:379 getPluginCandidates     - /data/local/tmp: 0
[ INFO:0@1.020] global backend_plugin.cpp:383 getPluginCandidates Found 0 plugin(s) for GSTREAMER
[ INFO:0@1.020] global backend_plugin.cpp:369 getPluginCandidates VideoIO plugin (INTEL_MFX): glob is 'libopencv_videoio_intel_mfx*.so', 1 location(s)
[ INFO:0@1.021] global backend_plugin.cpp:379 getPluginCandidates     - /data/local/tmp: 0
[ INFO:0@1.021] global backend_plugin.cpp:383 getPluginCandidates Found 0 plugin(s) for INTEL_MFX
[ INFO:0@1.021] global cap_images.cpp:289 icvExtractPattern Pattern: /sdcard/testdata/cv/video/%03dx576.avi @ 768
[ INFO:0@1.024] global cap_images.cpp:338 open CAP_IMAGES: File is not an image: /sdcard/testdata/cv/video/768x576.avi
unknown file: Failure
C++ exception with description "OpenCV(4.10.0-dev) /home/savuor/ocv/4.x/opencv/modules/gapi/include/opencv2/gapi/streaming/cap.hpp:83: error: (-2:Unspecified error) Couldn't grab the very first frame in function 'prep'
" thrown in the test body.
[  FAILED  ] VASObjectTracker.PipelineTest (107 ms)
[----------] 1 test from VASObjectTracker (107 ms total)

```
</details>

### Steps to reproduce

See [this instruction in OpenCV Wiki](https://github.com/opencv/opencv/wiki/Running-native-OpenCV-code-with-Hardware-Address-Sanitizer)
Run test:
```
LD_PRELOAD=/data/local/tmp/libc++_shared.so ./opencv_test_gapi --gtest_filter=VASObjectTracker.PipelineTest
```
Probably can be reproduced w/o HWASan

### Issue submission checklist

- [X] I report the issue, it's not a question
- [X] I checked the problem with documentation, FAQ, open issues, forum.opencv.org, Stack Overflow, etc and have not found any solution
- [X] I updated to the latest OpenCV version and the issue is still there
- [X] There is reproducer code and related data files (videos, images, onnx, etc)