After having posted regarding access violation, then employing
gflags.exe to further pinpoint the location and nature of the issue, I
think we located where it is.
Here's the function in question. We're breaking on the last line in
the function, deallocate(). Anywhere else we deallocate, we also
return. I don't know why that should be an issue? Should we also
return?
We're using the Intel Fortran compiler for Microsoft Visual Studio
2005. Intel(R) Fortran Compiler Integration for Microsoft Visual
Studio 2005, 10.1.3885.2005, Copyright (C) 2002-2007 Intel
Cor****ation.
integer function read_variables_projparams()
implicit none
character (len=len_attr_str), allocatable, dimension(:) ::
names
character (len=len_longattr_str), allocatable, dimension(:) ::
values
integer :: np, error_code
read_variables_projparams = 0
if ( num_namevalues <= 0 ) return
if ( not( has_a( p_currgrid, netcdf_projparam_names ) ) ) return
if ( allocate_namevalues_ptr( p_projdesc_curr, num_namevalues ) /
= 0 ) then
call variable_read_error( netcdf_zagl )
read_variables_projparams = error_code
return
endif
allocate( names(num_namevalues), stat = error_code )
allocate( values(num_namevalues), stat = error_code )
error_code = read_var( netcdf_projparam_names, names )
if ( error_code /= 0 ) then
if ( vars(netcdf_zagl)%abort_if_missing ) then
call variable_read_error( netcdf_projparam_names )
read_variables_projparams = error_code
deallocate( names, values )
return
endif
endif
error_code = read_var( netcdf_projparam_values, values )
if ( error_code /= 0 ) then
if ( vars(netcdf_zagl)%abort_if_missing ) then
call variable_read_error( netcdf_projparam_values )
read_variables_projparams = error_code
deallocate( names, values )
return
endif
endif
do np = 1,num_namevalues
error_code = set_name_value_ptr( np, p_projdesc_curr, &
names(np), values(np) )
if ( error_code /= 0 ) then
call variable_read_error( netcdf_projparam_values )
read_variables_projparams = error_code
deallocate( names, values )
return
endif
enddo
deallocate( names, values )
end function read_variables_projparams


|