LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

SetStdioWindowOptions bug on Linux

Hello all,

I added SetStdioWindowOptions() calls to get rid of pesky console popups while debugging, but when I ran the same prog on Linux, it just crashed:

#include <utility.h>
int main(void) {
        SetStdioWindowOptions (1000000, 0, 0);
        return 0;
}

Compile with cvicc, execute:

$ ./test
Segmentation fault (core dumped)

$ gdb ./test core.2881
(gdb) bt
#0  0xf762571b in ?? () from /usr/local/lib/libcvi.so
#1  0xf72ae597 in ?? () from /usr/local/lib/libcvi.so
#2  0xf741372b in SetStdioWindowOptions () from /usr/local/lib/libcvi.so
#3  0x0804e741 in main () at /tmp/test.c:3
0 Kudos
Message 1 of 4
(2,576 Views)

Hi gdargaud,

 

If you remove that function from your code does the program run?

0 Kudos
Message 2 of 4
(2,546 Views)

Well, duh, with just "return 0" in the code, I certainly do hope that it runs !

Anyway, since that function is only useful on Windows, I just surrounded it with a #ifdef _WINDOWS

0 Kudos
Message 3 of 4
(2,537 Views)

That function should probably be added to this help doc.

https://www.linkedin.com/in/trentweaver
Message 4 of 4
(2,531 Views)