Recent

Author Topic: Stack overflow  (Read 6444 times)

Birger52

  • Sr. Member
  • ****
  • Posts: 309
Stack overflow
« on: August 29, 2018, 01:24:07 pm »
So - had my components working together.
BUt a little complaicated, because of interdependencies and circular references.

Put them together in one unit, rather than three.
Compiles just fine - doesn't give any errors anyway.
Installed.

And Lazarus starts with a Stack overflow error.

I can click Abort, and I can click OK - and either way, Lazarus shuts down, before it even gets started.

Any solutions o that one?
Lazarus 2.0.8 FPC 3.0.4
Win7 64bit
Playing and learning - strictly for my own pleasure.

howardpc

  • Hero Member
  • *****
  • Posts: 4144
Re: Stack overflow
« Reply #1 on: August 29, 2018, 01:32:51 pm »
Rethink the design, and the interdependencies and need for circular references.
Separating components into units will help you to devise a cleaner design.
Without seeing what you are trying to accomplish, and the way you have coded it, it is hard to offer more than a bland generalisation.
Anyway, increasing stack size is almost certainly not a solution. Do you use recursive routines at all?


Birger52

  • Sr. Member
  • ****
  • Posts: 309
[Solved] Re: Stack overflow
« Reply #2 on: August 29, 2018, 02:42:48 pm »
Have descibed project earlier n this thread
https://forum.lazarus.freepascal.org/index.php/topic,42268.0.html

Actually creatd an ancester class for the required objects, to avoid the circular referances.

But there is really no way to avoid the dependecies.

The problem was, how to get Lazarus running again...
;)
Wich has been accomplished, by reinstallign froms cratch.

« Last Edit: August 29, 2018, 04:00:21 pm by Birger52 »
Lazarus 2.0.8 FPC 3.0.4
Win7 64bit
Playing and learning - strictly for my own pleasure.

Birger52

  • Sr. Member
  • ****
  • Posts: 309
Re: Stack overflow
« Reply #3 on: August 29, 2018, 04:02:39 pm »
My bad...

Tried to call the package same as unit - which messes up filenames, so definition file of package was also part of the package.

 %)
Lazarus 2.0.8 FPC 3.0.4
Win7 64bit
Playing and learning - strictly for my own pleasure.

 

TinyPortal © 2005-2018