forums.silverfrost.com Forum Index forums.silverfrost.com
Welcome to the Silverfrost forums
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Compiler crash

 
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> Support
View previous topic :: View next topic  
Author Message
wahorger



Joined: 13 Oct 2014
Posts: 467
Location: Morrison, CO, USA

PostPosted: Mon Nov 06, 2017 11:45 pm    Post subject: Compiler crash Reply with quote

Just added this function, and got a compiler crash.

Here's the text of the error and a link to Google Drive for a ZIP file of a Plato Project that duplicates the error. It includes all the .INS files as well.

This error occurs whether compiling in /CHECKMATE or /RELEASE. I always ask for a listing, but none was generated.

Error:
Code:
Runtime error from program:c:\program files (x86)\silverfrost\ftn95\ftn95.exe
Access Violation
The instruction at address 004c1a80 attempted to read from location 00000004
 004c1a0c process_special_function(<ref>structÄtree_ptr,structÄtree_ptr,enumÄlogical) [+0074]
 004c1c89 process_special_function(<ref>structÄtree_ptr,<ptr>structÄscoped_entity,enumÄlo [+0063]
 00447c5b process_tree1(<ref>structÄtree_ptr,enumÄlogical) [+d106] [recur=  3]
 004391fa process_tree_completely(<ref>structÄtree_ptr) [+0024]
 00417b69 end_function(int) [+0a6f]
 00419a14 parse_end_statement(<ptr>char,int,<ref>int) [+0c04]
 0041311f handle_token(<ptr>char,int,int,int,int,<ref>int) [+0e65]
 004056b3 Prd—Ō
eax=00000000   ebx=0ef78bd4   ecx=03d4c0b4
edx=0f11cee0   esi=0f11ceac   edi=00001e81
ebp=03d4b0a8   esp=03d4b064   IOPL=2
ds=002b   es=002b   fs=0053
gs=002b   cs=0023   ss=002b
flgs=00210212 [NC OP NZ SN DN NV]

 004c1a80  cmp      [eax+0x4],0x1a
 004c1a84  jne      4c1aa9
 004c1a8a  qfild    [00abcfd4]


link: https://drive.google.com/file/d/0B5fbkRqVCqoMN0JPTlNjUUZ1aTA/view?usp=sharing
Back to top
View user's profile Send private message Visit poster's website
wahorger



Joined: 13 Oct 2014
Posts: 467
Location: Morrison, CO, USA

PostPosted: Mon Nov 06, 2017 11:55 pm    Post subject: Reply with quote

I discovered the error in the code that caused the crash.

Near the bottom, in the call to ANNOTATE_LITHO, I used one of the arguments (LITHO_RECORD, a derived type) as if it was an array. It was not declared that way. Perhaps the compiler saw that as a function call?

In any case, it's cleared up for me.
Back to top
View user's profile Send private message Visit poster's website
PaulLaidler
Site Admin


Joined: 21 Feb 2005
Posts: 5496
Location: Salford, UK

PostPosted: Tue Nov 07, 2017 8:39 am    Post subject: Reply with quote

If you can isolate the failure to a few lines of code (and post the result) then we can fix the compiler to avoid the crash.
Back to top
View user's profile Send private message
wahorger



Joined: 13 Oct 2014
Posts: 467
Location: Morrison, CO, USA

PostPosted: Tue Nov 07, 2017 4:48 pm    Post subject: Reply with quote

I posted the link to a ZIP file with the relevant files (not much code).

Shall I try to make it even smaller?
Back to top
View user's profile Send private message Visit poster's website
wahorger



Joined: 13 Oct 2014
Posts: 467
Location: Morrison, CO, USA

PostPosted: Tue Nov 07, 2017 5:53 pm    Post subject: Reply with quote

Even smaller:

Code:
   subroutine draw_litho_on_device(litho_record)
   TYPE:: LITHO_REC
   sequence
! --- DON'T CHANGE THE TYPE OF ANYTHING FROM HERE UNTIL THE MARKER!
   INTEGER*2   :: FWD=0
   END TYPE LITHO_REC

   type (litho_rec) litho_record ! (1) uncomment to get a clean compile

   CALL ANNOTATE_LITHO(x,y,XDIST,XANNO,BOXSIZ,LITHO_RECORD(NLITH),p_options)
   return
   end subroutine
Back to top
View user's profile Send private message Visit poster's website
PaulLaidler
Site Admin


Joined: 21 Feb 2005
Posts: 5496
Location: Salford, UK

PostPosted: Wed Nov 08, 2017 11:05 am    Post subject: Reply with quote

This bug has now been fixed for the next release of FTN95.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> Support All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group