Access violation after nullifiying and again allocating pointer



Dear list members,

working on a programm which calculates varying atmospheric profiles, I have a subroutine where the profile is stored in a pointer called 'profile'. Within this profile, there ia a pointer array called 'level' with parameter like temperature, pressure, etc.
When I calculate the profile for the next gridcell, I nullify first the profile to get rid of the old data.
This works fine, until there is an access violation. The appearance of this access violation seems to be independent of the data used in this moment.


A part of the code is shown below:


if(associated(profile))then nullify(profile) endif allocate(profile) ! calculation of number of levels profile%anz_z = INT((cloudtop - cloudbase)/dz) + 5 allocate(profile%level(1:profile%anz_z))


Access violation occurs always in the last allocation statement.

Any suggestions ?

Thanks for your help in advance !

Klemens

p.s.: I work with the Developer Studio 97 and Visual Fortran 5.0
.



Relevant Pages

  • Blank Desktop Problem
    ... When I boot my machine I end up ... with a blank desktop with a mouse pointer. ... When I ctrl alt and del to get ... A copy of this profile is used by Novell's DLU to create a new profile at ...
    (microsoft.public.windowsxp.security_admin)
  • Re: Configuring WM ASF Writer with ConfigureFilterUsingProfile
    ... I have a graph that encodes MPEG files to WMV format using the WMAsfWriter ... ConfigureFilterUsingProfile needs a pointer to my WME profile and if I create ... Iain Downs (DirectShow MVP) ...
    (microsoft.public.win32.programmer.directx.video)
  • Re: Turning off roaming profiles
    ... Thanks - what is this pointer you speak of? ... "Dr. Sys" wrote in message ... > profile will exist for them. ...
    (microsoft.public.windows.server.active_directory)
  • Adding a second mailbox to a profile
    ... I am able to add another mailbox using the GUI. ... I have supplied the server DN and mailbox DN from the profile registry ... pointer. ... structure to hold global profile info. ...
    (microsoft.public.win32.programmer.messaging)
  • Re: New home directory created: messed up user profile? Is there a way out.
    ... point back to the old profile. ... "Donald Newcomb" wrote: ... | this is covered someplace a pointer would be appreciated. ... hippo's "My Documents" folder was pretty much empty. ...
    (microsoft.public.win2000.general)