Jump to content
Sign in to follow this  
Al T

[Solved](Delphi 11) How do use Label.Text on Android without Segment Fault 11?

Recommended Posts

[Solved Second Post]

 

Hi...

 

I had found out in a previous question that my Segment Fault was caused by LabelLine1.Text.

 

Now I'm trying to figure out how to use Label.Text without creating a Segment Fault 11?

 

I've already tried LabelLine1.BeginUpdate / EndUpdate... that doesn't stop the Segment Fault... what else could I do?


 

      while FileNameCounter<126 do
      begin
        inc(FileNameCounter);

        RandomFileName := FolderArea + TPath.DirectorySeparatorChar + 'ran' + IntToStr(FileNameCounter) + '.txt';

        try
          LabelLine1.BeginUpdate;
          LabelLine1.Text := 'Creating: ran' + IntToStr(FileNameCounter) + '.txt'; // May cause Segment Fault 11
          LabelLine1.EndUpdate;

          dString('Create RandomFile:'+RandomFileName);  //could write a TStringList and save to it... later savetofile
          //sleep(500); //dString writes to a file log file.
          MemoryCopyToFile(RandomFileName);
        Except
          On E: Exception Do
          begin
            dString('TFile.Copy(RandomFileToCopy, RandomFileName):'+E.ClassName + ' ERROR: ' + E.Message);
            breakit := true; //break on error
          end;
        end;

        if breakit = true then exit;

      end;

 

Edited by Al T

Share this post


Link to post

Okay... I disabled AutoSize, AutoTranslate, EnableDragHighLight, ParentShowHint and it seems to work perfectly now.  I'm not going thru those to figure out the "real" problem.

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×