[Lazarus] Synedit free makes an access violation exception

2013-02-01 Thread ik
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

Thanks,
Ido

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Synedit free makes an access violation exception

2013-02-01 Thread Martin

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?

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Synedit free makes an access violation exception

2013-02-01 Thread ik
On Fri, Feb 1, 2013 at 8:13 PM, Martin laza...@mfriebe.de 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:
  $009ECE9F
  $01523FC8 line 1092 of syneditmiscclasses.pp
  $0156808E line 762 of syngutterbase.pp
  $009ECEA2
  $01563812 line 181 of syngutter.pp
  $009ECEA2
  $009ECEA2
  $01BA0CAC line 228 of ../src/untlazsplitview_code.pas
  $01BA07DF line 257 of ../src/untlazsplitview_code.pas
  $01B9FB72 line 91 of ../src/untlazsplitview_code.pas
  $00FD835B line 581 of menuintf.pas
  $00FDEA94 line 1655 of menuintf.pas
  $00CD0400 line 83 of include/menuitem.inc
  $00CD0F7E line 278 of include/menuitem.inc
  $009ED3C9
  $00D78FDA line 3591 of gtk2/gtk2proc.inc
  $00E812EF line 142 of gtk2/gtk2wsmenus.pp


 --
 ___
 Lazarus mailing list
 Lazarus@lists.lazarus.freepascal.org
 http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Synedit free makes an access violation exception

2013-02-01 Thread Martin


Well do you add, remove, create any gutterparts?

On 01/02/2013 20:08, ik wrote:

On Fri, Feb 1, 2013 at 8:13 PM, Martin laza...@mfriebe.de 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:
   $009ECE9F
   $01523FC8 line 1092 of syneditmiscclasses.pp
   $0156808E line 762 of syngutterbase.pp
   $009ECEA2
   $01563812 line 181 of syngutter.pp
   $009ECEA2
   $009ECEA2
   $01BA0CAC line 228 of ../src/untlazsplitview_code.pas
   $01BA07DF line 257 of ../src/untlazsplitview_code.pas
   $01B9FB72 line 91 of ../src/untlazsplitview_code.pas
   $00FD835B line 581 of menuintf.pas
   $00FDEA94 line 1655 of menuintf.pas
   $00CD0400 line 83 of include/menuitem.inc
   $00CD0F7E line 278 of include/menuitem.inc
   $009ED3C9
   $00D78FDA line 3591 of gtk2/gtk2proc.inc
   $00E812EF line 142 of gtk2/gtk2wsmenus.pp


--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus



--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Synedit free makes an access violation exception

2013-02-01 Thread ik
On Fri, Feb 1, 2013 at 10:12 PM, Martin laza...@mfriebe.de 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 laza...@mfriebe.de 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:
$009ECE9F
$01523FC8 line 1092 of syneditmiscclasses.pp
$0156808E line 762 of syngutterbase.pp
$009ECEA2
$01563812 line 181 of syngutter.pp
$009ECEA2
$009ECEA2
$01BA0CAC line 228 of ../src/untlazsplitview_code.pas
$01BA07DF line 257 of ../src/untlazsplitview_code.pas
$01B9FB72 line 91 of ../src/untlazsplitview_code.pas
$00FD835B line 581 of menuintf.pas
$00FDEA94 line 1655 of menuintf.pas
$00CD0400 line 83 of include/menuitem.inc
$00CD0F7E line 278 of include/menuitem.inc
$009ED3C9
$00D78FDA line 3591 of gtk2/gtk2proc.inc
$00E812EF line 142 of gtk2/gtk2wsmenus.pp

 --
 ___
 Lazarus mailing list
 Lazarus@lists.lazarus.freepascal.org
 http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

 --
 ___
 Lazarus mailing list
 Lazarus@lists.lazarus.freepascal.org
 http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus



 --
 ___
 Lazarus mailing list
 Lazarus@lists.lazarus.freepascal.org
 http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Synedit free makes an access violation exception

2013-02-01 Thread Martin


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




On 01/02/2013 20:22, ik wrote:

