Forum > Graphics

[SOLVED] Project <name> raised exception class 'External: SIGSEGV'

(1/1)

avv210:
Hi guys. I need help to resolve this issue, when I compile the code, it run as usual. But, when I press the 'Embed' button, immediately it pops up an error. The error message is attached below this column.

Source code on my GitHub: https://github.com/AlphaByte-RedTeam/PascalSteg/tree/development

Please help me to deal with the issue. Thank you so much :D

BlueIcaro:
Hi, I debugging your code I found that the exception raises in this lines,

--- Code: ---procedure TForm1.EmbedToBmp(const message: String; bmp, SaveTo: TBitmap);
var
  bs: AnsiString;
  pix: TColor;
  x, y: integer;
  count: Word;
  bitmap: TBitmap;
begin
  bs := ByteToBits(message);
  SaveTo.Assign(bitmap); //<----Here
(...)

--- End code ---


I wrote

--- Code: ---procedure TForm1.EmbedToBmp(const message: String; bmp, SaveTo: TBitmap);
var
  bs: AnsiString;
  pix: TColor;
  x, y: integer;
  count: Word;
  bitmap: TBitmap;
begin
  bs := ByteToBits(message);
  SaveTo := bmp; //<-- I change this
           

--- End code ---

Well, I don't know why assign method fails. But with change seens works ok.

/BlueIcaro

avv210:

--- Quote from: BlueIcaro on December 28, 2021, 12:21:04 pm ---Hi, I debugging your code I found that the exception raises in this lines,

--- Code: ---procedure TForm1.EmbedToBmp(const message: String; bmp, SaveTo: TBitmap);
var
  bs: AnsiString;
  pix: TColor;
  x, y: integer;
  count: Word;
  bitmap: TBitmap;
begin
  bs := ByteToBits(message);
  SaveTo.Assign(bitmap); //<----Here
(...)

--- End code ---


I wrote

--- Code: ---procedure TForm1.EmbedToBmp(const message: String; bmp, SaveTo: TBitmap);
var
  bs: AnsiString;
  pix: TColor;
  x, y: integer;
  count: Word;
  bitmap: TBitmap;
begin
  bs := ByteToBits(message);
  SaveTo := bmp; //<-- I change this
           

--- End code ---

Well, I don't know why assign method fails. But with change seens works ok.

/BlueIcaro

--- End quote ---
Hi, thank you for replying. The code is working, but when I try to leave the TEdit blank, it prompts me an error like in the attachment below. What is that error means? Thank you :D

BlueIcaro:
This kind of erros, usually means that your trying to access to object that is null or not create
So check your program, put breakpoints to stop the program, and go step to step, to check which line fails.

/BlueIcaro

Navigation

[0] Message Index

Go to full version