Sign in Join

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

Mailing lists / lazarus / 2013-02

Synedit free makes an access violation exception

9 messages · 2 people ·

Reply by email Subscribe to this list Your subscription

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

ik
to Martin
Martin wrote 14 lines
On 01/02/2013 17:47, ik wrote: > > Helllo, > > When trying to do SynEdit.free (and FreeAndNil), I have an access > violation exception. > I cant figure out why. > My code: > > https://github.com/ik5/split_lazarus/blob/master/src/untlazsplitview_code.pas#L174 > > Lazarus 1.1 r40111M FPC 2.6.0 x86_64-linux-gtk 2 > Stacktrace?

TApplication.HandleException Access violation
Stack trace:
$00000000009ECE9F
$0000000001523FC8 line 1092 of syneditmiscclasses.pp $000000000156808E line 762 of syngutterbase.pp
$00000000009ECEA2
$0000000001563812 line 181 of syngutter.pp
$00000000009ECEA2
$00000000009ECEA2
$0000000001BA0CAC line 228 of ../src/untlazsplitview_code.pas $0000000001BA07DF line 257 of ../src/untlazsplitview_code.pas $0000000001B9FB72 line 91 of ../src/untlazsplitview_code.pas $0000000000FD835B line 581 of menuintf.pas
$0000000000FDEA94 line 1655 of menuintf.pas
$0000000000CD0400 line 83 of include/menuitem.inc
$0000000000CD0F7E line 278 of include/menuitem.inc $00000000009ED3C9
$0000000000D78FDA line 3591 of gtk2/gtk2proc.inc
$0000000000E812EF line 142 of gtk2/gtk2wsmenus.pp

Show quoted text 6 lines
-- _______________________________________________ Lazarus mailing list http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

Reply by email

Martin
to ik

Well do you add, remove, create any gutterparts?

ik wrote 44 lines
On Fri, Feb 1, 2013 at 8:13 PM, Martin wrote: > On 01/02/2013 17:47, ik wrote: >> Helllo, >> >> When trying to do SynEdit.free (and FreeAndNil), I have an access >> violation exception. >> I cant figure out why. >> My code: >> >> https://github.com/ik5/split_lazarus/blob/master/src/untlazsplitview_code.pas#L174 >> >> Lazarus 1.1 r40111M FPC 2.6.0 x86_64-linux-gtk 2 >> > Stacktrace? TApplication.HandleException Access violation Stack trace: $00000000009ECE9F $0000000001523FC8 line 1092 of syneditmiscclasses.pp $000000000156808E line 762 of syngutterbase.pp $00000000009ECEA2 $0000000001563812 line 181 of syngutter.pp $00000000009ECEA2 $00000000009ECEA2 $0000000001BA0CAC line 228 of ../src/untlazsplitview_code.pas $0000000001BA07DF line 257 of ../src/untlazsplitview_code.pas $0000000001B9FB72 line 91 of ../src/untlazsplitview_code.pas $0000000000FD835B line 581 of menuintf.pas $0000000000FDEA94 line 1655 of menuintf.pas $0000000000CD0400 line 83 of include/menuitem.inc $0000000000CD0F7E line 278 of include/menuitem.inc $00000000009ED3C9 $0000000000D78FDA line 3591 of gtk2/gtk2proc.inc $0000000000E812EF line 142 of gtk2/gtk2wsmenus.pp > -- > _______________________________________________ > Lazarus mailing list > > http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus -- _______________________________________________ Lazarus mailing list http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

Reply by email

ik
to Martin
Martin wrote
Well do you add, remove, create any gutterparts?

Assigned gutterparts, what is the proper action to free it ?

