Discussion:
[Lazarus] Restart Lazarus after rebuild crashes
Donald Ziesig via Lazarus
2018-05-11 22:40:52 UTC
Permalink
Hi All!

Brand new Laptop :-). Clean installation of Linux Mint 18.3.:-) New
download of Lazarus.  Version 18.2, Date 2018=-05-10, FPC 3.0,
x86_64-linux-gtk2 8-).

Added simple component, interface section and mostly stubbed methods
(only Create and Destroy have code).  After Lazarus successfully
installs the component (rebuilding), the IDE crashes when trying to
restart with the following:

Hint: (lazarus) TMainIDE.DoRestart
WARNING: TMenuItem.Destroy with LCLRefCount>0. Hint: Maybe the component
is processing an event?
WARNING: TToolBar.Destroy with LCLRefCount>0. Hint: Maybe the component
is processing an event?
TApplication.HandleException Access violation
  Stack trace:
  $0000000000000000
  $000000000060C5CE line 69 of include/toolbutton.inc
  $000000000060C550 line 116 of include/toolbutton.inc
  $000000000059876A line 2292 of include/control.inc
  $0000000000598C37 line 2430 of include/control.inc
  $000000000043281F
  $0000000000596C38 line 1571 of include/control.inc
  $000000000058956B line 4735 of include/wincontrol.inc
  $000000000058AC51 line 5362 of include/wincontrol.inc
  $0000000000756032 line 112 of lclmessageglue.pas
  $0000000000657825 line 3702 of gtk2proc.inc
  $0000000000666F6D line 2194 of gtk2callback.inc
  $00000000006665D8 line 1949 of gtk2callback.inc
  $00007FB43DD42AEC
Exception at 0000000000000000: EAccessViolation:
Access violation.

(lazarus:28802): GLib-GObject-CRITICAL **: g_object_get_data: assertion
'G_IS_OBJECT (object)' failed
TApplication.HandleException Access violation
  Stack trace:
  $0000000000432718
  $0000000000666644 line 1964 of gtk2callback.inc
  $00007FB43DD42AEC
Exception at 0000000000432718: EAccessViolation:
Access violation.
LAZARUS END - cleaning up ...
[FORMS.PP] ExceptionOccurred
  Sender=EAccessViolation
  Exception=Access violation
  Stack trace:
  $00007FB43D9DE820
TApplication.HandleException Access violation
  Stack trace:
  $00007FB43D9DE820
Exception at 00007FB43D9DE820: EAccessViolation:
Access violation.


The offending line is:

    pt := ScreenToClient(Mouse.CursorPos);

and based on the stacktrace I would beleive that Mouse.CursorPos is
nil!  I then added:

if not Assigned(Mouse) then exit;

This moved the location of the Access Violation, confirming that Mouse
is indeed nil.  At that point I figured that I should report this and
leave further debugging to the experts.:-[

~/.lazarus/bin/lazarus and
~./lazarus/bin/lazarus.old

both have the correct timestamps.

I saw this before on my old machine, but at that point I had installed a
large library of components and I thought that maybe I had caused the
problem.  This time I have a new, up-to-date installation which crashed
the first time I added a trivial component and rebuild the IDE.

I will try to submit a bug report, but trying to replicate for the
report may be a step too far.

Thanks,

Don Ziesig

--
Mattias Gaertner via Lazarus
2018-05-12 09:53:30 UTC
Permalink
On Fri, 11 May 2018 18:40:52 -0400
Post by Donald Ziesig via Lazarus
Hi All!
Brand new Laptop :-). Clean installation of Linux Mint 18.3.:-) New
download of Lazarus.  Version 18.2, Date 2018=-05-10, FPC 3.0,
x86_64-linux-gtk2 8-).
Added simple component, interface section and mostly stubbed methods
(only Create and Destroy have code).  After Lazarus successfully
installs the component (rebuilding), the IDE crashes when trying to
Do you restart the IDE via File / Restart, or automatically when
installing the component.
How did you install the component? Click in the package editor or via
the Package / Install package dialog?

Mattias
--

Loading...