AravisProject / aravis

A vision library for genicam based cameras
GNU Lesser General Public License v2.1
868 stars 325 forks source link

Problem popping buffer in windows #759

Open gotnone opened 1 year ago

gotnone commented 1 year ago

Describe the bug arv-acquisiton-test fails to pop a buffer on several windows machines. This behavior can be generalized to any of the arvstream*_pop_buffer functions. Strangely, it works on another windows machine. All machines are running Windows 10, but there may be differences in which updates are installed.

To Reproduce Build Aravis from source on windows. Then ensure that the correct dlls are in the same directory with arv-acquisition-test. Run arv-acquisition-test or any Aravis program that attempts to pop a buffer.

Expected behavior Expect the buffer to be popped and control returned if using the blocking arv_stream_pop_buffer.

Camera description:

Platform description:

Additional context The camera works consistently with a Linux test machine for all of the mentioned library versions. It also works well with one of the Windows computers that I tested with. I have used the DepenedenciesGui and ProcessExplorer to verify that the correct dlls are being found by the test program.

On the machines where the buffer fails to transmit, there doesn't seem to be any obvious indication of an error. The camera does correctly trigger on the AcquisitionStart command and will activate the flash if configured to do so. If the camera is configured for external trigger, the AcquisitonStart command appears to properly prepare the camera and a rising edge on the trigger line causes the flash to activate. However, instead of transmitting the buffer, the library and camera remain in a perpetual Heartbeat Ack loop.

Working and broken machines have had any Mingw64 / Msys2 Aravis libraries removed. Only the built-from-source Aravis libraries are present on the machines. The problem is present when building with gcc (Mingw64 and the Mingw64 UCRT versions), as well as the Clang 15.1 installed with the Visual Studio Build Tools.

All Windows machines will work with vendor supplied library.

Typical debug output for non-working Windows machine.

[18:50:46.798] 🅸 stream> [GvStream::stream_new] Destination stream port = 61934
[18:50:46.798] 🅸 stream> [GvStream::stream_new] Source stream port = 61934
[18:50:46.798] 🅸 stream> [GvStream::loop] Standard socket method
[18:50:46.798] 🅳 genicam> [GcRegisterNode::_get_integer_value] address = 0xa090, valu
e = 0x57e400
[18:50:46.798] 🅳 genicam> [GcEnumeration::set_string_value] value = 0 - string = Sing
leFrame
[18:50:46.798] 🅳 genicam> [GcRegisterNode::_set_integer_value] address = 0xa200, valu
e = 0x0
[18:50:46.813] 🅳 genicam> [GcRegisterNode::_set_integer_value] address = 0xa204, valu
e = 0x1
[18:50:46.813] 🅳 genicam> [GcCommand::execute] AcquisitionStart (0x1)
[18:50:47.657] 🅳 device> [GvDevice::Heartbeat] Ack value = 2
[18:50:48.672] 🅳 device> [GvDevice::Heartbeat] Ack value = 2
[18:50:49.687] 🅳 device> [GvDevice::Heartbeat] Ack value = 2
[18:50:50.703] 🅳 device> [GvDevice::Heartbeat] Ack value = 2
[18:50:51.716] 🅳 device> [GvDevice::Heartbeat] Ack value = 2
[18:50:52.726] 🅳 device> [GvDevice::Heartbeat] Ack value = 2

The working Windows machine prints the following

[21:10:48.018] 🅸 stream> [GvStream::stream_new] Destination stream port = 61927
[21:10:48.018] 🅸 stream> [GvStream::stream_new] Source stream port = 61927
[21:10:48.019] 🅸 stream> [GvStream::loop] Standard socket method
[21:10:48.024] 🅳 genicam> [GcRegisterNode::_get_integer_value] address = 0xa090, value = 0x1d4c00
[21:10:48.024] 🅳 genicam> [GcEnumeration::set_string_value] value = 0 - string = SingleFrame
[21:10:48.024] 🅳 genicam> [GcRegisterNode::_set_integer_value] address = 0xa200, value = 0x0
[21:10:48.029] 🅳 genicam> [GcRegisterNode::_set_integer_value] address = 0xa204, value = 0x1
[21:10:48.031] 🅳 genicam> [GcCommand::execute] AcquisitionStart (0x1)
[21:10:48.152] 🅳 stream-thread> [GvStream::find_frame_data] Start frame 1
[21:10:48.152] 🅳 misc> [PixelFormat::to_gst_caps_string] 0x01080001 -> video/x-raw, format=(string)G
RAY8
[21:10:48.152] 🅳 sp> packet_type  =       ok (0x0000)
                     content_type = data-leader (0x0001)
                     frame_id     =        1
                     packet_id    =        0
                     data_size    =       36
                     payload_type = image
                     pixel format = video/x-raw, format=(string)GRAY8
                     width        = 1600
                     height       = 1200
                     x_offset     = 0
                     y_offset     = 0
