feichtenhofer / gpu_flow

GPU based optical flow extraction in OpenCV
430 stars 109 forks source link

Segmentation Fault When Writing to Bins #18

Closed Etang21 closed 3 years ago

Etang21 commented 5 years ago

Description Settingbins=true in compute_flow.cpp, rebuilding, and running compute_flow results a Segmentation fault. This appears to be due to an incorrect initialization of the fx file descriptor in compute_flow.cpp:263, resulting in a write to a NULL file descriptor.

Error Log

(base) etang21@tibet15:/vision/u/etang21/gpu_flow/build$ ./compute_flow --vid_path=/scr/etang21/TH14/ex/thumos-vids --out_path=/scr/etang21/TH14/ex/replicate/TH14_frames_flow_unscaled --gpuID=0
start_vid:1gpuID:0flow method: 1 frameSkip: 1 vid_path: /scr/etang21/TH14/ex/thumos-vids out_path/scr/etang21/TH14/ex/replicate/TH14_frames_flow_unscaled jpegs: /scr/etang21/TH14/ex/replicate/TH14_frames_flow_unscaled/rgb/
Device 0:  "Tesla K40m"  11441Mb, sm_35, 2880 cores, Driver/Runtime ver.10.10/9.0
/scr/etang21/TH14/ex/thumos-vids/thumos15_video_validation_0000001.mp4    0/1
Segmentation fault

Fix Fixing the initialization on compute_flow.cpp:263 fixes the issue. @pedro-abreu, this bug appears to have been introduced in b57b69a837a97e6688a9fc3ce8a128e23cc031c1. I'll submit a pull-request momentarily!

pfabreu commented 5 years ago

My bad, you're absolutely correct. Thanks!

Etang21 commented 5 years ago

No problem!

Etang21 commented 3 years ago

This issue is fixed in PR #19. @pedro-abreu, feel free to merge in #19 at any time, and I will close the issue for the time being.