Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.

Program is running in Task Manager but no window is displayed

Rocha__Hugo
Beginner
431 Views

Good morning,

I installed Visual Studio 2017 and Intel Parallel Studio XE for students. I compiled a code that my professor gave me in a Standard Graphics Application, and after I open the executable which is on the "Release" folder, the program runs in the background but doesn't show any window. It does the same in another computer. My professor also gave me the executable that he has, which works perfectly on his computer, but on mine does the exact same thing, and the same on the other computer.

What can I do to solve this issue?

Thanks in advance,
Hugo Rocha

0 Kudos
8 Replies
Steve_Lionel
Honored Contributor III
431 Views

Is this something you can supply to us, such as a ZIP of your project folder (including sources and .vfproj)? Typically a "standard graphics" application displays just a single black window, as it is trying to emulate a DOS-style application interface. It doesn't "run in the background".

 

0 Kudos
Rocha__Hugo
Beginner
431 Views

Hello Steve,

Sorry for taking long to respond, for some reason the warning of your comment went to my junk mail. I will confirm with my professor if I can post here the zip file of the code. I can give you some background about the issue: my prof. compiled the code four years ago, on the same computer and using the same code, and it worked perfectly. Right now, after recompiling the same code, the program doesn't work the same way. Tomorrow, if possible, I will post here the .zip file with the code. I'm sorry if I can't explain correctly the issue.

Thanks,
Hugo

0 Kudos
Rocha__Hugo
Beginner
431 Views

Hello Steve,

Here is the .zip file with the code files, including the .txt files it requires. The "project.txt" one is the directory where the rest of the .txt files are, so you need to write in "project.txt" the directory in which you'll have the rest of the files. The "main" one is plotairfoil_airfoil.

Thank you and sorry for anything,
Hugo
 

0 Kudos
Steve_Lionel
Honored Contributor III
431 Views

Thanks for this.

This is a QuickWin program. There's an error in the main program where it has "Call GraphicSettings" but the procedure is named "GraphicsSettings". It won't build with that error.

What you're seeing is that the program goes into an infinite loop in routine GraphicsSettings, continuously jumping back to line 304 to rewind the Graphics_Settings.txt file and trying to read it. The reason is that the read of variable showinitial is actually reading from the string "<end PlotAirfoil>", which gets a list-directed syntax error. It looks as if two items are missing from the text file.

I'll note that the code for this routine is, um, suboptimal. If the file can't be read once, restarting from the beginning isn't going to help. It reminds me of the old joke about engineers after their car brakes failed and they narrowly avoided death: "Let's run it up the hill and see if it does it again!"

I was also puzzled that the text file sometimes had multiple values on a line, but only the first was read.

0 Kudos
Rocha__Hugo
Beginner
431 Views

Hi Steve,

I may have sent you the program in which i already fiddled, and that's where that error may appear, but the problem isn't in not compiling. When I compiled it (back in the original code) it compiled fine, with no errors (because I didn't mess with anything trying to solve the issue), but no window appeared, nothing at all happened, it seemed, as I said in the original post, that the program was running in the back but nothing was going on.

If I correct the issue with "call GraphicsSettings" instead of "call GraphicSettings" (which was my mistake), that's what happens: the program compiles fine, but when I run it, nothing happens. That's where I need help: why doesn't any window show?

Thanks,
Hugo
 

0 Kudos
Steve_Lionel
Honored Contributor III
431 Views

A window shows for me, but as I noted, the program goes into an infinite loop because of an error in the input file, so that might prevent you from seeing a window.

0 Kudos
Rocha__Hugo
Beginner
431 Views

Hello Steve.

Thank you very much, I should have checked the problem with the loop once you mentioned it, I'm sorry (it was late in the evening when I saw it, was really tired, my bad). You were right, right now it opens the window as it should, although it's stuck in "Loading data...", but this helps me immensly. You were right saying that it seemed like there was missing some information form the .txt file, my professor must've sent me the wrong one. I'll now try to see why it's stuck.

Once again, thank you very much,
Hugo

0 Kudos
Steve_Lionel
Honored Contributor III
431 Views

The "why it's stuck" is simple - each of the READ statements has an ERR=304 which causes it to jump back to the REWIND and it restarts the sequence of READs. If any of the READs fail (and one will because of the missing data), it just keeps trying over and over. Better might be to remove the ERR= specifiers and let it display the problem and quit the program.

0 Kudos
Reply