View Issue Details

IDProjectCategoryView StatusLast Update
0030688LazarusLCLpublic2016-10-12 01:34
ReporterJohn McClaneAssigned ToBart Broersma 
Status closedResolutionfixed 
PlatformOSLinux PeppermintOS Version6
Product VersionProduct Build 
Target Version1.6.2Fixed in Version1.6.2 
Summary0030688: TNotebook can't delete page
DescriptionWhen I try to delete a page with notebook1.items.delete(1) I get access violation. (I have two pages).
TagsNo tags attached.
Fixed in Revisionr53085
Attached Files


related to 0029976 resolvedMichl Unable to delete notebook pages other than the first one 


Bart Broersma

2016-10-04 10:51

developer   ~0094944

As always, please attach a sample project demonstrating the issue (sources only).


2016-10-05 10:46

developer   ~0094964

Last edited: 2016-10-05 10:48

View 2 revisions

John, do you really think that somebody will seriously consider this to be a Lazarus issue if you demonstrate the problem with the attached enchat.unix project containing 75 files? And you don't even give instructions on how to get to the buggy situation.

If you really want somebody to take his time to fix this issue you should at least take your time to write a minimalized project containing only what's needed to reproduce the error.

John McClane

2016-10-06 14:29

reporter   ~0094987

Last edited: 2016-10-06 14:46

View 3 revisions

My apologies wp. I've attached a small project.
When you click the delete button, it should change the tnotebook index page to 0 and delete the page 1.
I hope this helps.
I'm sorry I can't remove

John McClane

2016-10-06 14:39

reporter (130,314 bytes)

Juha Manninen

2016-10-06 17:56

developer   ~0094991

> I'm sorry I can't remove


Bart Broersma

2016-10-06 18:38

developer   ~0094993

You may try Application.RemoveComponent() as a workaround?

John McClane

2016-10-07 00:11

reporter   ~0094998

Actually I tried Notebook1.removecontrol([1]) but I don't know exactly what it is for.
It worked, but I can't create the dynamically later.
I just tried Application.RemoveComponent() as you wrote but I got access violation too.

Thanks Bart.


2016-10-07 00:46

developer   ~0095000

The issue is that Notebook.Pages.Delete(0) tries to set the parent of the page to be deleted to nil which in turn calls Notebook.Pages.Delete(0) again. This happens when deleting any page (at least on Windows).

Bart Broersma

2016-10-09 16:27

developer   ~0095056

Also it does not delete the page from fPageList.

Bart Broersma

2016-10-09 16:29

developer   ~0095057

Please test and close if OK.

John McClane

2016-10-11 05:40

reporter   ~0095111

I'm sorry I didn't understand, what is the solution?

Bart Broersma

2016-10-11 23:47

developer   ~0095118

The fix is applied in Lazarus trunk r53085, so in order to test you need to use trunk >= r53085.
The fix will be merged into 1.6 branch, so it will be in the upcoming 1.6.2 release.
(Fixes cannot be applied to released versions)

See for the changes that I made to fix this.
You can easiliy apply these changes to your local copy of Lazarus and then rebuild Lazarus.

Notice that when an issue has he status resolved, it does not make much sense to add notes.
Chances are they will not be read by the developer.

If you think an issue you reported is not fixed, even though it is marked as resolved, then re-open the issue. This won't get unnoticed.

In all other cases you can ask on mailinglist (preferrably) or the forum.

Please close this issue.

Issue History

Date Modified Username Field Change
2016-10-03 23:06 John McClane New Issue
2016-10-04 10:51 Bart Broersma LazTarget => -
2016-10-04 10:51 Bart Broersma Note Added: 0094944
2016-10-04 10:51 Bart Broersma Status new => feedback
2016-10-05 10:38 John McClane File Added:
2016-10-05 10:46 wp Note Added: 0094964
2016-10-05 10:48 wp Note Edited: 0094964 View Revisions
2016-10-06 14:29 John McClane Note Added: 0094987
2016-10-06 14:29 John McClane Status feedback => new
2016-10-06 14:39 John McClane File Added:
2016-10-06 14:46 John McClane Note Edited: 0094987 View Revisions
2016-10-06 14:46 John McClane Note Edited: 0094987 View Revisions
2016-10-06 17:56 Juha Manninen File Deleted:
2016-10-06 17:56 Juha Manninen Note Added: 0094991
2016-10-06 18:38 Bart Broersma Note Added: 0094993
2016-10-07 00:11 John McClane Note Added: 0094998
2016-10-07 00:46 wp Note Added: 0095000
2016-10-08 09:55 Juha Manninen Relationship added related to 0029976
2016-10-09 16:27 Bart Broersma Note Added: 0095056
2016-10-09 16:29 Bart Broersma Fixed in Revision => r53085
2016-10-09 16:29 Bart Broersma LazTarget - => 1.6.2
2016-10-09 16:29 Bart Broersma Note Added: 0095057
2016-10-09 16:29 Bart Broersma Status new => resolved
2016-10-09 16:29 Bart Broersma Fixed in Version => 1.6.2
2016-10-09 16:29 Bart Broersma Resolution open => fixed
2016-10-09 16:29 Bart Broersma Assigned To => Bart Broersma
2016-10-09 16:29 Bart Broersma Target Version => 1.6.2
2016-10-11 05:40 John McClane Note Added: 0095111
2016-10-11 23:47 Bart Broersma Note Added: 0095118
2016-10-12 01:34 John McClane Status resolved => closed