EmmanuelP commented 1 year ago

Hi,

Could you attach the packet statistics at the end of the log ?

gotnone commented 1 year ago

Here is the result from the working windows computer. It is an older laptop and the network card has seen better days.

[21:10:49.201] 🅸 stream>     bins    ;frame_retent; packet_time;inter_packet
                                    0;           0;          60;        3784
                                 2000;           0;          40;          64
                                 4000;           0;          60;          32
                                 6000;           0;          60;          14
                                 8000;           0;          60;          11
                                10000;           0;          60;           5
                                12000;           0;          32;           2
                                14000;           0;          48;           3
                                16000;           0;          48;           1
                                18000;           0;          32;           0
                                20000;           0;          48;           2
                                22000;           0;          32;           1
                                24000;           0;          48;           0
                                26000;           0;          16;           3
                                28000;           0;          16;           1
                                30000;           0;          16;           0
                                32000;           0;          16;           0
                                34000;           0;          16;           0
                                36000;           0;           0;           0
                                38000;           0;          16;           2
                                40000;           0;           0;           0
                                42000;           0;          16;           0
                                44000;           0;           0;           0
                                46000;           0;           0;           0
                                48000;           0;           0;           0
                                50000;           0;          16;           0
                                52000;           0;           0;           0
                                54000;           0;          16;           0
                                56000;           0;           0;           0
                                58000;           0;           0;           0
                                60000;           0;          16;           0
                                62000;           0;           0;           0
                                64000;           0;          16;           0
                                66000;           0;           0;           0
                                68000;           0;           0;           0
                                70000;           0;           0;           0
                                72000;           0;          16;           0
                                74000;           0;           0;           0
                                76000;           0;           0;           0
                                78000;           0;           0;           0
                                80000;           0;          16;           0
                                82000;           0;           0;           0
                                84000;           0;          16;           0
                                86000;           0;           0;           0
                                88000;           0;           0;           0
                                90000;           0;           0;           0
                                92000;           0;           0;           0
                                94000;           0;           0;           0
                                96000;           0;           0;           0
                                98000;           0;           0;           0
                               100000;           0;           0;           0
                               102000;           0;           0;           0
                               104000;           0;           0;           0
                               106000;           0;           0;           0
                               108000;           0;           0;           0
                               110000;           0;           0;           0
                               112000;           0;          16;           0
                               114000;           0;           0;           0
                               116000;           0;           0;           0
                               118000;           0;           0;           0
                               120000;           0;           0;           0
                               122000;           0;           0;           0
                               124000;           0;           0;           0
                               126000;           0;           0;           0
                               128000;           0;           0;           0
                               130000;           0;           0;           0
                               132000;           0;           0;           0
                               134000;           0;          16;           0
                               136000;           0;           0;           0
                               138000;           0;           0;           0
                               140000;           0;          16;           0
                               142000;           0;           0;           0
                               144000;           0;          16;           0
                               146000;           0;           0;           0
                               148000;           0;           0;           0
                               150000;           0;           0;           0
                               152000;           0;           0;           0
                               154000;           0;           0;           0
                               156000;           0;          16;           0
                               158000;           0;           0;           0
                               160000;           0;           0;           0
                               162000;           0;           0;           0
                               164000;           0;           0;           0
                               166000;           0;          16;           0
                               168000;           0;           0;           0
                               170000;           0;           0;           0
                               172000;           0;          16;           0
                               174000;           0;           0;           0
                               176000;           0;           0;           0
                               178000;           0;          16;           0
                               180000;           0;           0;           0
                               182000;           0;           0;           0
                               184000;           0;           0;           0
                               186000;           0;           0;           0
                               188000;           0;          16;           0
                               190000;           0;          16;           0
                         -------------
                         >=    192000;           1;        2914;           0
                         <          0;           0;           0;           0
                         min         : 1.04662e+06;           0;           0
                         max         : 1.04662e+06; 1.04662e+06;       38800
                         last max at :           0;        3921;        2211
                         counter     :           1:        3926:        3925
