Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2015-12

Error when installing project groups

8 messages · 4 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Michael Van Canneyt

Hi,

I tried to install the lazprojectgroups package.

Upon the next start of lazarus, the whole of lazarus crashes with an index out of bounds. I believe someone else reported it already.

The strange thing is that the crash happens in something unrelated to lazprojectgroups:

[FORMS.PP] ExceptionOccurred
Sender=EListError
Exception=List index (24) out of bounds
Stack trace:
$00000000004EE835
$00000000008A4E41 line 1074 of menuintf.pas
$00000000008A49ED line 1163 of menuintf.pas
$00000000008A493E line 1146 of menuintf.pas
$00000000008A549B line 1274 of menuintf.pas
$00000000008A5492 line 1270 of menuintf.pas
$00000000008A599C line 1347 of menuintf.pas
$00000000008A58BC line 1336 of menuintf.pas
$00000000008A2A38 line 522 of menuintf.pas
$00000000016EAF59 line 365 of reglazdatadict.pp
$00000000009BB211 line 5434 of ../packager/packagesystem.pas $00000000009A7B49 line 1814 of ../packager/packagesystem.pas $0000000000E0C190 line 55 of lazaruspackageintf.pas $00000000004C9CCA line 18 of lazdatadict.pas
$00000000009BB211 line 5434 of ../packager/packagesystem.pas $00000000009BB006 line 5400 of ../packager/packagesystem.pas $00000000009C2643 line 1580 of ../packager/pkgmanager.pas

Presumably, both packages register a menu section.