Show quoted text 61 lines
On 01/02/2013 20:08, ik wrote: > > On Fri, Feb 1, 2013 at 8:13 PM, Martin wrote: >> >> On 01/02/2013 17:47, ik wrote: >>> >>> Helllo, >>> >>> When trying to do SynEdit.free (and FreeAndNil), I have an access >>> violation exception. >>> I cant figure out why. >>> My code: >>> >>> >>> https://github.com/ik5/split_lazarus/blob/master/src/untlazsplitview_code.pas#L174 >>> >>> Lazarus 1.1 r40111M FPC 2.6.0 x86_64-linux-gtk 2 >>> >> Stacktrace? > > TApplication.HandleException Access violation > Stack trace: > $00000000009ECE9F > $0000000001523FC8 line 1092 of syneditmiscclasses.pp > $000000000156808E line 762 of syngutterbase.pp > $00000000009ECEA2 > $0000000001563812 line 181 of syngutter.pp > $00000000009ECEA2 > $00000000009ECEA2 > $0000000001BA0CAC line 228 of ../src/untlazsplitview_code.pas > $0000000001BA07DF line 257 of ../src/untlazsplitview_code.pas > $0000000001B9FB72 line 91 of ../src/untlazsplitview_code.pas > $0000000000FD835B line 581 of menuintf.pas > $0000000000FDEA94 line 1655 of menuintf.pas > $0000000000CD0400 line 83 of include/menuitem.inc > $0000000000CD0F7E line 278 of include/menuitem.inc > $00000000009ED3C9 > $0000000000D78FDA line 3591 of gtk2/gtk2proc.inc > $0000000000E812EF line 142 of gtk2/gtk2wsmenus.pp > >> -- >> _______________________________________________ >> Lazarus mailing list >> >> http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus > > -- > _______________________________________________ > Lazarus mailing list > > http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus -- _______________________________________________ Lazarus mailing list http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

Reply by email

Martin
to ik

I will have to debug that.

It may be that Cutter.Assign is not working.
It seems to only copy the pointers to the other edits gutter parts... And that is not right.
-----------------

