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

Access violation with modal dialogs in Quickwin application

Jan_E_
Beginner
376 Views

Hello,

I have ported my FORTRAN application from CVF to Visual Studio 2010 10.0.40219.1 and Intel Visual Fortran 2013 SP1.3.202

Now any time that I for instance click a radio button in a dialog box the application terminates with a program exception - access violation. When I debug the exception occurs at the return statement of the subroutine that updates the dialog (defined in DLGSETSUB).

Can anyone enlighten me please, what is going wrong? The aplication worked fine before porting.

Byrge

0 Kudos
1 Solution
Steven_L_Intel1
Employee
376 Views

I think we'll need to see an example. I took the WHIZZY sample, converted it to QuickWin (trivial), and it runs perfectly, including all the controls.

But try this - in the project properties, go to Fortran > External Procedures. If the calling convention is set to CVF, change it to Default and rebuild. DFLOGM callbacks assume the compiler default calling convention, which is not compatible with the CVF convention.

View solution in original post

0 Kudos
3 Replies
Steven_L_Intel1
Employee
377 Views

I think we'll need to see an example. I took the WHIZZY sample, converted it to QuickWin (trivial), and it runs perfectly, including all the controls.

But try this - in the project properties, go to Fortran > External Procedures. If the calling convention is set to CVF, change it to Default and rebuild. DFLOGM callbacks assume the compiler default calling convention, which is not compatible with the CVF convention.

0 Kudos
Jan_E_
Beginner
376 Views

Hi Steve,

Thanks for your quick reply and for solving the problem, the application runs fine now!

Actually I do not use DFLOGM but IFLOGM and also changed the other modules as advised here: https://software.intel.com/en-us/articles/migrating-from-compaq-visual-fortran. But it seems this does not influency your solution.

Jan E.

0 Kudos
Steven_L_Intel1
Employee
376 Views

Right - I just mentioned DFLOGM since you said you ported from CVF. In Intel Fortran, DFLOGM simply has a USE IFLOGM.

Glad to hear it works ok now. Callbacks are a tricky issue - there isn't a good way to alert you of incompatible calling conventions. On the other hand, this is only an issue for 32-bit applications, which I expect to fade away in the coming years.

0 Kudos
Reply