[21:10:49.203] 🅸 stream> [GvStream::finalize] n_completed_buffers    = 1
[21:10:49.203] 🅸 stream> [GvStream::finalize] n_failures             = 0
[21:10:49.203] 🅸 stream> [GvStream::finalize] n_underruns            = 0
[21:10:49.203] 🅸 stream> [GvStream::finalize] n_timeouts             = 0
[21:10:49.203] 🅸 stream> [GvStream::finalize] n_aborted              = 0
[21:10:49.203] 🅸 stream> [GvStream::finalize] n_missing_frames       = 0
[21:10:49.203] 🅸 stream> [GvStream::finalize] n_size_mismatch_errors = 0
[21:10:49.203] 🅸 stream> [GvStream::finalize] n_received_packets     = 3926
[21:10:49.203] 🅸 stream> [GvStream::finalize] n_missing_packets      = 0
[21:10:49.203] 🅸 stream> [GvStream::finalize] n_error_packets        = 0
[21:10:49.203] 🅸 stream> [GvStream::finalize] n_ignored_packets      = 0
[21:10:49.203] 🅸 stream> [GvStream::finalize] n_resend_requests      = 34050
[21:10:49.204] 🅸 stream> [GvStream::finalize] n_resent_packets       = 3058
[21:10:49.204] 🅸 stream> [GvStream::finalize] n_resend_ratio_reached = 0
[21:10:49.204] 🅸 stream> [GvStream::finalize] n_resend_disabled      = 0
[21:10:49.204] 🅸 stream> [GvStream::finalize] n_duplicated_packets   = 174
[21:10:49.204] 🅸 stream> [GvStream::finalize] n_transferred_bytes    = 2040540
[21:10:49.204] 🅸 stream> [GvStream::finalize] n_ignored_bytes        = 0
[21:10:49.204] 🅸 stream> [Stream::finalize] Flush 0 buffer[s] in input queue
[21:10:49.204] 🅸 stream> [Stream::finalize] Flush 0 buffer[s] in output queue
Image successfully acquired

I can not capture any statistics from the broken windows machines because arv-acquisition-test.exe uses a blocking call to pop the buffer. The program just sits in a loop printing the heartbeat ack line.

[18:50:52.726] 🅳 device> [GvDevice::Heartbeat] Ack value = 2

If i try to interrupt the program when it is stuck in this state, no statistics are printed.

I will try to modify the program to use a timeout version of pop buffer to see if there are any packet statistics printed in that case.

gotnone commented 1 year ago

Here is a log from a non-working windows machine. I modified the timeout in arv_camera_acquisition to 100 seconds (100 * 1000000). Trigger seems to have been configured correctly, and camera flash operated, but no buffer is transmitted before the timeout expired.

