Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
Announcements
FPGA community forums and blogs on community.intel.com are migrating to the new Altera Community and are read-only. For urgent support needs during this transition, please visit the FPGA Design Resources page or contact an Altera Authorized Distributor.
29281 Discussions

List view causes access violation in dialog based application

michael_green
Beginner
767 Views

I found that the IVF10/VS 2005 version of an old program developed under CVF6.6c caused an access violation on clicking the exit button. After some checking around, I found that a brand new wizard-generated dialog-based project (WinApp1) which compiles and runs initially, has the same access violation when the dialog contains a list-view control. I have made no changes to any code and no changes to the default attributes of the list-view, I just placed the list-view in the dialog.

The access violation occurs at ...

call DlgUninit(gdlg)

Any suggestions?

With many thanks

Mike

0 Kudos
4 Replies
Jugoslav_Dujic
Valued Contributor II
767 Views
The wizard-generated code with a list view works for me (IVF 10.1.021). You can debug it yourself, though, by including IFLOGM.f90 from C:Program FilesIntelCompilerFortran10.1.021IA32Include.

Note that List-Views are not supported by IFLOGM in the sense that you cannot DlgSet/DlgGet anything for them. However, they should be at least partly manageable using DlgSendCtrlMessage, and IFLOGM shouldn't crash with their presence.

Jugoslav
0 Kudos
Steven_L_Intel1
Employee
767 Views
IVF 10.0 has a bug in DFLOGM when it encounters an unsupported control - it corrupts memory and can cause an access violation. That bug was fixed in an update, though I'd have to research to see exactly when. If you can't update to 10.1, there is a source change you can make to a copy of DFLOGM.F90 to fix it yourself. Let me know if you need that and I'll look it up.
0 Kudos
michael_green
Beginner
767 Views

Thanks Guys,

If I update to 10.1 do I have to buy it outright or does it come as an upgrade to 10.0 (to which I have only recently converted)? Either way, I would appreciate the source code change to DFLOGM.F90 (IFLOGM?). Thanks.

Incidentally, to answer Jugoslav's reply, I am using a trick ...

iret = SetWindowLong(Dlg%hWnd,GWL_WNDPROC,LOC(SubclassProc))

that you showed me a year or so ago. It gives me access to the full capabilities of a list view.

Many thanks

Mike

0 Kudos
Steven_L_Intel1
Employee
767 Views
If your support license term is still current, you get any releases during the term at no additional charge. 10.1 was released in October 2007. If your support term has expired, you can extend it for 12 months (from the time of expiration) at a reduced price.

The fix is this. Save a copy of Fortran10.0.xxxIA32IncludeIFLOGM.F90 in your own project and add it to your project. Open your copy of IFLOGM.F90 and look in the vicinity of line 1337 for this code:

end if
end if
end do
if (sysmenu) then

Insert the following lines before the first "end if":

else
! Not a recognized control, zero out the sizes so that we don't
! try to deallocate them in DlgUninit.
dlg % list(dlg%NumControls) % intsize = 0
dlg % list(dlg%NumControls) % logsize = 0
dlg % list(dlg%NumControls) % charsize = 0
dlg % list(dlg%NumControls) % callbacksize = 0
dlg % list(dlg%NumControls) % vartextptr = 0
0 Kudos
Reply