Forum > General

Poject raised exception

(1/2) > >>

MaxCuriosus:
I've ported some Lazarus projects from a Debian 10.7 to a brand new Debian 11.1 system, recompiled them and ran them. All work as expected but one, which gives this error message at execution with debugger:


--- Code: ---Project ... raised exception class 'Unknown' with message:
### Not supported on GDB < 5.3 ###
At address ...
--- End code ---

that apparently comes from the call to ShowMessage(...).

Since the others projects also have this procedure I looked at the project settings but could not find a reason.

Any suggestions welcome.

howardpc:
Try recompiling your projects without debug information?

Martin_fr:
Ignore the "gdb < 5.3" part. That was added way back, when this situation was only knows for any gdb that old.

You got a normal exception somewhere. But the debugger was unable to get the class and msg of the exception.

Depending on how much debug info you have on your app, you may still get a stack trace in the stack window, if you break/pause when you get the dialog.

Alternatively you can try FpDebug / Install package LazDebuggerFp

MaxCuriosus:
howardpc,
Martin_fr,
Thank you.

I was able to locate the cause simply by using the "Console In/Out" that led me to the  initialization section of one of the units in which the code tries to open a file on an external USB stick without verifying first if it is accesible(inserted). That error occurs before the first statement of the program, a call to ShowMessage(...). Lesson learned.

Martin_fr:

--- Quote from: MaxCuriosus on October 30, 2021, 10:00:39 pm ---I was able to locate the cause simply by using the "Console In/Out" that led me to the  initialization section of one of the units in which the code tries to open a file on an external USB stick without verifying first if it is accesible(inserted). That error occurs before the first statement of the program, a call to ShowMessage(...). Lesson learned.

--- End quote ---

Is that on Windows?

Is the EXCEPTION caused by the file-open? Or by the "ShowMessage" call?

The latter is kind of expected, but also maybe fix-able. I had a similar issue with a dialog (file select dialog).

Navigation

[0] Message Index

[#] Next page

Go to full version