[lazarus] Some patches against access violation errors

Vincent Snijders vrs at dds.nl
Tue May 23 18:47:39 EDT 2000


Hi,

I have been taking a look at the access violation errors when the program
terminates. I think they are caused by the fact the the global variable
Mouse is freeed twice, once in the Tapplication.terminate and once in the
finalization of the controls unit.
I suggest removing the ones in the finalization part.

Also I removed some {$ifdefs linux} from the gtkobject unit which only
seemed to be there because the win32-dll's didn't support them at the time,
they do now. Pacthes are in the file patches.diff.txt.

So included the patches for gtk packages in the file gtkpatches.diff.txt.

Both patch files are created with cvs diff commands.

I hope this format is readable for you. Please, look at them and apply them.

Regards,
Vincent Snijders.




Index: lcl/controls.pp
===================================================================
RCS file: /FPC/CVS/fpc/lazarus/lcl/controls.pp,v
retrieving revision 1.87
diff -r1.87 controls.pp
1094d1093
<   Mouse := TMouse.create;
1097,1098d1095
< Finalization
<   Mouse.Free;
Index: lcl/include/form.inc
===================================================================
RCS file: /FPC/CVS/fpc/lazarus/lcl/include/form.inc,v
retrieving revision 1.1
diff -r1.1 form.inc
6c6
< Assert(False, 'Trace:Destroying signals for TForm');
---
>   Assert(False, 'Trace:Destroying signals for TForm');
Index: lcl/interfaces/gtk/gtkobject.inc
===================================================================
RCS file: /FPC/CVS/fpc/lazarus/lcl/interfaces/gtk/gtkobject.inc,v
retrieving revision 1.9
diff -r1.9 gtkobject.inc
408,411c408,409
<          {$ifdef LINUX}
<             gtk_file_selection_complete(PGtkFileSelection((Sender as TCustomDialog).Handle), pstr);
<          {$endif} 
<          StrDispose(pStr); 
---
>          gtk_file_selection_complete(PGtkFileSelection((Sender as TCustomDialog).Handle), pstr);
>          StrDispose(pStr);
1559,1561c1557,1558
<    {$ifdef LINUX}
<       gtk_signal_handlers_destroy(gObject);
<    {$endif}
---
>   gtk_signal_handlers_destroy(gObject);
> 


Index: gtk/gtk/gtkfilesel.pp
===================================================================
RCS file: /FPC/CVS/fpc/packages/gtk/gtk/gtkfilesel.pp,v
retrieving revision 1.1
diff -r1.1 gtkfilesel.pp
54d53
< {$ifndef gtkwin}
56d54
< {$endif}
Index: gtk/gtk/gtksignal.pp
===================================================================
RCS file: /FPC/CVS/fpc/packages/gtk/gtk/gtksignal.pp,v
retrieving revision 1.1
diff -r1.1 gtksignal.pp
73d72
< {$ifndef gtkwin}
76d74
< {$endif}





More information about the Lazarus mailing list