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

Problems with Quickwin Library on upgradt from 11.0 to 11.1 and on 64bit system

schuerg
Beginner
333 Views
We are using Microsoft Visual Studio 2008 with Intel Visual Fortran compiler 11.0.66 on a Windows 32 bit system (Windows XP). We are running a Quickwin application. Recently we have installed Intel Visual Fortran Compiler 11.1.51 (ia32) on one of our computers. Also we have installed the application on a new computer with a Windows 64 bit system (Windows 7) with Intel Visual Fortran Compiler 11.1.51 (intel64).

In both cases the software runs without problems, apart from problems with setting properties in windows of the type windowconfig. In both cases, attributes such as "numxpixels" and "numtextcols" can be changed, whereas setting "title" to a new value does not have any effect. Trying to set the "fontsize" attribute on the 32-bit system even leads to a runtime-error: (forrtl: severe(157): Program Exception - access violation ... Stack Trace terminated abnormally. This was never a problem with earlier compiler versions.

Does anybody know what is causing this? I have attached some example code.


use ifqwin
implicit none

type(windowconfig) wind
...


status = getwindowconfig(wind)
...

wind%numxpixels = iwxgs
wind%numypixels = iwygs
wind%numtextcols = ncols
wind%numtextrows = nrows
wind%numcolors = -1
wind%fontsize = Z'0008000C'
wind%title = "This is a title"C
wind%bitsperpixel = -1

status = setwindowconfig(wind)
if (status.eq.0) status = setwindowconfig(feapgraph)

...

numfonts=initializefonts()
...
status = setfont( 't''Arial''h16b' )



Thanks...
0 Kudos
4 Replies
Steven_L_Intel1
Employee
333 Views
Would you please attach a complete, buildable example that shows the problem? Too often an excerpt is missing critical code.
0 Kudos
schuerg
Beginner
333 Views
Would you please attach a complete, buildable example that shows the problem? Too often an excerpt is missing critical code.

Ok, i have created a little project that displays the behaviour i do not understand. I will paste the source code. If I run the program as shown, I get the above mentioned run time error. If I comment out the two lines in the code "window1%fontsize = #0008000E" and "window2%fontsize = #0008000E" OR the do-loop the program runs ok, but the titles of the two windows are not shown.


PROGRAM HELLO

integer i,j
do i=1,3
j = i+1
end do

call routine1
call routine2

END PROGRAM

subroutine routine1

use ifqwin

implicit none

type(qwinfo) winfo
type(windowconfig) window1
integer*4 status
integer*2 nxspix,nyspix,nrows,ncols
integer*2 nx1pix,ny1pix
integer(2) numfonts
real xfac1,yfac1

c open (unit=0,FILE='CON')

status = getwindowconfig(window1)
nxspix = window1%numxpixels
nyspix = window1%numypixels
ncols = window1%numtextcols
nrows = window1%numtextrows

xfac1 = 45./100.
yfac1 = 95./100.
nx1pix = nxspix*xfac1
ny1pix = nyspix*yfac1
nrows = 1000
ncols = 300

window1%numxpixels = nx1pix
window1%numypixels = ny1pix
window1%numtextcols = ncols
window1%numtextrows = nrows
window1%numcolors = -1
window1%fontsize = #0008000E
c window1%fontsize = Z'0008000C'
window1%title = "window 1"C
window1%bitsperpixel = -1
window1%mode = QWIN$SCROLLDOWN

status = setwindowconfig(window1)
if (status.eq.0) status = setwindowconfig(window1)

status = displaycursor($gcursoron)

status = SETBKCOLOR(15)
status = SETTEXTCOLOR(0)
CALL CLEARSCREEN ($GCLEARSCREEN)

status = getwsizeqq(0, QWIN$SIZECURR, winfo)
winfo%type = QWIN$SET
winfo%x = 0
winfo%y = 0
winfo%w = nx1pix
winfo%h = ny1pix

status = setwsizeqq(0,winfo)

numfonts=initializefonts()
status = setfont( 't''Arial''h16b' )
status = FOCUSQQ(0)

end

subroutine routine2

use ifqwin
implicit none


integer*2 iwxs,iwys,iwxgs,iwygs


type(qwinfo) winfo
type(windowconfig) window2
integer isw
integer status
integer*2 nrows,ncols
integer(2) numfonts

c Open Child Graphic Window
open (unit=2,file='USER')

status = getwindowconfig(window2)
iwxs = window2%numxpixels
iwys = window2%numypixels
ncols = window2%numtextcols
nrows = window2%numtextrows

iwxgs = iwxs*0.8
iwygs = iwys*0.8

window2%numxpixels = iwxgs
window2%numypixels = iwygs
window2%numtextcols = ncols
window2%numtextrows = nrows
window2%numcolors = -1
window2%fontsize = #0008000E
c window2%fontsize = Z'0008000C'
window2%title = "window 2"C

window2.bitsperpixel = -1
status = setwindowconfig(window2)
if (status.eq.0) status = setwindowconfig(window2)

status = SETBKCOLOR(0)
CALL CLEARSCREEN ($GCLEARSCREEN)

winfo%type = QWIN$SET
winfo%x = 0
winfo%y = 0
winfo%w = iwxgs
winfo%h = iwygs
status = setwsizeqq(1,winfo)

status = CLICKMENUQQ(QWIN$TILE)

numfonts=initializefonts()
status = setfont( 't''Arial''h16b' )

return
end

0 Kudos
Steven_L_Intel1
Employee
333 Views
Thanks - I can reproduce this. Very, very strange. Why commenting out the DO loop has any effect, I don't know. It is clear that there is data corruption going on, but where and why... ? I will escalate this to the developers and see what they say.
0 Kudos
Robert_M_Intel4
Employee
333 Views
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
0 Kudos
Reply