Recent

Author Topic: Lazarus 1.0 RC2 IDE Access violation  (Read 6833 times)

iru

  • Sr. Member
  • ****
  • Posts: 331
Lazarus 1.0 RC2 IDE Access violation
« on: October 01, 2012, 12:58:56 pm »
Environment:
Linux - Mint 13
Lazarus - 1.0 RC2

Gentlefolk,

I have a project imported from windows.
Tided up a lot of things.  on the main form. Compiled clean. Crashed in Application.run.

Closed the IDE.
Started the IDE and I get an Access Violation error.

Can anyone tell me how I can debug the Access violation in the IDE.

Thanks, Ian

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 12409
  • Debugger - SynEdit - and more
    • wiki
Re: Lazarus 1.0 RC2 IDE Access violation
« Reply #1 on: October 01, 2012, 01:26:03 pm »
If you can start the IDE:
- Open project: "ide/lazarus.lpi"
- Run
A 2nd ide will start, and this 2nd IDE will be debugged by the first.

You may have to first rebuild the IDE with debug info. See "Tools" menu "Config build laz". Specify -g in the options, then build all.

---

If the IDE crashes when you start it:
- This can be the configuration that is loaded. Or the project it tries to open
the config is in /home/yourname/.lazarus
Please make a backup, then move it, and try to start the IDE.
If it is the config, then please upload the files, so they can be tested.

Please also report the packages that you have installed (e.g. docking, edittoolbar, ...)


Also try (with the config still in place, so you will get the crash) from a shell:

gdb -i mi -ex "set auto-solib-add off" -ex "b FPC_RUNERROR"  -ex "b FPC_BREAK_ERROR"   -ex r   /path/to/lazarus

and when the crash happened type:
bt

You should get a stack trace

iru

  • Sr. Member
  • ****
  • Posts: 331
Re: Lazarus 1.0 RC2 IDE Access violation
« Reply #2 on: October 01, 2012, 11:49:05 pm »
Thank you for the fast response.

I renamed the .lazarus directory. The IDE loaded correctly without error.

Re-established the .lazarus directory. Tried the "gdb -i mi -ex "set auto-solib-add........" approach.

The IDE loaded but displayed two error messages. Both complained about

"Unable to find the component class "TUniqueInstance".
It is not registered via RegisterClass and no lfm was found."

This is a component from a package I installed. Looks like something has gone wrong there.

I took the "use TForm" load option and the IDE loaded without the access violation error.

I will chase up the state of the "TUniqueInstance".

Once again thanks, Ian.

iru

  • Sr. Member
  • ****
  • Posts: 331
Re: Lazarus 1.0 RC2 IDE Access violation
« Reply #3 on: October 02, 2012, 12:40:05 am »
Gentlefolk,

Re-installed the package containing the "TUniqueInstance" component.

Several tries at installing the package containing "TUniqueInstance" and restarting the IDE. Finally started it up using the GDB.......

The trace shows troubles with the TUniqueInstance.  Ignored the access violation and executed the program in the IDE. GDB trace showed a strange crash somewhere in GTK was also caused by the TUniqueInstance.

Removed the TUniqueInstance. Recompiled and the program displays the first form without any errors.

The TUniqueInstance was used to ensure there was only one copy of the program executing at a time. I can get by without it. It looks like it may not be Linux friendly.

Once again thanks, ian.

 

TinyPortal © 2005-2018