Forum > Debugger

F8 step-over sometimes goes into assembly code

<< < (4/5) > >>

Eugene Loza:
Sorry for the delay with this - was going to get back to the issue in a couple of hours... And huge thank you!

Eugene Loza:
One more potential issue (unless it's a special case of the previous one):


--- Code: Pascal  [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} ---program Project1;uses  Classes, SysUtils;begin  try    WriteLn(TObject(nil).ClassName);  except  end;end.
1. Run the program
2. Get Access Violation
3. Press F8
4. The file "Seh64.inc" was not found (attachment 1)
5. No.
6. Assembler window pops up (attachment 2)

Thaddy:
Are you "eating" exceptions?
e.g.: do you do this:

--- Code: Pascal  [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} ---try  something that can cause an exceptionexcept // with no code until end; empty block.end;//without handling it properly?Then you get what you showed.
SEH becomes useless then.
Beginners mistake. It is very hard to debug such code and it is wrong, very wrong.

Eugene Loza:

--- Quote ---Are you "eating" exceptions?
--- End quote ---
No, I'm making the most minimal reproduction of the issue that is nagging me in a big project, where the exceptions are (hopefully) properly treated, though F8 "resurfaces" only in "try..except" statement, going through not very useful Assembly before that and often very little information on what exactly went wrong - only a consequence in form of an exception. Often "Call Stack" helps to debug those. But the example above shows only one thing (as the caption of this topic) : Pressing F8 goes into Assembly window instead of showing something meaningful.

Adding WriteLn('Exception!') in the except block doesn't seem to change the issue. The Seh64.inc is still not found and Assembly window is displayed instead but it's one more line of code :)

Thaddy:
If you are sure, use the call-stack to debug it. It will narrow down to where the exception occurs.

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version