in the IDE, you need to send each edit to EditorOptions (Refresh/REloud-EditorSetting. search SourceEditor

of course, that actually requires a TSynSourceEditor... which is impossible for packages, because it is in the ide....

ik wrote 63 lines
On Fri, Feb 1, 2013 at 10:12 PM, Martin wrote: > Well do you add, remove, create any gutterparts? Assigned gutterparts, what is the proper action to free it ? > > On 01/02/2013 20:08, ik wrote: >> On Fri, Feb 1, 2013 at 8:13 PM, Martin wrote: >>> On 01/02/2013 17:47, ik wrote: >>>> Helllo, >>>> >>>> When trying to do SynEdit.free (and FreeAndNil), I have an access >>>> violation exception. >>>> I cant figure out why. >>>> My code: >>>> >>>> >>>> https://github.com/ik5/split_lazarus/blob/master/src/untlazsplitview_code.pas#L174 >>>> >>>> Lazarus 1.1 r40111M FPC 2.6.0 x86_64-linux-gtk 2 >>>> >>> Stacktrace? >> TApplication.HandleException Access violation >> Stack trace: >> $00000000009ECE9F >> $0000000001523FC8 line 1092 of syneditmiscclasses.pp >> $000000000156808E line 762 of syngutterbase.pp >> $00000000009ECEA2 >> $0000000001563812 line 181 of syngutter.pp >> $00000000009ECEA2 >> $00000000009ECEA2 >> $0000000001BA0CAC line 228 of ../src/untlazsplitview_code.pas >> $0000000001BA07DF line 257 of ../src/untlazsplitview_code.pas >> $0000000001B9FB72 line 91 of ../src/untlazsplitview_code.pas >> $0000000000FD835B line 581 of menuintf.pas >> $0000000000FDEA94 line 1655 of menuintf.pas >> $0000000000CD0400 line 83 of include/menuitem.inc >> $0000000000CD0F7E line 278 of include/menuitem.inc >> $00000000009ED3C9 >> $0000000000D78FDA line 3591 of gtk2/gtk2proc.inc >> $0000000000E812EF line 142 of gtk2/gtk2wsmenus.pp >> >>> -- >>> _______________________________________________ >>> Lazarus mailing list >>> >>> http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus >> -- >> _______________________________________________ >> Lazarus mailing list >> >> http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus > > > -- > _______________________________________________ > Lazarus mailing list > > http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus -- _______________________________________________ Lazarus mailing list http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

Reply by email

Martin
to Martin
Martin wrote 6 lines
I will have to debug that. It may be that Cutter.Assign is not working. It seems to only copy the pointers to the other edits gutter parts... And that is not right.

If you whish to look (I dant know when I get to it). I THINK it may be this

procedure TSynObjectList.Assign(Source: TPersistent);
begin
   FList.Assign(TSynObjectList(Source).FList);
   DoChange(self);
end;

Flist is a tlist, so just pointer copy...

Show quoted text 82 lines
----------------- in the IDE, you need to send each edit to EditorOptions (Refresh/REloud-EditorSetting. search SourceEditor of course, that actually requires a TSynSourceEditor... which is impossible for packages, because it is in the ide.... On 01/02/2013 20:22, ik wrote: > On Fri, Feb 1, 2013 at 10:12 PM, Martin wrote: >> Well do you add, remove, create any gutterparts? > Assigned gutterparts, what is the proper action to free it ? > >> >> On 01/02/2013 20:08, ik wrote: >>> On Fri, Feb 1, 2013 at 8:13 PM, Martin wrote: >>>> On 01/02/2013 17:47, ik wrote: >>>>> Helllo, >>>>> >>>>> When trying to do SynEdit.free (and FreeAndNil), I have an access >>>>> violation exception. >>>>> I cant figure out why. >>>>> My code: >>>>> >>>>> >>>>> https://github.com/ik5/split_lazarus/blob/master/src/untlazsplitview_code.pas#L174 >>>>> >>>>> >>>>> Lazarus 1.1 r40111M FPC 2.6.0 x86_64-linux-gtk 2 >>>>> >>>> Stacktrace? >>> TApplication.HandleException Access violation >>> Stack trace: >>> $00000000009ECE9F >>> $0000000001523FC8 line 1092 of syneditmiscclasses.pp >>> $000000000156808E line 762 of syngutterbase.pp >>> $00000000009ECEA2 >>> $0000000001563812 line 181 of syngutter.pp >>> $00000000009ECEA2 >>> $00000000009ECEA2 >>> $0000000001BA0CAC line 228 of ../src/untlazsplitview_code.pas >>> $0000000001BA07DF line 257 of ../src/untlazsplitview_code.pas >>> $0000000001B9FB72 line 91 of ../src/untlazsplitview_code.pas >>> $0000000000FD835B line 581 of menuintf.pas >>> $0000000000FDEA94 line 1655 of menuintf.pas >>> $0000000000CD0400 line 83 of include/menuitem.inc >>> $0000000000CD0F7E line 278 of include/menuitem.inc >>> $00000000009ED3C9 >>> $0000000000D78FDA line 3591 of gtk2/gtk2proc.inc >>> $0000000000E812EF line 142 of gtk2/gtk2wsmenus.pp >>> >>>> -- >>>> _______________________________________________ >>>> Lazarus mailing list >>>> >>>> http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus >>> -- >>> _______________________________________________ >>> Lazarus mailing list >>> >>> http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus >> >> >> -- >> _______________________________________________ >> Lazarus mailing list >> >> http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus > -- > _______________________________________________ > Lazarus mailing list > > http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus -- _______________________________________________ Lazarus mailing list http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

Reply by email

ik
to Martin
Martin wrote 20 lines
On 01/02/2013 20:43, Martin wrote: > > > I will have to debug that. > > It may be that Cutter.Assign is not working. > It seems to only copy the pointers to the other edits gutter parts... And > that is not right. If you whish to look (I dant know when I get to it). I THINK it may be this procedure TSynObjectList.Assign(Source: TPersistent); begin FList.Assign(TSynObjectList(Source).FList); DoChange(self); end; Flist is a tlist, so just pointer copy...

Thanks

Show quoted text 104 lines
> ----------------- > > in the IDE, you need to send each edit to EditorOptions > (Refresh/REloud-EditorSetting. search SourceEditor > > of course, that actually requires a TSynSourceEditor... which is > impossible for packages, because it is in the ide.... > > > > On 01/02/2013 20:22, ik wrote: >> >> On Fri, Feb 1, 2013 at 10:12 PM, Martin wrote: >>> >>> Well do you add, remove, create any gutterparts? >> >> Assigned gutterparts, what is the proper action to free it ? >> >>> >>> On 01/02/2013 20:08, ik wrote: >>>> >>>> On Fri, Feb 1, 2013 at 8:13 PM, Martin wrote: >>>>> >>>>> On 01/02/2013 17:47, ik wrote: >>>>>> >>>>>> Helllo, >>>>>> >>>>>> When trying to do SynEdit.free (and FreeAndNil), I have an access >>>>>> violation exception. >>>>>> I cant figure out why. >>>>>> My code: >>>>>> >>>>>> >>>>>> >>>>>> https://github.com/ik5/split_lazarus/blob/master/src/untlazsplitview_code.pas#L174 >>>>>> >>>>>> Lazarus 1.1 r40111M FPC 2.6.0 x86_64-linux-gtk 2 >>>>>> >>>>> Stacktrace? >>>> >>>> TApplication.HandleException Access violation >>>> Stack trace: >>>> $00000000009ECE9F >>>> $0000000001523FC8 line 1092 of syneditmiscclasses.pp >>>> $000000000156808E line 762 of syngutterbase.pp >>>> $00000000009ECEA2 >>>> $0000000001563812 line 181 of syngutter.pp >>>> $00000000009ECEA2 >>>> $00000000009ECEA2 >>>> $0000000001BA0CAC line 228 of ../src/untlazsplitview_code.pas >>>> $0000000001BA07DF line 257 of ../src/untlazsplitview_code.pas >>>> $0000000001B9FB72 line 91 of ../src/untlazsplitview_code.pas >>>> $0000000000FD835B line 581 of menuintf.pas >>>> $0000000000FDEA94 line 1655 of menuintf.pas >>>> $0000000000CD0400 line 83 of include/menuitem.inc >>>> $0000000000CD0F7E line 278 of include/menuitem.inc >>>> $00000000009ED3C9 >>>> $0000000000D78FDA line 3591 of gtk2/gtk2proc.inc >>>> $0000000000E812EF line 142 of gtk2/gtk2wsmenus.pp >>>> >>>>> -- >>>>> _______________________________________________ >>>>> Lazarus mailing list >>>>> >>>>> http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus >>>> >>>> -- >>>> _______________________________________________ >>>> Lazarus mailing list >>>> >>>> http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus >>> >>> >>> >>> -- >>> _______________________________________________ >>> Lazarus mailing list >>> >>> http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus >> >> -- >> _______________________________________________ >> Lazarus mailing list >> >> http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus > > > > -- > _______________________________________________ > Lazarus mailing list > > http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus -- _______________________________________________ Lazarus mailing list http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

Reply by email

Martin
to ik
ik wrote 20 lines
On Fri, Feb 1, 2013 at 10:45 PM, Martin wrote: > On 01/02/2013 20:43, Martin wrote: >> >> I will have to debug that. >> >> It may be that Cutter.Assign is not working. >> It seems to only copy the pointers to the other edits gutter parts... And >> that is not right. > > > If you whish to look (I dant know when I get to it). I THINK it may be this > > procedure TSynObjectList.Assign(Source: TPersistent); > begin > FList.Assign(TSynObjectList(Source).FList); > DoChange(self); > end; > > Flist is a tlist, so just pointer copy... Thanks

But you will still have the problem, that your 2nd TSynEdit wil[l not behave in the IDE.

How will it be updated, if EditorOptions Change?

And if it is not a TSynSourceEditor then it will not have all of the features.
- SyncroEdit. Enabled in TSynSourceEditor. Of course you can enable by hand.
- TopHint with function name. implemented in TSynSourceEditor
- overviewgutter, partly implemented in TSynSourceEditor
- new (trunk) user-defined words markup, partly implemented in TSynSourceEditor

Show quoted text 13 lines
> > >> ----------------- >> >> in the IDE, you need to send each edit to EditorOptions >> (Refresh/REloud-EditorSetting. search SourceEditor >> >> of course, that actually requires a TSynSourceEditor... which is >> impossible for packages, because it is in the ide.... >> >> >>

Reply by email