[20:20:36.078] 🅳 genicam> [GcCommand::execute] AcquisitionStart (0x1)
[20:20:36.922] 🅳 device> [GvDevice::Heartbeat] Ack value = 2
[20:20:37.937] 🅳 device> [GvDevice::Heartbeat] Ack value = 2
[20:20:38.953] 🅳 device> [GvDevice::Heartbeat] Ack value = 2
[20:20:39.968] 🅳 device> [GvDevice::Heartbeat] Ack value = 2
[20:20:40.983] 🅳 device> [GvDevice::Heartbeat] Ack value = 2
[20:20:41.998] 🅳 device> [GvDevice::Heartbeat] Ack value = 2
[20:20:43.014] 🅳 device> [GvDevice::Heartbeat] Ack value = 2
[20:20:44.029] 🅳 device> [GvDevice::Heartbeat] Ack value = 2
[20:20:45.044] 🅳 device> [GvDevice::Heartbeat] Ack value = 2
[20:20:46.060] 🅳 device> [GvDevice::Heartbeat] Ack value = 2
[20:20:47.075] 🅳 device> [GvDevice::Heartbeat] Ack value = 2
[20:20:48.090] 🅳 device> [GvDevice::Heartbeat] Ack value = 2
[20:20:49.105] 🅳 device> [GvDevice::Heartbeat] Ack value = 2
[20:20:50.121] 🅳 device> [GvDevice::Heartbeat] Ack value = 2
[20:20:51.136] 🅳 device> [GvDevice::Heartbeat] Ack value = 2
[20:20:52.142] 🅳 device> [GvDevice::Heartbeat] Ack value = 2
[20:20:53.158] 🅳 device> [GvDevice::Heartbeat] Ack value = 2
[20:20:54.173] 🅳 device> [GvDevice::Heartbeat] Ack value = 2
[20:20:55.188] 🅳 device> [GvDevice::Heartbeat] Ack value = 2
[20:20:56.204] 🅳 device> [GvDevice::Heartbeat] Ack value = 2
[20:20:57.219] 🅳 device> [GvDevice::Heartbeat] Ack value = 2
[20:20:58.235] 🅳 device> [GvDevice::Heartbeat] Ack value = 2
[20:20:59.250] 🅳 device> [GvDevice::Heartbeat] Ack value = 2
[20:21:00.265] 🅳 device> [GvDevice::Heartbeat] Ack value = 2
[20:21:01.280] 🅳 device> [GvDevice::Heartbeat] Ack value = 2
[20:21:02.295] 🅳 device> [GvDevice::Heartbeat] Ack value = 2
[20:21:03.311] 🅳 device> [GvDevice::Heartbeat] Ack value = 2
[20:21:04.326] 🅳 device> [GvDevice::Heartbeat] Ack value = 2
[20:21:05.342] 🅳 device> [GvDevice::Heartbeat] Ack value = 2
[20:21:06.357] 🅳 device> [GvDevice::Heartbeat] Ack value = 2
[20:21:07.372] 🅳 device> [GvDevice::Heartbeat] Ack value = 2
[20:21:08.387] 🅳 device> [GvDevice::Heartbeat] Ack value = 2
[20:21:09.403] 🅳 device> [GvDevice::Heartbeat] Ack value = 2
[20:21:10.418] 🅳 device> [GvDevice::Heartbeat] Ack value = 2
[20:21:11.433] 🅳 device> [GvDevice::Heartbeat] Ack value = 2
[20:21:12.449] 🅳 device> [GvDevice::Heartbeat] Ack value = 2
[20:21:13.464] 🅳 device> [GvDevice::Heartbeat] Ack value = 2
[20:21:14.479] 🅳 device> [GvDevice::Heartbeat] Ack value = 2
[20:21:15.495] 🅳 device> [GvDevice::Heartbeat] Ack value = 2
[20:21:16.510] 🅳 device> [GvDevice::Heartbeat] Ack value = 2
[20:21:17.525] 🅳 device> [GvDevice::Heartbeat] Ack value = 2
[20:21:18.540] 🅳 device> [GvDevice::Heartbeat] Ack value = 2
[20:21:19.556] 🅳 device> [GvDevice::Heartbeat] Ack value = 2
[20:21:20.571] 🅳 device> [GvDevice::Heartbeat] Ack value = 2
[20:21:21.586] 🅳 device> [GvDevice::Heartbeat] Ack value = 2
[20:21:22.602] 🅳 device> [GvDevice::Heartbeat] Ack value = 2
[20:21:23.612] 🅳 device> [GvDevice::Heartbeat] Ack value = 2
[20:21:24.628] 🅳 device> [GvDevice::Heartbeat] Ack value = 2
[20:21:25.643] 🅳 device> [GvDevice::Heartbeat] Ack value = 2
[20:21:26.658] 🅳 device> [GvDevice::Heartbeat] Ack value = 2
[20:21:27.674] 🅳 device> [GvDevice::Heartbeat] Ack value = 2
[20:21:28.689] 🅳 device> [GvDevice::Heartbeat] Ack value = 2
[20:21:29.704] 🅳 device> [GvDevice::Heartbeat] Ack value = 2
[20:21:30.719] 🅳 device> [GvDevice::Heartbeat] Ack value = 2
[20:21:31.735] 🅳 device> [GvDevice::Heartbeat] Ack value = 2
[20:21:32.750] 🅳 device> [GvDevice::Heartbeat] Ack value = 2
[20:21:33.765] 🅳 device> [GvDevice::Heartbeat] Ack value = 2
[20:21:34.780] 🅳 device> [GvDevice::Heartbeat] Ack value = 2
[20:21:35.796] 🅳 device> [GvDevice::Heartbeat] Ack value = 2
[20:21:36.811] 🅳 device> [GvDevice::Heartbeat] Ack value = 2
[20:21:37.827] 🅳 device> [GvDevice::Heartbeat] Ack value = 2
[20:21:38.842] 🅳 device> [GvDevice::Heartbeat] Ack value = 2
[20:21:39.857] 🅳 device> [GvDevice::Heartbeat] Ack value = 2
[20:21:40.872] 🅳 device> [GvDevice::Heartbeat] Ack value = 2
[20:21:41.888] 🅳 device> [GvDevice::Heartbeat] Ack value = 2
[20:21:42.903] 🅳 device> [GvDevice::Heartbeat] Ack value = 2
[20:21:43.918] 🅳 device> [GvDevice::Heartbeat] Ack value = 2
[20:21:44.934] 🅳 device> [GvDevice::Heartbeat] Ack value = 2
[20:21:45.949] 🅳 device> [GvDevice::Heartbeat] Ack value = 2
[20:21:46.964] 🅳 device> [GvDevice::Heartbeat] Ack value = 2
[20:21:47.964] 🅳 device> [GvDevice::Heartbeat] Ack value = 2
[20:21:48.980] 🅳 device> [GvDevice::Heartbeat] Ack value = 2
[20:21:49.995] 🅳 device> [GvDevice::Heartbeat] Ack value = 2
[20:21:51.010] 🅳 device> [GvDevice::Heartbeat] Ack value = 2
[20:21:52.026] 🅳 device> [GvDevice::Heartbeat] Ack value = 2
[20:21:53.041] 🅳 device> [GvDevice::Heartbeat] Ack value = 2
[20:21:54.056] 🅳 device> [GvDevice::Heartbeat] Ack value = 2
[20:21:55.071] 🅳 device> [GvDevice::Heartbeat] Ack value = 2
[20:21:56.087] 🅳 device> [GvDevice::Heartbeat] Ack value = 2
[20:21:57.102] 🅳 device> [GvDevice::Heartbeat] Ack value = 2
[20:21:58.117] 🅳 device> [GvDevice::Heartbeat] Ack value = 2
[20:21:59.133] 🅳 device> [GvDevice::Heartbeat] Ack value = 2
[20:22:00.148] 🅳 device> [GvDevice::Heartbeat] Ack value = 2
[20:22:01.163] 🅳 device> [GvDevice::Heartbeat] Ack value = 2
[20:22:02.178] 🅳 device> [GvDevice::Heartbeat] Ack value = 2
[20:22:03.194] 🅳 device> [GvDevice::Heartbeat] Ack value = 2
[20:22:04.209] 🅳 device> [GvDevice::Heartbeat] Ack value = 2
[20:22:05.224] 🅳 device> [GvDevice::Heartbeat] Ack value = 2
[20:22:06.240] 🅳 device> [GvDevice::Heartbeat] Ack value = 2
[20:22:07.255] 🅳 device> [GvDevice::Heartbeat] Ack value = 2
[20:22:08.270] 🅳 device> [GvDevice::Heartbeat] Ack value = 2
[20:22:09.286] 🅳 device> [GvDevice::Heartbeat] Ack value = 2
[20:22:10.301] 🅳 device> [GvDevice::Heartbeat] Ack value = 2
[20:22:11.316] 🅳 device> [GvDevice::Heartbeat] Ack value = 2
[20:22:12.331] 🅳 device> [GvDevice::Heartbeat] Ack value = 2
[20:22:13.347] 🅳 device> [GvDevice::Heartbeat] Ack value = 2
[20:22:14.362] 🅳 device> [GvDevice::Heartbeat] Ack value = 2
[20:22:15.377] 🅳 device> [GvDevice::Heartbeat] Ack value = 2
[20:22:16.080] 🅳 genicam> [GcRegisterNode::_set_integer_value] address = 0xa208, valu
e = 0x1
[20:22:16.080] 🅳 genicam> [GcCommand::execute] AcquisitionStop (0x1)
[20:22:16.080] 🅸 stream>     bins    ;frame_retent; packet_time;inter_packet
                                    0;           0;           0;           0
                         -------------
                         >=      2000;           0;           0;           0
                         <          0;           0;           0;           0
                         min         :         n/a;         n/a;         n/a
                         max         :         n/a;         n/a;         n/a
                         last max at :           0;           0;           0
                         counter     :           0:           0:           0
