Recent

Author Topic: FP crashes after running run  (Read 3280 times)

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 10786
  • Debugger - SynEdit - and more
    • wiki
Re: FP crashes after running run
« Reply #15 on: January 13, 2025, 09:03:42 pm »
When you don't use "start" it should run in the existing window, using the existing console.

Not sure, but I guess that with start, all the output (including stderr) went to the new window, and that new window closes.

However, it is well possible that it won't print anything. In that case, it will need to be debugged. Which means the need for a debug build. (and that by someone for whom it does crash, which currently means you).

If you did a custom build, you might well first test the version from git main branch (aka 3.3.1). It might already be fixed.

anon

  • New member
  • *
  • Posts: 7
Re: FP crashes after running run
« Reply #16 on: January 14, 2025, 09:54:16 pm »
So what should I do? Its annoying that the run option doesnt work.

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 10786
  • Debugger - SynEdit - and more
    • wiki
Re: FP crashes after running run
« Reply #17 on: January 15, 2025, 12:02:18 am »
So what should I do? Its annoying that the run option doesnt work.

Well, in short, as before: try a newer version (even that is not yet released).

The longer version:

There is no easy way. You have done the right thing to come here.
But unfortunately for you, it seems no one else has the same problem. So no one else can answer why it happens. I tried, but my fp.exe did not crash. So I don't know what causes it. I guess, its the same for others, they don't get the crash.

That means, you either debug the issue. Or help doing it and providing debug output.
Or you try a newer version (probably easier).
Or you try to change settings (options) and hope that one of the options makes a difference. But that may not happen...

In either case, it isn't going to be simple.



The easiest I can think of => try fpcupdeluxe.

Use it to install either 3.2.3 or 3.3.1 and the try the fp.exe that it installed.
If you are lucky, that works.

If not, then it may be a time taking process, having to wait for others.
Install the above (ideally 3.3.1), but with debug info (not sure where that is specified in fpcupdeluxe, but you need to add  -gw -gl  to the build options of that fpc).
Then ask again, and I can give you steps how to run fp.exe inside gdb, and get a stacktrace.
When and if you have a stacktrace, you can report this on the bug tracker. And then it will take until someone from the fpc team can deal with it (I am not from that team / I am from the Lazarus team).
Note, that this would mean it may be some time until it gets fixed.


Maybe someone else has an idea too.


Also your
{$app type console}
is wrong.

I think it should be one word "apptype", but I would have to check the docs.
However, I can enter it either way (or even leave it away) and have no issues.



If you want to play with options
- turn on/aff debug info
- toggle diff debug info, by specifying "additional compiler opt" -gw or -gw3
those would take effect if it is the build in gdb that causes the crash. But that is just one random possibility.

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 10786
  • Debugger - SynEdit - and more
    • wiki
Re: FP crashes after running run
« Reply #18 on: January 15, 2025, 12:06:36 am »
Also, unless I overlooked something, it is not exactly clear what OS/CPU/... you have?

Your background shows a Windows logo. But for all I know it could be wine. But probably it is Windows / not sure which version though.

Your "about" shows that your fp.exe is for Windows and for i386 (32bit).

EDIT: Call me blind: Windows 10 64 bit
(same as me, btw)
« Last Edit: January 15, 2025, 12:13:37 am by Martin_fr »

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 10786
  • Debugger - SynEdit - and more
    • wiki
Re: FP crashes after running run
« Reply #19 on: January 15, 2025, 12:15:57 am »
One other idea just came to mind.

Exclude from Windows defender (and/or whatever other antivirus you have).

Exclude the fp.exe and exclude your compiled app (ideally the folder).

I have seen fp.exe shutting down test apps build with fpc. => they are simply to small, and do no actual work. That seems to make them suspicious. (I understand it doesn't shut down outside the IDE / but who knows...)

marcov

  • Administrator
  • Hero Member
  • *
  • Posts: 12025
  • FPC developer.
Re: FP crashes after running run
« Reply #20 on: January 15, 2025, 10:06:01 am »
Try without "start"?

 

TinyPortal © 2005-2018