Recent

Author Topic: Existing project crashes with "ACCESS VIOLATION" and no other information.  (Read 2887 times)

NightSky

  • New Member
  • *
  • Posts: 20
I have a relatively large project running with the latest version of Win10, Lazarus, and the various plugins.

Intermittently, the project crashes on startup.  The editor and IDE come up, but apparently, when trying to actually draw the project, the Lazarus GUI hangs with the little rotating circle, then shuts down things and complains that there is an "ACCESS VIOLATION".  It does so with two warnings in the box, and gives me no option other than to cancel, which shuts down Lazarus.

Nothing really looks bad in the various files, but I suspect that there's a component in there that's messed up somewhere, possibly in the .ifm file.  It is a big project, so before I start posting files, what can I do to narrow down the problem?

This is not the program crashing when I compile and run the application, it's the actual GUI (and I think drawing the graphics of the project) that crashes.  This happened first after a number of cut and pastes to a page control, I managed (somehow) to get it running by finding a backup that I had made (not Lazarus....), then this happens again.

The lack of information in the error message suggests that this caused something to dig down pretty far.

What now?

wp

  • Hero Member
  • *****
  • Posts: 11916
Re: Existing project crashes with "ACCESS VIOLATION" and no other information.
« Reply #1 on: September 02, 2021, 10:45:10 am »
I know from your other post that you have a virtual treeview on the form. Since memory handling in this component is a bit delicate I'd comment the code of all event handlers of VTV between "begin" and "end" - the program is not usable this way but you could find out whether one of the VTV handlers is the culprit.

NightSky

  • New Member
  • *
  • Posts: 20
Re: Existing project crashes with "ACCESS VIOLATION" and no other information.
« Reply #2 on: September 02, 2021, 05:28:36 pm »
Thanks for the suggestion. 
In following it, I opened the main.pas file in another editorand commented out the calls, since I couldn't do an F11 and get to the properties of the vst.

For "fun" I clicked on the project.lpr file, which, after a "this seems to be a pascal project file, do you want to open the project" dialog once, The project opened.  It did not crash.  it compiled.  hmmmm......

Going back and clicking on the lazarus pascal icon, the project starts, then crashes with access violation (after a bit, it's trying rather hard).
IIRC, "open recent project" from the internal project menu crashes as well.

This points to a file, I think.  Interesting that there are two ways of opening the project.

wp

  • Hero Member
  • *****
  • Posts: 11916
Re: Existing project crashes with "ACCESS VIOLATION" and no other information.
« Reply #3 on: September 02, 2021, 06:14:45 pm »
My idea with removing the event handler code was nonsense because this affects the runtime behaviour, but your project crashes when it is opened at designtime. Sorry.


NightSky

  • New Member
  • *
  • Posts: 20
Re: Existing project crashes with "ACCESS VIOLATION" and no other information.
« Reply #4 on: September 02, 2021, 07:22:13 pm »
I wouldn't say that it's nonsense.  It's possible that I did something to mess up something, somewhere.  There may be a clue in what I found above, I think that clicking the lpr or lpi files (and starting the IDE that way) may lead to something.  This is something I found by accident and would not have found without your post.

I did strip the project down to eliminate all third party (mine) components, made it a lot smaller, and will post it on the other thread. 

Assuming this initial project crash can be fixed, the node height issue becomes the remaining problem.

Thanks for looking at this.

 

TinyPortal © 2005-2018