[fpc-pascal] RPos Causing Access violation

James Richters james at productionautomation.net
Tue May 21 16:24:48 CEST 2019


I'll try your ideas on how to track this down.

I wonder if I am really having some kind of other issue... maybe RPOS is using the stack and I'm running out of space or some other kind of memory issue.
It seems odd  that I can run this routine dozens of times successfully and then I get this access violation...  with the exact same input it was fine with one loop earlier.  I also have access violations in other procedures.  
I have a sequence that produces it here... but other sequences produce it in other places.     Is there a way I can output various memory areas to see if it's really a memory related issue?  Something like a writeln for stack space etc?

James

-----Original Message-----
From: fpc-pascal <fpc-pascal-bounces at lists.freepascal.org> On Behalf Of Marco van de Voort
Sent: Tuesday, May 21, 2019 9:51 AM
To: fpc-pascal at lists.freepascal.org
Subject: Re: [fpc-pascal] RPos Causing Access violation


Op 2019-05-21 om 14:18 schreef James Richters:
>
> Does anyone have any idea at all why RPOS could not determine that the 
> position of .dpax in M:\elipse_1.dpax was 12 like every other time I 
> ran this????????????
>
> I ran this while looking at task manager and it starts up with 9.2MB 
> of memory and that stays consistent, so I don’t think I have a memory 
> leak anywhere. Any ideas??     I’m running on Windows 10,  compiling 
> with FPC 3.0.4RC1 with the FPC text IDE.
>
>
Start with assigning the result of the rpos to a variable and printing and reusing that.

To do anything we will need a compilable short fragment of code demonstrating the bug.

Sometimes this can be done by just taking the existing source and start removing code that doesn't seem to influence the code, and passing constants instead of whereever you get your filenames.

_______________________________________________
fpc-pascal maillist  -  fpc-pascal at lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal



More information about the fpc-pascal mailing list