08-06-2012 10:00 AM
I have a simple CVI program that converts a binary file to a text file. The original Windows version works fine. When I build and run the file under Linux, however, the program produces a segmentation fault and does not perform the conversion. In addition, the file browser doesn't work quite right under Linux, but I am able to select a file. Does anyone have any ideas about this? I am running openSUSE 11.4 on the Linux box.
08-13-2012 11:29 AM
Did you find an answer to this?
I find that pointer problems often cause this kind of problem. Can you post the code?
When I have this kind of issue I try to isolate the call that is causing the segmentation fault. I do this by sprinkling printf statements in the code. If the message in the printf displays on the console, then the seg fault is after that printf. If a given printf never runs, then the seg fault is before. This works best if all the printfs have different text.
08-13-2012 04:06 PM
No, it still isn't working correctly. I have attached the project and data files in a zipped archive. The program is very simple and works fine under Windows. The problem seems to be with the FileSelectPopup function. The printf call right before the popup is displayed prints the message; subsequent calls don't appear to happen. If I select a file from the popup, nothing happens until I click in the main panel (the one with the "Continue" and "Quit" buttons). When I do this, the PC emits a few beeps until I leave that panel. When I can finally get the program to close, the message "segmentation fault" is displayed in the terminal window from which the program was started. I had this same program (sans "printf"s) running on a Fedora box a week or so ago. IIRC, the interaction with the user interface was somewhat clunky (I don't remember if the "Continue" and "Quit" buttons worked correctly), but the program did successfully convert a file at least once.