The lines in question are

         if ContainerMenuIndex>ContainerMenuItem.Count then begin
           debugln('TIDEMenuSection.UpdateMenuStructure CREATE BottomSeparator Name="',Name,'" ContainerMenuIndex=',dbgs(ContainerMenuIndex),' ContainerMenuItem.Count=',dbgs(ContainerMenuItem.Count
           GetRoot.WriteDebugReport(' Bottom ',true);
         end;
         ContainerMenuItem.Insert(ContainerMenuIndex,FBottomSeparator);
       end;

At the very least the

        if ContainerMenuIndex>ContainerMenuItem.Count then begin
           debugln('TIDEMenuSection.UpdateMenuStructure CREATE BottomSeparator Name="',Name,'" ContainerMenuIndex=',dbgs(ContainerMenuIndex),' ContainerMenuItem.Count=',dbgs(ContainerMenuItem.Count
           GetRoot.WriteDebugReport(' Bottom ',true);
         end;

Looks strange, since if that happens, there is sure to be a crash with the insert, but no action other than a debug message is posted ?

What can I do to prevent this and yet have both packages installed?

Michael.

Graeme Geldenhuys
to Michael Van Canneyt
Michael Van Canneyt wrote 8 lines
Upon the next start of lazarus, the whole of lazarus crashes with an index out of bounds. I believe someone else reported it already. The strange thing is that the crash happens in something unrelated to lazprojectgroups: [FORMS.PP] ExceptionOccurred Sender=EListError Exception=List index (24) out of bounds

I tried Project Groups today as well, and got the exact same error.

Regards,
- Graeme -

My public PGP key: http://tinyurl.com/graeme-pgp

Michael Van Canneyt
to Graeme Geldenhuys
Graeme Geldenhuys wrote 12 lines
On 2015-12-17 20:42, Michael Van Canneyt wrote: > Upon the next start of lazarus, the whole of lazarus crashes with an index > out of bounds. I believe someone else reported it already. > > The strange thing is that the crash happens in something unrelated to lazprojectgroups: > > [FORMS.PP] ExceptionOccurred > Sender=EListError > Exception=List index (24) out of bounds I tried Project Groups today as well, and got the exact same error.

If I remove the lazdatadict package, then the error happens on another place:

Bottom Name="" Caption="Insert file name" Flags=VEH 0/1 [FORMS.PP] ExceptionOccurred
Sender=Exception
Exception=
Stack trace:
$000000000089E6B7 line 810 of projectintf.pas
$00000000008F2A43 line 1046 of projectdefs.pas
$00000000004322B0
$000000000049925D line 1664 of main.pp
$0000000000498B73 line 1559 of main.pp
$000000000041FECF line 128 of lazarus.pp

So the error is definitely in lazprojectgroups :/

Michael.

Mattias Gaertner
to Michael Van Canneyt: I tried to install the lazprojectgroups package. Upon the next start of lazarus, the…
Show quoted text 10 lines
[...] I tried to install the lazprojectgroups package. [...] if ContainerMenuIndex>ContainerMenuItem.Count then begin debugln('TIDEMenuSection.UpdateMenuStructure CREATE BottomSeparator Name="',Name,'" ContainerMenuIndex=',dbgs(ContainerMenuIndex),' ContainerMenuItem.Count=',dbgs(ContainerMenuItem.Count GetRoot.WriteDebugReport(' Bottom ',true); end; Looks strange, since if that happens, there is sure to be a crash with the insert, but no action other than a debug message is posted ?

It means there is an inconsistency. This should never happen.

What can I do to prevent this and yet have both packages installed?

There is already a bug report
http://bugs.freepascal.org/view.php?id=29198

I'm not yet sure where the real bug is.

Mattias

Michael Van Canneyt
to Mattias Gaertner
Mattias Gaertner wrote 15 lines
On Thu, 17 Dec 2015 21:42:28 +0100 (CET) Michael Van Canneyt wrote: > [...] > I tried to install the lazprojectgroups package. > [...] > if ContainerMenuIndex>ContainerMenuItem.Count then begin > debugln('TIDEMenuSection.UpdateMenuStructure CREATE BottomSeparator Name="',Name,'" ContainerMenuIndex=',dbgs(ContainerMenuIndex),' ContainerMenuItem.Count=',dbgs(ContainerMenuItem.Count > GetRoot.WriteDebugReport(' Bottom ',true); > end; > > Looks strange, since if that happens, there is sure to be a crash with the > insert, but no action other than a debug message is posted ? It means there is an inconsistency. This should never happen.

"This should never happen".

Yes, many people scratched their heads over this idea at one point or another ;-)

Reminds me of the time a fellow programmer put a

MessageBox('The spaceship <yourcompanyname> is about to crash, hold on to your hat!');

in the code, being 100% sure it would never ever appear on screen. Till it did... :-)

Show quoted text 8 lines
> What can I do to prevent this and yet have both packages installed? There is already a bug report http://bugs.freepascal.org/view.php?id=29198 I'm not yet sure where the real bug is.

Ahah. Anything we can do to help ?

Michael.

Flávio Etrusco
to Mattias Gaertner: On Thu, 17 Dec 2015 21:42:28 +0100 (CET) It means there is an inconsistency. This should…
Mattias Gaertner wrote 15 lines
On Thu, 17 Dec 2015 21:42:28 +0100 (CET) Michael Van Canneyt wrote: >[...] > I tried to install the lazprojectgroups package. >[...] > if ContainerMenuIndex>ContainerMenuItem.Count then begin > debugln('TIDEMenuSection.UpdateMenuStructure CREATE BottomSeparator Name="',Name,'" ContainerMenuIndex=',dbgs(ContainerMenuIndex),' ContainerMenuItem.Count=',dbgs(ContainerMenuItem.Count > GetRoot.WriteDebugReport(' Bottom ',true); > end; > > Looks strange, since if that happens, there is sure to be a crash with the > insert, but no action other than a debug message is posted ? It means there is an inconsistency. This should never happen.

Just guessing, didn't read the actual code, but shouldn't it be "if ContainerMenuIndex>=ContainerMenuItem.Count then begin" anyway?

Show quoted text 8 lines
> What can I do to prevent this and yet have both packages installed? There is already a bug report http://bugs.freepascal.org/view.php?id=29198 I'm not yet sure where the real bug is. Mattias

I'm also missing some command to view the current Project Group... and 'Save Project Group' doesn't handle nil.
Just in case somebody decide to dive in the code before I do ;-)

Best regards,
Fl?vio

Mattias Gaertner
to Flávio Etrusco
[...] I'm also missing some command to view the current Project Group...

It's the same as for any IDE window:

Windows -> Project Group <Name>

and 'Save Project Group' doesn't handle nil.

Fixed.

Mattias

Flávio Etrusco
to Mattias Gaertner
Mattias Gaertner wrote 9 lines
On Fri, 18 Dec 2015 14:49:30 -0300 Fl?vio Etrusco wrote: >[...] > I'm also missing some command to view the current Project Group... It's the same as for any IDE window: Windows -> Project Group <Name>

But if you close the window there's no way to open back other than using Open Project Group or Open Recent... TBH I hadn't notice the Open Recent Project Group menu until now; it's enough for me.

Regards,
Fl?vio