[20:22:16.080] 🅸 stream> [GvStream::finalize] n_completed_buffers    = 0
[20:22:16.080] 🅸 stream> [GvStream::finalize] n_failures             = 0
[20:22:16.080] 🅸 stream> [GvStream::finalize] n_underruns            = 0
[20:22:16.080] 🅸 stream> [GvStream::finalize] n_timeouts             = 0
[20:22:16.096] 🅸 stream> [GvStream::finalize] n_aborted              = 0
[20:22:16.096] 🅸 stream> [GvStream::finalize] n_missing_frames       = 0
[20:22:16.096] 🅸 stream> [GvStream::finalize] n_size_mismatch_errors = 0
[20:22:16.096] 🅸 stream> [GvStream::finalize] n_received_packets     = 0
[20:22:16.096] 🅸 stream> [GvStream::finalize] n_missing_packets      = 0
[20:22:16.096] 🅸 stream> [GvStream::finalize] n_error_packets        = 0
[20:22:16.096] 🅸 stream> [GvStream::finalize] n_ignored_packets      = 0
[20:22:16.096] 🅸 stream> [GvStream::finalize] n_resend_requests      = 0
[20:22:16.096] 🅸 stream> [GvStream::finalize] n_resent_packets       = 0
[20:22:16.096] 🅸 stream> [GvStream::finalize] n_resend_ratio_reached = 0
[20:22:16.096] 🅸 stream> [GvStream::finalize] n_resend_disabled      = 0
[20:22:16.096] 🅸 stream> [GvStream::finalize] n_duplicated_packets   = 0
[20:22:16.111] 🅸 stream> [GvStream::finalize] n_transferred_bytes    = 0
[20:22:16.111] 🅸 stream> [GvStream::finalize] n_ignored_bytes        = 0
[20:22:16.111] 🅸 stream> [Stream::finalize] Flush 1 buffer[s] in input queue
[20:22:16.111] 🅸 stream> [Stream::finalize] Flush 0 buffer[s] in output queue
Failed to acquire a single image
EmmanuelP commented 1 year ago

