- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Dear all:
I posted a question two days ago and did not get any reply.
This time I include a simple test program.
The program freezes after displaying a messagebox.
Comment the call out and the program runs fine. don't know why?
Here is the program:
USE IFQWIN
IMPLICIT NONE
TYPE (QWINFO) QWI
INTEGER I,CONSOLE/1/
OPEN(UNIT=CONSOLE,FILE='USER',TITLE='Console')
QWI%TYPE = QWIN$MAX
I = SETWSIZEQQ(CONSOLE,QWI)
I = INITIALIZEFONTS( )
CALL CLEARSCREEN($GCLEARSCREEN)
! The following call freezes the program.
I = MESSAGEBOXQQ('Continue?'C,'Matrix'C,MB$YESNO)
DO WHILE(.TRUE.)
CALL SLEEPQQ(0)
END DO
STOP
END
LOGICAL*4 FUNCTION INITIALSETTINGS( )
USE IFQWIN
IMPLICIT NONE
TYPE (QWINFO) QWI
LOGICAL OK
OK = INSERTMENUQQ(1,0, $MENUENABLED, '&File'C, NUL)
OK = APPENDMENUQQ(1, $MENUENABLED, 'E&xit'C, WINEXIT)
INITIALSETTINGS= .TRUE.
END FUNCTION
I compile the program using IVF 11.1.048 under VS2008.
Any help will be appreciated.
Mao
I posted a question two days ago and did not get any reply.
This time I include a simple test program.
The program freezes after displaying a messagebox.
Comment the call out and the program runs fine. don't know why?
Here is the program:
USE IFQWIN
IMPLICIT NONE
TYPE (QWINFO) QWI
INTEGER I,CONSOLE/1/
OPEN(UNIT=CONSOLE,FILE='USER',TITLE='Console')
QWI%TYPE = QWIN$MAX
I = SETWSIZEQQ(CONSOLE,QWI)
I = INITIALIZEFONTS( )
CALL CLEARSCREEN($GCLEARSCREEN)
! The following call freezes the program.
I = MESSAGEBOXQQ('Continue?'C,'Matrix'C,MB$YESNO)
DO WHILE(.TRUE.)
CALL SLEEPQQ(0)
END DO
STOP
END
LOGICAL*4 FUNCTION INITIALSETTINGS( )
USE IFQWIN
IMPLICIT NONE
TYPE (QWINFO) QWI
LOGICAL OK
OK = INSERTMENUQQ(1,0, $MENUENABLED, '&File'C, NUL)
OK = APPENDMENUQQ(1, $MENUENABLED, 'E&xit'C, WINEXIT)
INITIALSETTINGS= .TRUE.
END FUNCTION
I compile the program using IVF 11.1.048 under VS2008.
Any help will be appreciated.
Mao
Link Copied
19 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The program worked fine for me on Windows 7 with the call. A note - the call to MESSAGEBOXQQ does not require C strings. They don't hurt, though.
When you say it freezes, what do you mean? If you click on Yes from the message box, can you not pull down File > Exit?
When you say it freezes, what do you mean? If you click on Yes from the message box, can you not pull down File > Exit?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Quoting - Steve Lionel (Intel)
The program worked fine for me on Windows 7 with the call. A note - the call to MESSAGEBOXQQ does not require C strings. They don't hurt, though.
When you say it freezes, what do you mean? If you click on Yes from the message box, can you not pull down File > Exit?
When you say it freezes, what do you mean? If you click on Yes from the message box, can you not pull down File > Exit?
Yes, after I click yes (or no) from the message box, the window freezes and I cannot pull down or access File>Exit.
I cannot move or resize the frame window.
I have to terminate the program from windows's task manager.
I test the program in debug as well as release mode. They all give the same result.
I am not sure if there are any compiler switches I have to set.
Thanks again.
Mao
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
There are no switches to set that would affect this behavior. I will suggest using 100 or 200 as the argument to SLEEPQQ rather than 0, as the latter will still make the main thread CPU-bound. This might make the window unresponsive on a single-core system.
Can anyone else running Windows 7 see this problem?
Can anyone else running Windows 7 see this problem?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Good to know about MESSAGEBOXQQ and the C strings; it makes things a little easier for me. The documentation does say they have to be C strings, at least in my version (10).
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Perhaps I am wrong about the C strings.. Doesn't hurt to use them. You're right that it's documented that way.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Quoting - Steve Lionel (Intel)
Perhaps I am wrong about the C strings.. Doesn't hurt to use them. You're right that it's documented that way.
As it turns out, they are required. I have 28 invocations of it, and while most seem to work without being C strings, I have at least one that does not.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I sit corrected. Thanks.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Quoting - Steve Lionel (Intel)
There are no switches to set that would affect this behavior. I will suggest using 100 or 200 as the argument to SLEEPQQ rather than 0, as the latter will still make the main thread CPU-bound. This might make the window unresponsive on a single-core system.
Can anyone else running Windows 7 see this problem?
Can anyone else running Windows 7 see this problem?
I tested this program and I have the same issue. I am running 64bit Windows 7 build 7100 (Not the release version).
Chris
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I am running the released version of Win 7 x64 and can't get this program to fail in either 32-bit or 64-bit.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Quoting - Steve Lionel (Intel)
I am running the released version of Win 7 x64 and can't get this program to fail in either 32-bit or 64-bit.
I am testing this program on the released TRADITIONAL CHINESE version of 32-bit and 64-bit Win 7.
The program also has problem on my friend's win 7 installation.
I am not sure if this is related to the localized version of Win 7.
How should I proceed? Microsoft or Intel?
Your kind suggestions are appreciated.
Mao
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I wonder if this is related to the "language bar" background process CTFMON.EXE. This is widely known as interfering with many applications. You might try, as an experiment, stopping the process running CTFMON.EXE and see if the problem remains.
I will send a report to our developers to see if they can reproduce it.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Quoting - Steve Lionel (Intel)
I wonder if this is related to the "language bar" background process CTFMON.EXE. This is widely known as interfering with many applications. You might try, as an experiment, stopping the process running CTFMON.EXE and see if the problem remains.
I will send a report to our developers to see if they can reproduce it.
Thanks for your prompt reply.
I rewrite the program and put the messagebox call in a menu callback, then the program runs!
don't know why?
For your information, here is the revised program:
USE IFQWIN
IMPLICIT NONE
TYPE (QWINFO) QWI
INTEGER I,CONSOLE/1/
OPEN(UNIT=CONSOLE,FILE='USER',TITLE='Console')
QWI%TYPE = QWIN$MAX
I = SETWSIZEQQ(CONSOLE,QWI)
I = INITIALIZEFONTS( )
CALL CLEARSCREEN($GCLEARSCREEN)
! The following call freezes the program.
! But if I put it in a menu callback (see below), then everything is fine.
! I = MESSAGEBOXQQ('Continue?'C,'Matrix'C,MB$YESNO)
DO WHILE(.TRUE.)
CALL SLEEPQQ(100)
END DO
STOP
END
LOGICAL*4 FUNCTION INITIALSETTINGS( )
USE IFQWIN
IMPLICIT NONE
TYPE (QWINFO) QWI
LOGICAL OK
EXTERNAL RUN
OK = INSERTMENUQQ(1,0, $MENUENABLED, '&File'C, NUL)
OK = INSERTMENUQQ(1,1, $MENUENABLED, '&Run'C, RUN)
OK = APPENDMENUQQ(1, $MENUENABLED, 'E&xit'C, WINEXIT)
INITIALSETTINGS= .TRUE.
END FUNCTION
SUBROUTINE RUN()
USE IFQWIN
IMPLICIT NONE
INTEGER I
I = MESSAGEBOXQQ('Continue?'C,'Matrix'C,MB$YESNO)
RETURN
END
Any thoughts?
Mao
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
When you put it in a callback, it's executed from a different thread than the main program. The call to MESSAGEBOXQQ blocks the thread, but the main thread is still running. I don't understand, though, why this matters. I'm glad to hear that you found a solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
We have the same problem! After calling a messagebox a simple Quickwin program freezes on Windows 7 both for win32 and x64. We use compiler version 11.1.065. Using Win XP+win32 everthing is ok. We have checked the mentioned solution as a callback function. Then everything is ok. But this is no solution. We need the messagebox directly and not 'hidden' in the callbackfunction.
Regards WW
Regards WW
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
It looks like we never reproduced the original problem. Do you have a test case you can post here which demonstrates it?
------
Wendy
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Have you considered substituting a call to the standard Windows API function MessageBox? All you need to do is add USE IFWIN (if using IVF) or USE DFWIN (if using CVF) to supply the interface for it and to define the parameters required such as MB_OK etc.
Here is the simplest console program that uses it.
program simplemessage
use dfwin
implicit none
integer iret
print *, 'Hello World'
iret=MessageBox(0,'Here is the message - Hello World!'c,'A simple message box Title'c,MB_OK)
end program simplemessage
Here is the simplest console program that uses it.
program simplemessage
use dfwin
implicit none
integer iret
print *, 'Hello World'
iret=MessageBox(0,'Here is the message - Hello World!'c,'A simple message box Title'c,MB_OK)
end program simplemessage
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
We can reproduce the problem, but the number of factors involved have, so far, stymied us in identifying a culprit. We continue to work at it and will be pulling in Microsoft to help us. I understand that this is a frustrating issue - it is for us too - but I don't anticipate a speedy resolution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
We (at Intel) have been working on this for awhile, and may have a solution. Please refer to the topic 70026 in the Intel-visual-fortran-compiler-for-windows topic.
Bob Mance
Bob Mance
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
My name is Bob Mance and I've been working on this problem with Microsoft. I've posted a solution that works for yours, and several other reproducers posted in a separate (longer) thread. You can pick up a new ifqwin.lib file from that post, #94 I believe. The library was built for a 12.0/12.1 release and can be used on XP or Windows 7.
http://software.intel.com/en-us/forums/showthread.php?t=70026&p=10
Let me know if you try it and what you see. I have your application running here fine.
Thanks.
Bob
http://software.intel.com/en-us/forums/showthread.php?t=70026&p=10
Let me know if you try it and what you see. I have your application running here fine.
Thanks.
Bob

Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page