Recent

Author Topic: [SOLVED] Project <name> raised exception class 'External: SIGSEGV'  (Read 2437 times)

avv210

  • New Member
  • *
  • Posts: 13
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
« Last Edit: December 29, 2021, 09:27:16 am by avv210 »

BlueIcaro

  • Hero Member
  • *****
  • Posts: 705
    • My github
Re: Project <name> raised exception class 'External: SIGSEGV'
« Reply #1 on: December 28, 2021, 12:21:04 pm »
Hi, I debugging your code I found that the exception raises in this lines,
Code: [Select]
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
(...)


I wrote
Code: [Select]
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
           

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

/BlueIcaro

avv210

  • New Member
  • *
  • Posts: 13
Re: Project <name> raised exception class 'External: SIGSEGV'
« Reply #2 on: December 28, 2021, 03:11:21 pm »
Hi, I debugging your code I found that the exception raises in this lines,
Code: [Select]
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
(...)


I wrote
Code: [Select]
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
           

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

/BlueIcaro
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

  • Hero Member
  • *****
  • Posts: 705
    • My github
Re: Project <name> raised exception class 'External: SIGSEGV'
« Reply #3 on: December 28, 2021, 04:12:42 pm »
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

 

TinyPortal © 2005-2018