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

Problem to transfer "loadimage" to IFX

Kai8
Novice
701 Views

My code using the ifort compiler works to display a Bitmap:

USE IFQWIN, ONLY: LOADIMAGE

i=LOADIMAGE ('Picture.bmp',1,1)

 

Once I switch to the ifx compiler I get the following fatal error on execution:

Program Exception 0x00007FF6390D2D82 in xxx.exe: 0xC0000005

0 Kudos
14 Replies
andrew_4619
Honored Contributor III
665 Views
Ifx is 64 bit only. In 64 bit the return value of loadimage is a 64 bit address. My guess is that I is a 32 bit integer.
0 Kudos
Kai8
Novice
594 Views

I usually take the default integer, which is KIND=4 in my case.
Unfortunately it did not help to declare i with Kind=8. The same error occurs.

0 Kudos
andrew_4619
Honored Contributor III
569 Views
And my second thought is the name you are passing is not null terminated pass 'name'//achar(0)
0 Kudos
Kai8
Novice
520 Views

I tried this, but no success. The same error occurs.
Meanwhile I found that this happened after I updated to the latest ifx version 2025.0.0. I can still run the code with an older ifx version. This happens on several projects where I use LOADIMAGE.

0 Kudos
andrew_4619
Honored Contributor III
503 Views
I had a look at your original post. I now see you are using ifqwin loadimage not the SDK loadimage so my comments are not so relevant. Do you have a traceback to that specific line? Have you tried it in the debugger? The problem is not clear. Can you make a simple program with a few lines that reproduces this?
0 Kudos
Kai8
Novice
449 Views

Well, there is not very much to add to the above snipplet. To make sure, that the error is not provoked by any other parts of my original code, I tested the below program:


!****************************************************************************
program Main

USE IFQWIN, ONLY: LOADIMAGE
implicit none
!
INTEGER i
!
!---- Display Bitmap
i=LOADIMAGE ('ROSETem.BMP', 1, 1)

end program Main

!****************************************************************************

The runtime result is:

Kai8_1-1731961065604.png

 

If I switch from ifx back to ifort this code runs without problem.

The debugger stops on the line calling LOADIMAGE

 

 

 

andrew_4619
Honored Contributor III
436 Views
Well that is simple I cannot test myself as I am away but hopefully one of the intel people will pick that up
Kai8
Novice
349 Views

Who can take care of this?
This error affects almost all of my programs and seems to be an issue within the compiler. 

0 Kudos
andrew_4619
Honored Contributor III
334 Views

I looked at you example in IFX 2025.0.0 and it does indeed crash as you say. I also looked at the interface in IFQWIN.f90 and I see no issue with  your call.  I agree it looks like a bug in IFX, hopefully Ron or Devorah will pick this up. 

MANOLIS
Beginner
189 Views

Dear andrew_4619

The same problem with LOADIMAGE function in QWIN FORTRAN application, using IFX, happens with function SAVEIMAGE too.

So, please inform the developers of IFX 2025.0.0 to also take care of it.

Thank you

Manolis

 

0 Kudos
taehunkim
Employee
152 Views

Hi,

If you change from x64 to win32 in configuration manager (MSVS), it works well.

taehunkim_1-1733152743537.png

taehunkim_2-1733152807319.png

 

taehunkim_0-1733152647436.png

 

Thanks.

0 Kudos
Kai8
Novice
136 Views

Dear Taehunkim

this is definitely no solution. I would not want to sacrifice computation efficiency just to be able to plot a bitmap in the pre-processing. Changing to Win32 brings along a whole bunch of other issues in my codes.

I hope you can update IFX soon.

BR

Kai

0 Kudos
andrew_4619
Honored Contributor III
97 Views

      You cannot do a 32 bit build with IFX.

0 Kudos
Devorah_H_Intel
Moderator
55 Views

@Kai8 and @MANOLIS, I have escalated this case to our compiler engineering. Thank you for your report.

(For future reference, reporting issues and bugs via the Online Service Center will expedite the process and, eventually, the fix. )

0 Kudos
Reply