Silverfrost Forums

Welcome to our forums

Access violation

20 Jan 2013 6:19 #11427

Hi Anyone seen this error? It occurs when trying to call subroutine: http://www.uploadimage.co.uk/images/1-20-2013_9-44-46_pm-1358705766.jpg

http://www.uploadimage.co.uk/images/1-20-2013_9-45-04_pm-1358705774.jpg

    SUBROUTINE PROPAGATION()

      USE VARIABLES

!.....WEST
!
   DO J=1,NJ
	DO I=1,NIM
	IF (.NOT.OBST1(I+1,J)) THEN
	    FIN(3,I,J) = FOUT(3,I+1,J)
	   ELSE
	   X=(X_CYL-(R**2-(J-Y_CYL)**2)**0.5)
	   Q=ABS(X-I)
	   !FIN(3,I,J)=(1/(1+Q))*(Q*FOUT(1,I,J)+(1-Q)*FOUT(1,I-1,J)+Q*FOUT(3,I,J))
	      IF (Q<0.5) THEN
	      FIN(3,I,J)=(2*Q*FOUT(1,I,J))+(1-2*Q)*FOUT(1,I-1,J)
	      ELSE
	      FIN(3,I,J)=(1/(2*Q))*FOUT(1,I,J)+((2*Q-1)/(2*Q))*FOUT(3,I,J)
	      END IF
	   END IF
	ENDDO
	ENDDO

!
!.....NORTH-WEST
!
  DO J=NJ,2,-1
	DO I=1,NIM
	IF (.NOT.OBST1(I+1,J-1)) THEN
     FIN(6,I,J) = FOUT(6,I+1,J-1)
	 ELSE	 
	 B=I+J-Y_CYL
	 DELTA=(X_CYL+B)**2-2*(X_CYL**2+B**2-R**2)
	 X=((B+X_CYL)-(DELTA**0.5))/2
	 Q=ABS(X-I)
	! FIN(6,I,J)=(1/(1+Q))*(Q*FOUT(8,I,J)+(1-Q)*FOUT(8,I-1,J+1)+Q*FOUT(6,I,J))
	 IF (Q<0.5) THEN
	 FIN(6,I,J)=(2*Q*FOUT(8,I,J)+(1-2*Q)*FOUT(8,I-1,J+1))
	 ELSE
	 FIN(6,I,J)=(1/(2*Q))*FOUT(8,I,J)+((2*Q-1)/(2*Q))*FOUT(6,I,J)
	 END IF
      END IF
      ENDDO
	ENDDO
return
end

[/code]

21 Jan 2013 2:29 #11428

Try compile with /check or at least /debug and hope for a better error report. I am not familiar with the IDE environment you are using, but there have been a few similar screen dumps like this lately. I compile, link and run in a cmd.exe box and usually get a much better error report. I have a simple .bat file to manage all this, resulting in an apparently much more robust outcome. Why do you run your programs in these IDE's if the diagnostics are so poor ?

John

21 Jan 2013 7:47 #11429

When using the Silverfrost plug-in for Visual Studio (or Plato), uses should select Checkmate from the toolbar before testing their code.

Please login to reply.