On Fri, Feb 1, 2013 at 10:12 PM, Martin laza...@mfriebe.de 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 laza...@mfriebe.de 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:
$009ECE9F
$01523FC8 line 1092 of syneditmiscclasses.pp
$0156808E line 762 of syngutterbase.pp
$009ECEA2
$01563812 line 181 of syngutter.pp
$009ECEA2
$009ECEA2
$01BA0CAC line 228 of ../src/untlazsplitview_code.pas
$01BA07DF line 257 of ../src/untlazsplitview_code.pas
$01B9FB72 line 91 of ../src/untlazsplitview_code.pas
$00FD835B line 581 of menuintf.pas
$00FDEA94 line 1655 of menuintf.pas
$00CD0400 line 83 of include/menuitem.inc
$00CD0F7E line 278 of include/menuitem.inc
$009ED3C9
$00D78FDA line 3591 of gtk2/gtk2proc.inc
$00E812EF line 142 of gtk2/gtk2wsmenus.pp


--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus



--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus



--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Synedit free makes an access violation exception

2013-02-01 Thread Martin

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...



-

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 laza...@mfriebe.de 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 laza...@mfriebe.de 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:
$009ECE9F
$01523FC8 line 1092 of syneditmiscclasses.pp
$0156808E line 762 of syngutterbase.pp
$009ECEA2
$01563812 line 181 of syngutter.pp
$009ECEA2
$009ECEA2
$01BA0CAC line 228 of ../src/untlazsplitview_code.pas
$01BA07DF line 257 of ../src/untlazsplitview_code.pas
$01B9FB72 line 91 of ../src/untlazsplitview_code.pas
$00FD835B line 581 of menuintf.pas
$00FDEA94 line 1655 of menuintf.pas
$00CD0400 line 83 of include/menuitem.inc
$00CD0F7E line 278 of include/menuitem.inc
$009ED3C9
$00D78FDA line 3591 of gtk2/gtk2proc.inc
$00E812EF line 142 of gtk2/gtk2wsmenus.pp


--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus



--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus



--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus



--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Synedit free makes an access violation exception

2013-02-01 Thread ik
On Fri, Feb 1, 2013 at 10:45 PM, Martin laza...@mfriebe.de 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




 -

 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 laza...@mfriebe.de 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 laza...@mfriebe.de 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:
 $009ECE9F
 $01523FC8 line 1092 of syneditmiscclasses.pp
 $0156808E line 762 of syngutterbase.pp
 $009ECEA2
 $01563812 line 181 of syngutter.pp
 $009ECEA2
 $009ECEA2
 $01BA0CAC line 228 of ../src/untlazsplitview_code.pas
 $01BA07DF line 257 of ../src/untlazsplitview_code.pas
 $01B9FB72 line 91 of ../src/untlazsplitview_code.pas
 $00FD835B line 581 of menuintf.pas
 $00FDEA94 line 1655 of menuintf.pas
 $00CD0400 line 83 of include/menuitem.inc
 $00CD0F7E line 278 of include/menuitem.inc
 $009ED3C9
 $00D78FDA line 3591 of gtk2/gtk2proc.inc
 $00E812EF line 142 of gtk2/gtk2wsmenus.pp

 --
 ___
 Lazarus mailing list
 Lazarus@lists.lazarus.freepascal.org
 http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

 --
 ___
 Lazarus mailing list
 Lazarus@lists.lazarus.freepascal.org
 http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus



 --
 ___
 Lazarus mailing list
 Lazarus@lists.lazarus.freepascal.org
 http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

 --
 ___
 Lazarus mailing list
 Lazarus@lists.lazarus.freepascal.org
 http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus



 --
 ___
 Lazarus mailing list
 Lazarus@lists.lazarus.freepascal.org
 http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus



 --
 ___
 Lazarus mailing list
 Lazarus@lists.lazarus.freepascal.org
 http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Synedit free makes an access violation exception

2013-02-01 Thread Martin

On 01/02/2013 20:48, ik wrote:

On Fri, Feb 1, 2013 at 10:45 PM, Martin laza...@mfriebe.de 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








-

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






--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus