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

program exception on dlgmodal or dlgmodeless

lcorona
初学者
1,307 次查看
Hi,

Hope someone can help me, I use a modal dialog box with an activex control on a quickwin project, when I run the program on Windows 2000 I get a "Program exception in DLGMODAL or DLGMODELESS" runtime error the second time the dialog is called. When debugging, it stops on dlgmodal and if I add dflogm.f90 into the project it stops on dlgdomodal function.

I don't understand what can be wrong because it executes ok when running on Windows 98, Me and XP. I've tested it in two machines with windows 2000 (PRO) with the latest service pack and in both machines it crashes.

Here's the code:

....
CALL COMInitialize (status)
...
retlog = DlgSetSub( dlg_tb_verhtml, idd_tb_verhtml, sub_dlg_verhtml_dlg_init, DLG_INIT )
...
retint = DlgModal ( dlg_tb_verhtml )  <-- This is the line where the exception arises
call COMUnInitialize ()
call dlgUnInit(dlg_tb_verhtml)
....



Thanks

LC
0 项奖励
8 回复数
Intel_C_Intel
员工
1,307 次查看
This may or not be related to the problem described, though this problem isn't confined to Windows 2000.

I am having trouble using an ActiveX control. The control is SimpleGrid, a commercially available control from Ocatec. Being commercially available I assume that it is reasonably robust and standard. Using the simplest possible test for it, I am using the Visual Studio generated simple dialog based Windows application using ActiveX controls with the control inserted in the Dialog box. On running the application I get an error in DlgModeless (DlgDoModeless) before the callback routine is called. In CVF 6.6b I get a Visual Fortran run-time error message box with the message: Program exception in DLGMODAL or DLGMODELESS, followed by the usual trace information. In Intel Visual Fortran 8 I get an Application Error message box with the message: The instruction at "0x77f5234c" referenced memory at "0x891c195". The memory could not be "written". On pressing the OK button I get another message box with different memory references.
I have contacted Ocatec who say that as far as they are aware there is nothing non-standard about the control. I haven't had the problem with other ActiveX controls I have used. Does anyone have any ideas? I guess this is going to be difficult to resolve, unless I am missing something obvious.
0 项奖励
Jugoslav_Dujic
重要分销商 II
1,307 次查看
You can always include DFLOGM.f90 from ...DF98Include directory into your project and step into it -- it's not that difficult to get into it (at least not for me :-) ). I suspect that DlgInit returns .FALSE. for some reason but you don't check it.
Jugoslav
0 项奖励
Intel_C_Intel
员工
1,307 次查看
I had already done that, both with CVF and IVF. There doesn't seem to be any difference between an example that does work (with say AvisGrid) and the example that doesn't work with SimpleGrid until the function call to DlgDoModeless in DlgModeless. The dlg structures are essentially the same and DlgInit returns .true. (the project generated code performs the check for the return value). SimpleGrid works fine in the VC++ examples supplied with it and compiled on my machine. Is this an issue with the control or the compilers? I haven't much experience with ActiveX controls; is this sort of thing common?
0 项奖励
Jugoslav_Dujic
重要分销商 II
1,307 次查看

At this stage, I suggest you submit this to Premier support. Offhand, sounds like a compiler (library) bug, but it's difficult to tell for sure.

Jugoslav

0 项奖励
Intel_C_Intel
员工
1,307 次查看
I've submitted the issue to Premier support - awaiting their comments. I don't know whether this is a related issue: I don't seem to able touse any ActiveX control in a child window, i.e. a dialog used with a tab control. In CVF I get the same error as before. In IVF the program doesn't halt though a messagboxentitled Dialog Procedure Error with the message "Program exception in DLGMODAL or DLGMODELESS" is displayed. Is this Windows, me or does Visual Fortran not really support the use of ActiveX controls?
0 项奖励
mrvivaldi
初学者
1,307 次查看
Had the same problem trying to use a simple grid.
Down loaded many of the commercial versions. Some worked some did not. Most were capable of doing much more than what my interests were. Finally found ubgrid available from www.dev4dev.com (free) Worked Perfect.
0 项奖励
Intel_C_Intel
员工
1,307 次查看
I did look at ubGrid but one thing I need is to be able to change the background colour of individual cells. Currently I'm planning on using FlexGrid. If I get too bogged down I might try ubGridX.

I found a workaround for the child dialog issue. If there is an instance of the control on the parent dialog (hidden and disabled if required) then there doesn't seem to be a problem in using the control on a child dialog.
0 项奖励
rajt
初学者
1,307 次查看

I seem to have a similar problem and would appreciate any thoughts on a solution. I'm using CVF 6.6C and Array Visualizer 1.6.

I'm porting a simulation model to Windows. It uses dlgmodeless to display an Array Visualizerdialog (similar to ANIMWIN32) to display output data - only once at the end of the simulation run.When run as a Win32 console application everything works fine. However, when run as a Win32 application with entry to WinMain() I get the followingafter the dialog appears but before the graph appears:

The instruction at "0x11d9f67" referenced memory at ")x00030003". The memory could not be "read".

The debugger tells me the problem is inAvis2D.ocx.

This behavior does not occur every time thecontrol is invoked; only about 1 time in 4 or 5 - with the same data and compile. Oddly, if I remove the statements that get the share names for the X & Y axis data and use only one sharename to access the surface data I do not get the error in 30+ attempts.And no problem in console mode.

Is this a thread issue or timing problem or what?

0 项奖励
回复