Recent

Author Topic: Cannot find bounds of current function error  (Read 18518 times)

KMagic

  • Full Member
  • ***
  • Posts: 100
Re: Cannot find bounds of current function error
« Reply #15 on: January 31, 2014, 02:09:04 pm »
I have sent it to your email.

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 9864
  • Debugger - SynEdit - and more
    • wiki
Re: Cannot find bounds of current function error
« Reply #16 on: January 31, 2014, 04:45:19 pm »
Ok,  I got the file, I am looking through it.

Before I go into details:
In the past this has sometimes happens with some firewalls or antivirus solutions. You can search the forum  for comodo-firewall, and bitdefender (at least in the past) had also had issues. Other may as well.
If they allow something like a "game mode" or temporary restriction, or exception of your own file, it might be worth trying.

However, the log does NOT look as if it is the AV.

---------------------------------------
Also, if you whish to continue this conversation by mail, you can choose to answer this to my email. I will then continue further replies by email too.

---------------------------------------

Let's first verify that I interpreted the log correctly:

As far as I can see, you do the correct steps. The file has debug info and all.
- you run (F9) to the breakpoint at the first line in the main "begin" of the lpr.
  I see an assembler output, I GUESS you still had the asm window open from previous?
- you pressed F7
- The program continued, but never stopped. (probably it looked like nothing happened at all??)
- I ASSUME you pressed the "stop" button?
  At least I see that the IDE forcefully stopped the app.

Please confirm, or correct me on those steps above.

----
If so:

Is the initial breakpoint on a line that calls another function, or procedure?
Is that function in the same unit, or a different unit?

While still at the breakpoint (before pressing F7), if you look at the code of that function, does it have blue dots?

What happens if instead of "stop" (assuming you did press that), you try to press "pause", and then rook at the stack-window (and the thread window, ensuring the thread with ID 1 is selected)?


BTW,
If this is a line like
Code: [Select]
readln;then it will only return after you entered something in the console, AND press return in the console.

If this is a line like
Code: [Select]
while condition do foo; // e.g. while a < b do a := 0;
where all is on one line, then it will only return, if the condition is true.
- Stepping does NOT step between instructions on the same line.
- And in my example, if b is greater than 0, it is an endless loop, and the single step (F7) will never return, as the loop continues. The only way out is "pause", and then look at the variables in watches win)



---------------
A note on the side / not (yet) important) / you can safely ignore this for now:

There is an unexpected internal difference when your app starts, to what happens on many other PC. But it is most likely totally OK, and most likely not the problem.
I will still look out for anything on it, just in case.

When your app starts, it starts something starts a 2nd thread within your app. (Most likely this is not your code, and not any code by lazarus or FPC).
It is normal that windows, and/or other programs, sometimes do this.
It does appear to happen in a helper dll from IE.
A quick google indicates that this can be affected by the version of IE, by an Antivirus, or by VisualStudio. (I would also guess any IIS related install)

But as I said, sofar this does not seem connected to the actual problem....





krzynio

  • Jr. Member
  • **
  • Posts: 99
    • Krzynio's home page
Re: Cannot find bounds of current function error
« Reply #17 on: November 25, 2014, 07:43:37 am »
Hi!

I noticed the same error: 'Cannot find bounds of current function error'.
I know that it is to late for solving your problem, but maybe it helps Lazarus developers to correct any errors.
I copied TZQuery (dm.q1) from data module to MainForm and called simply q1.
Next I replaced earlier used dm.q1 with q1 and I run the program.
I could not compile it or trace even if I set break point in first line after begin of the project source.
I still noticed the 'Cannot find bounds of current function error' message.
Then I saw that during copy process Lasarus cleared Connection property of q1.
After assigning the Connection everything started to work fine.
In my opinion the message is not appropriate to the error.
Should be rather 'Missing connection property in q1" or something like that and should not be listed before opening the query without Connection property assigned.

Best regards,
Krzysztof
Ubuntu 23.10 x64, / Windows 11 PL - latest updates
Lazarus 2.2.6, FPC 3.2.2

 

TinyPortal © 2005-2018