So on the broken setup you never receive any stream packets. The next step consists in checking if the camera is actually sending packets to aravis, using wireshark for example.

Did you check the firewall ? Is the camera directly connected to the machine ?

gotnone commented 1 year ago

Firewall appears to be correctly configured and problem still exists when firewall is disabled.

Camera is directly connected to machine being tested.

I have wireshark captures, please let me know what to look for, or where I can send them for review.

It appears that there are two long transmissions, one for the XML at the beginning, with appropriate READMEM_ACKs from the computer, and another long transmission of "UDP" packets without any ACKs from the computer, which may be the buffer. On the working windows machine, there are occasional PACKETRESEND_CMD packets from the computer to the camera interrupting this transmission. These are absent on the broken machine.

EmmanuelP commented 1 year ago

I have wireshark captures, please let me know what to look for, or where I can send them for review.

It appears that there are two long transmissions, one for the XML at the beginning, with appropriate READMEM_ACKs from the computer, and another long transmission of "UDP" packets without any ACKs from the computer, which may be the buffer. On the working windows machine, there are occasional PACKETRESEND_CMD packets from the computer to the camera interrupting this transmission. These are absent on the broken machine.

Please attach a wireshark capture using arv-camera-test-0.8, taking care to minimize the capture size by setting the image size to the minimum possible, and setting the framerate to 1Hz and the test duration to 2s.

gotnone commented 1 year ago

This packet dump is using aravis 0.8.25 commit cd6ef301caedeb132d7e18e27a3dc2914b88d62e

I only have access to the camera on a non-working machine. The buffer is still not properly transmitted in the newest commit.

Unfortunately, the camera does not support a smaller native image size than 1600x1200, so apologies for the large capture size.

