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

Initialization Failure

dherndon
Beginner
1,430 Views
I am in the midst of porting ~100 programs from CVF to IVF. Of the thirty programs I have ported so far, 5 fail to execute. An error dialog pops up saying "The applicatioin failed to initialize properly (0x80000003). Click on OK to terminate the application." Clicking on OK causes the dialog to reappear for a second time. All five programs give the same message with the same address. Does anyone have an idea as to what I am missing or doing wrong to get this message (twice)? Thanks, Dave
0 Kudos
8 Replies
Steven_L_Intel1
Employee
1,430 Views
That's not an address, it's an error code that is coming from the windowing subsystem. I don't know what the code means, though. Do these executables link to any DLLs and if so, are the DLLs present? What does Dependency Walker have to say about them?
0 Kudos
dherndon
Beginner
1,430 Views

Thanks for the quick reply Steve. The program does link to DLLs but when my DLLs are not present, it pops a message saying which DLL could not be found. The five problem programs use exactly the same set of DLLs as the other 25, and they run OK. I will see what Dependency Walker says.

Dave

0 Kudos
Steven_L_Intel1
Employee
1,430 Views
Are these console applications? Windows UI applications? QuickWin?
0 Kudos
dherndon
Beginner
1,430 Views
Wow, Dependency Walker is quite a program. Using it, I was able to isolate the problem to one of our Dlls. This DLL is used to share memory among several programs. A year ago, I submitted an issue on the problems of doing this (#357998 if anyone is interested in seeing the discussion). It turns out that using a DLL to share memory is non-trivial in FORTRAN and may be impossible with the current release. I believe the problem is that some of the variables in a system DLL that is used by our DLL get put into shared memory when they shouldn't be. As discussed with the support people, it is not possible to control this to avoid the problem. I will have to restructure our code to share the memory another way. Thanks for you help and to introducing me to Dependency Walker. Dave
0 Kudos
Steven_L_Intel1
Employee
1,430 Views
Eh? It certainly is possible to share data using a DLL in Fortran.I've attached an example. The important part is that you need a linker option, /section:.data,rws
0 Kudos
dherndon
Beginner
1,430 Views
Steve, You are correct that one can share data as you describe. And we were successfully doing it. I had to put the porting aside for a few months and with IVF release 033 and 034, we can no longer load the DLLs successfully. Looking at the map of our DLL, I see that the compiler/linker put additional data into the .data section. This is OK if the additional data can be shared, but is not OK if the data should not be shared. In this case, the additional data belong to the MSVCR80.DLL and the program gets the error when trying to load MSVCR80.DLL. Thanks for all your input. Dave
0 Kudos
Shafack_N_
Beginner
1,430 Views

Hi,

I am experiencing exactly the same problem as you withan EXE that was generated linked to DLL produced with IVF.I am curious as to how you used Dependency Walker to isolate the problem.

I didn't have the problem previously. It's only after installing 64-bit IVF for testing that the problem started. There is no change whatsoever with thesource code I used to produce the DLL. Both 32-bit and 64-bit version generate the error.

0 Kudos
Shafack_N_
Beginner
1,430 Views

Problem has been resolved by using the MT tool to bind the .MANIFEST file to the DLL after the DLL file is created. Note: I encountered problem when I migrated to VS2008 from VS2003 and I compile from command line.

0 Kudos
Reply