Simplemathic
Simplemathic

Reputation: 111

Debugger error 193 lazarus

I can't debug one of my programs for a year now. When I press the green Run button, the following error message appears:

enter image description here

The full text is:

The GDB command:
"-exec-run"
returned the error:
",msg="Error creating process C:/Users/leven/OneDrive/J\341t\351kpogramok/People/people.exe, (error 193).""

I've read many forums about this error, but my case looks a bit different...

  1. As you can see, the file's path doesn't include any characters that could occur this problem (no spaces, no special letters). I've tried running outside OneDrive, same error.
  2. I've spent a lot of time looking for something in my program that occurs this error and found that if I delete some parts of it (eg. a few procedures or functions, which contains a lot of code though), the program is debuggable again! So the trouble is with some parts of the program, but I still don't know the exact problem.
  3. As I can remember, I've always debugged this program in a 64bit OP.
  4. The one thing that could be problematic is that I probably started writing the program using Windows 7 or 8, and now I want to run it using Windows 10, but I still don't understand, why deleting some parts of the program is a solution...

Thanks in advance for your help!

UPDATE:

I've found, that the line

p[x,y,2,1]:=r;

cannot be debugged by the compiler. Description:

p: array [1..15000, 1..10000, 1..7, 1..4] of integer;

p[] is a game field. The first two parameters are coordinates, the third and the fourth are not important.

x, y and r are integers.

So, the command seen above writes a number into the game field (p[]) array using the x, y coordinates.

Upvotes: 1

Views: 884

Answers (1)

MartynA
MartynA

Reputation: 30715

I think we established through a series of queries in comments that the necessary and sufficient condition to provoke the debugger problem you've been getting is to include in your app the declaration of the array p that you've added to your q, that is:

var
  p: array [1..15000, 1..10000, 1..7, 1..4] of integer;

For you, it seems that just including this declaration in your code is sufficient to make the debugger throw the error you quote.

For me the debugger starts fine but I get a SIGSEGV error on the assignment to p[] in the following code:

var
  p: array [1..15000, 1..10000, 1..7, 1..4] of integer;
  x,
  y,
  r : integer;

begin
  x := 100;
  y := 100;
  r := 666;
  p[x, y, 1, 1] := r;
  writeln('Press any key ...');
  readln;
end.

So, I would try smaller values for the first two bounds of the p array. If that works and you still need the original bounds, I would suggest looking for an FPC library which implements "sparse arrays" and declare p as one of those.

Good luck!

Upvotes: 3

Related Questions