View Issue Details

IDProjectCategoryView StatusLast Update
0018503Lazarus CCR-public2011-01-17 21:42
ReporterJuha Manninen Assigned To 
PrioritynormalSeverityminorReproducibilityalways
Status feedbackResolutionopen 
Summary0018503: TRichMemo crashes when TControl.EnableAutoSizing is called, on Linux
DescriptionCreating TRichMemo works ok:
 rm:=TRichMemo.Create(Nil);

Then setting Parent throws a SIGSEGV (Self = TForm):
 rm.Parent:=Self;

The crash happens in the end of :
procedure TControl.SetParent(NewParent: TWinControl);

at line:
EnableAutoSizing{$IFDEF DebugDisableAutoSizing}('TControl.SetParent'){$ENDIF};
TagsNo tags attached.
WidgetsetGTK 2, QT
Attached Files

Activities

Juha Manninen

2011-01-14 18:50

developer   ~0045183

Tested with GTK2 and QT bindings, Fedora 14 64-bit Linux.

Dmitry Boyarintsev

2011-01-14 20:34

developer   ~0045188

What about TMemo? Is it working fine?

Juha Manninen

2011-01-15 01:36

developer   ~0045194

TMemo works fine.

The crash happened with TRichMemo version 1.0 which I downloaded as a zip package.
Now I have loaded the SVN version and can't compile it at all.
It "Can't find unit GtkDef used by Gtk2RichMemo".
I tried adding some search paths but it didn't help. I am not very experienced with packages. What to do next?

Juha

Juha Manninen

2011-01-15 10:33

developer   ~0045198

Ok, more testing revealed that it actually works when everything is built with QT bindings (Lazarus, the package and test prog).
It behaves like TMemo so far in my test.
I still don't know how to make it compile with GTK2. I guess I could learn things by studying this component. It tries to uses the native widget for GTK2.
I think there is a similar native component in QT as well.

Phil

2011-01-17 18:56

reporter   ~0045264

GtkDef, etc. are the GTK1 file names. Maybe try with GTK2 file names? Gtk2Def, etc.

Phil

2011-01-17 21:42

reporter   ~0045269

Misc. comments:

- With Qt, it should work only as a TMemo since no Qt-specific support is included; TMemo is the fallback.

- Please remove reference to non-existent C:/wnlibsvn/CarbonPaste.pas from project1.lpi. It prevents Lazarus from loading the project.

- Fixes to rtfpars.pp don't seem to have been incorporated into FPC 2.5.1 yet. Shouldn't they be submitted as a patch?

- This control works great on Windows by using the more advanced msftedit.dll rather than RICHED20.DLL. But on Carbon it doesn't seem to support centered text, hanging indents, links, and always scrolls to bottom of loaded file. Maybe these are limitations of the underlying Carbon control?

- Is there a way to add support for printing to the control?

Issue History

Date Modified Username Field Change
2011-01-14 18:37 Juha Manninen New Issue
2011-01-14 18:37 Juha Manninen Widgetset => GTK 2, QT
2011-01-14 18:50 Juha Manninen Note Added: 0045183
2011-01-14 20:34 Dmitry Boyarintsev Note Added: 0045188
2011-01-14 20:34 Dmitry Boyarintsev Status new => feedback
2011-01-15 01:36 Juha Manninen Note Added: 0045194
2011-01-15 10:33 Juha Manninen Note Added: 0045198
2011-01-17 18:56 Phil Note Added: 0045264
2011-01-17 21:42 Phil Note Added: 0045269