$ ./arv-camera-test-0.8.exe -o 1 --duration 2
Looking for the first available camera
vendor name            = KEYENCE CORPORATION
model name             = CA-H200MX
device serial number   = 1A910122
image width            = 1600
image height           = 1200
gain                   = 3 dB
payload                = 1920000 bytes
gv n_stream channels   = 1
gv current channel     = 0
gv packet delay        = 0 ns
gv packet size         = 1060 bytes
  0 frame/s  -       0 MiB/s
  0 frame/s  -       0 MiB/s
n_completed_buffers    = 0
n_failures             = 0
n_underruns            = 0
n_timeouts             = 0
n_aborted              = 0
n_missing_frames       = 0
n_size_mismatch_errors = 0
n_received_packets     = 0
n_missing_packets      = 0
n_error_packets        = 0
n_ignored_packets      = 0
n_resend_requests      = 0
n_resent_packets       = 0
n_resend_ratio_reached = 0
n_resend_disabled      = 0
n_duplicated_packets   = 0
n_transferred_bytes    = 0
n_ignored_bytes        = 0

arv_camera_test_dump.zip

EmmanuelP commented 1 year ago

So it looks like for some reason the g_poll ( https://github.com/AravisProject/aravis/blob/cd6ef301caedeb132d7e18e27a3dc2914b88d62e/src/arvgvstream.c#L1027 ) call never sees the incoming packets. source/destination port and address seem correctly configured.

@eudoxos , may be you have an idea on what is going wrong ?

EmmanuelP commented 1 year ago

Something to check: do you have a GigEVision driver installed on this machine ?

EmmanuelP commented 1 year ago

Another test: can you replicate the issue using arv-fake-gv-camera-0.8.exe ?

gotnone commented 1 year ago

Yes, "eBUS Universal Pro For Ethernet Driver"

This same filter driver is installed on the working windows machine.

I tried uninstalling and rebooting, but the transferred buffer still fails to be detected by Aravis.

gotnone commented 1 year ago

Using arv-fake-gv-camera-0.8.exe on the loopback device appears to work.

$ ./arv-camera-test-0.8.exe -o 1 --duration 2
Looking for the first available camera
vendor name            = Aravis
model name             = Fake
device serial number   = GV01
image width            = 512
image height           = 512
horizontal binning     = 1
vertical binning       = 1
exposure               = 10000 ┬╡s
gain                   = 0 dB
payload                = 262144 bytes
gv n_stream channels   = 1
gv current channel     = 0
gv packet delay        = 0 ns
gv packet size         = 1400 bytes
  1 frame/s  -   0.262 MiB/s
  1 frame/s  -   0.262 MiB/s
n_completed_buffers    = 2
n_failures             = 0
n_underruns            = 0
n_timeouts             = 0
n_aborted              = 0
n_missing_frames       = 0
n_size_mismatch_errors = 0
n_received_packets     = 390
n_missing_packets      = 0
n_error_packets        = 0
n_ignored_packets      = 0
n_resend_requests      = 0
n_resent_packets       = 0
n_resend_ratio_reached = 0
n_resend_disabled      = 0
n_duplicated_packets   = 0
n_transferred_bytes    = 527496
n_ignored_bytes        = 0

loopback_dump.zip

KNSd2 commented 1 year ago

Did you find the issue? I think I am experiencing the same problems. Connecting to the camera (ethernet) and setting the parameters works fine. However, the buffer stays empty.

gotnone commented 12 months ago

Unfortunately, no. I had to use the vendor library because I could not find the cause of the buffer transfer issue. The strangest part was the fact that it did work on at least one Windows machine, despite failing to transfer on a couple of others. I couldn't narrow down any difference between firewalls, network settings, or shared libraries that might be the cause.

At the present time I don't have access to the camera for further testing as it is on a working line performing captures for inspection.

gotnone commented 12 months ago

Try capturing the communication with wireshark. It would be interesting to see if the buffer is actually transferred and then g_poll is not picking up the incoming packet stream. It seemed like that was the issue identified in my captures.

KNSd2 commented 12 months ago

Thanks for the info. In my case, it was a firewall issue and an old ebus driver installed on the test system.

venusspace commented 4 months ago

Did you find out what the problem is? I'm experiencing the same problem, the camera is connected and I can set the parameters, but no buffer available.