# TX2 OpenCV Camera Nsight (Eclipse) debug issue

**URL:** <https://forums.developer.nvidia.com/t/tx2-opencv-camera-nsight-eclipse-debug-issue/77081>\
**Category:** Jetson TX2\
**Created:** [June 26, 2019, 1:28pm UTC](https://forums.developer.nvidia.com/t/tx2-opencv-camera-nsight-eclipse-debug-issue/77081 "2019-06-26T13:28:55Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![itaowazard](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@itaowazard](https://forums.developer.nvidia.com/u/itaowazard)\
**Post date:** [June 26, 2019, 1:28pm UTC](https://forums.developer.nvidia.com/t/tx2-opencv-camera-nsight-eclipse-debug-issue/77081/1 "2019-06-26T13:28:55Z")

</div>

Hi,  
i’ve try to find some similar posts but found nothing so if i miss some let moderator put my topic to the proper place.

I have simple camera application (USB camera connected to TX2 platform). Task is simple, grab single frame. Everything works fine (debug build and release build), BUT when i try to start remote debug session t crushes on grab frame line (all source before, not related to OpenCV and even related one (f.e. VideoCapture initialization) works just fine, but frame grab cause immediate exception (\_dl\_catch\_exception() ). This make impossible to debug camera application routine in native way.

Is any ideas why this behavior appears?

PS. Maybe this is about SSH permission for camera access (usually -X uses for SSH connection but i haven’t found this option to be set in Nsight Ecllipse GUI. Root user ssh access didn’t solve the issue.

---

<div class="post-metadata">

**Author:** ![AastaLLL](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/aastalll/32/14043_2.png) [@AastaLLL](https://forums.developer.nvidia.com/u/AastaLLL)\
**Post date:** [July 1, 2019, 7:44am UTC](https://forums.developer.nvidia.com/t/tx2-opencv-camera-nsight-eclipse-debug-issue/77081/2 "2019-07-01T07:44:46Z")

</div>

Hi,

You can set -X option inside the Nsight.  
 → Properties  
 → Run/Debug Setting  
 → double click the item  
 → Remote  
 → Remote connection

Please help to give it a try.  
Thanks.

---

<div class="post-metadata">

**Author:** ![itaowazard](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@itaowazard](https://forums.developer.nvidia.com/u/itaowazard)\
**Post date:** [July 1, 2019, 8:41am UTC](https://forums.developer.nvidia.com/t/tx2-opencv-camera-nsight-eclipse-debug-issue/77081/3 "2019-07-01T08:41:56Z")

</div>

> [@AastaLLL](#):
>
> Hi,
> 
> You can set -X option inside the Nsight.  
> → Properties  
> → Run/Debug Setting  
> → double click the item  
> → Remote  
> → Remote connection
> 
> Please help to give it a try.  
> Thanks.

Hi AastaLLL,  
Remove connection settings are the same as for build configuration settings. Remove connection “manage” contain only Host name, user name, label (host name + user name) and system type (SSH) with port number 22. Can you please specify field name where i should paste -X option

Tnx

---

<div class="post-metadata">

**Author:** ![itaowazard](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@itaowazard](https://forums.developer.nvidia.com/u/itaowazard)\
**Post date:** [July 5, 2019, 5:10am UTC](https://forums.developer.nvidia.com/t/tx2-opencv-camera-nsight-eclipse-debug-issue/77081/4 "2019-07-05T05:10:06Z")

</div>

Hi AastaLLL, can you please describe more specifically about settings you suggested?  
Tnx

---

<div class="post-metadata">

**Author:** ![AastaLLL](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/aastalll/32/14043_2.png) [@AastaLLL](https://forums.developer.nvidia.com/u/AastaLLL)\
**Post date:** [July 9, 2019, 8:35am UTC](https://forums.developer.nvidia.com/t/tx2-opencv-camera-nsight-eclipse-debug-issue/77081/5 "2019-07-09T08:35:49Z")

</div>

Hi,

Could you try if you can add the option on label field?  
Ex.Label: -X nvidia@[IP]

Another workaround is to use local display instead of forwarding.

```auto
export DISPLAY=:0

```

Thanks.

---

<div class="post-metadata">

**Author:** ![itaowazard](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@itaowazard](https://forums.developer.nvidia.com/u/itaowazard)\
**Post date:** [July 18, 2019, 7:14am UTC](https://forums.developer.nvidia.com/t/tx2-opencv-camera-nsight-eclipse-debug-issue/77081/6 "2019-07-18T07:14:14Z")

</div>

Hi AastaLLL  
tnx for the answer, it’s been a while since my last visit  
you wrote:

> [@AastaLLL](#):
>
> Hi,
> 
> Could you try if you can add the option on label field?  
> Ex.Label: -X nvidia@[IP]

No change, debug session still fail during OpenCV VideoCapture() initialization

m\_pCaptureDevice = new VideoCapture(“nvarguscamerasrc sensor-id=0 ! video/x-raw(memory:NVMM), width=(int)1920, height=(int)1080, format=(string)NV12, framerate=(fraction)30/1 ! nvvidconv ! video/x-raw, format=(string)BGRx ! videoconvert ! video/x-raw, format=(string)BGR ! appsink”, CAP\_GSTREAMER);

> [@AastaLLL](#):
>
> Another workaround is to use local display instead of forwarding.
> 
> ```auto
> export DISPLAY=:0
> 
> ```
> 
> You meant to set environment variable for debug session? (Environment tab) in Nsight debug session settings? I did but no result either. Debug session still fails.  
> Thanks.

Can you provide some simple example to debug session test?

---

<div class="post-metadata">

**Author:** ![AastaLLL](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/aastalll/32/14043_2.png) [@AastaLLL](https://forums.developer.nvidia.com/u/AastaLLL)\
**Post date:** [July 30, 2019, 8:13am UTC](https://forums.developer.nvidia.com/t/tx2-opencv-camera-nsight-eclipse-debug-issue/77081/7 "2019-07-30T08:13:47Z")

</div>

Hi,

Sorry for the late update.  
Let us check the detail steps in our environment and then update with you.

Thanks.

---

<div class="post-metadata">

**Author:** ![AastaLLL](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/aastalll/32/14043_2.png) [@AastaLLL](https://forums.developer.nvidia.com/u/AastaLLL)\
**Post date:** [August 13, 2019, 8:47am UTC](https://forums.developer.nvidia.com/t/tx2-opencv-camera-nsight-eclipse-debug-issue/77081/8 "2019-08-13T08:47:07Z")

</div>

Hi,

Sorry for the late update.

Although the argument can be set, the Window cannot be redirect to the remote system due to X forwarding issue.  
Do you mind to use the file as output instead.

Thanks.
