[Lazarus] Extensive Debug Info from GTK2 bindings

classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

[Lazarus] Extensive Debug Info from GTK2 bindings

Juha Manninen
Hi

I start Lazarus devel version always from cmd line on Linux.
When using GTK2 bindings, there is a huge amount of debug lines scrolling in
the console window all the time.
How to shut them down?

Juha

--
_______________________________________________
Lazarus mailing list
[hidden email]
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Reply | Threaded
Open this post in threaded view
|

Re: [Lazarus] Extensive Debug Info from GTK2 bindings

Mattias Gaertner
On Mon, 21 Feb 2011 11:39:33 +0200
Juha Manninen <[hidden email]> wrote:

> Hi
>
> I start Lazarus devel version always from cmd line on Linux.
> When using GTK2 bindings, there is a huge amount of debug lines scrolling in
> the console window all the time.
> How to shut them down?

Tell the developer who has added them to comment or enclose
them in IFDEFs.


Mattias

--
_______________________________________________
Lazarus mailing list
[hidden email]
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Reply | Threaded
Open this post in threaded view
|

Re: [Lazarus] Extensive Debug Info from GTK2 bindings

zeljko
In reply to this post by Juha Manninen
On Monday 21 of February 2011 10:39:33 Juha Manninen wrote:
> Hi
>
> I start Lazarus devel version always from cmd line on Linux.
> When using GTK2 bindings, there is a huge amount of debug lines scrolling
> in the console window all the time.
> How to shut them down?

Disable -dDebug ? Are they from lcl or from gtk2 libs ?

z.

>
> Juha
>
> --
> _______________________________________________
> Lazarus mailing list
> [hidden email]
> http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

--
_______________________________________________
Lazarus mailing list
[hidden email]
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Reply | Threaded
Open this post in threaded view
|

Re: [Lazarus] Extensive Debug Info from GTK2 bindings

Juha Manninen
zeljko kirjoitti maanantai 21 helmikuu 2011 10:14:40:
> On Monday 21 of February 2011 10:39:33 Juha Manninen wrote:
> > I start Lazarus devel version always from cmd line on Linux.
> > When using GTK2 bindings, there is a huge amount of debug lines scrolling
> > in the console window all the time.
> > How to shut them down?
>
> Disable -dDebug ? Are they from lcl or from gtk2 libs ?

I don't have "Debug" defined.
I am not sure where all those messages come from. Here is an example:

---

< [TGtk2WidgetSet.SetTextColor] DC: 0x6D9E2470 Color:        0 --> 80000008
> [TGtk2WidgetSet.SetBKColor] DC: 0x6D9E2470 Color:   FFFFFF
< [TGtk2WidgetSet.SetBKColor] DC: 0x6D9E2470 Color:   FFFFFF -->   808080
> [TGtk2WidgetSet.SetBKColor] DC: 0x6D9E2470 Color:   FFFFFF
< [TGtk2WidgetSet.SetBKColor] DC: 0x6D9E2470 Color:   FFFFFF -->   FFFFFF
> [TGtk2WidgetSet.ExtTextOut] DC:0x7FD56D9E2470, X:0, Y:0, Options:2, Str:'', Count: 0
< [TGtk2WidgetSet.ExtTextOut] DC:0x7FD56D9E2470, X:0, Y:0, Options:2, Str:'', Count: 0
> [TGtk2WidgetSet.NewGDIObject]
< [TGtk2WidgetSet.NewGDIObject] FGDIObjects --> 0x00007FD56C741EC0
> [TGtk2WidgetSet.MoveToEx] DC:0x7FD56D9E2470, X:191, Y:14
< [TGtk2WidgetSet.MoveToEx] DC:0x7FD56D9E2470, X:191, Y:14
> [TGtk2WidgetSet.LineTo] DC:0x7FD56D9E2470, X:68, Y:14
< [TGtk2WidgetSet.LineTo] DC:0x7FD56D9E2470, X:68, Y:14
> [TGtk2WidgetSet.ExtTextOut] DC:0x7FD56D9E2470, X:0, Y:0, Options:2, Str:'', Count: 0
< [TGtk2WidgetSet.ExtTextOut] DC:0x7FD56D9E2470, X:0, Y:0, Options:2, Str:'', Count: 0
  [TGtk2WidgetSet.SelectObject] DC: 0x7FD56D9E2470, Type: Font
> [TGtk2WidgetSet.RestoreDC] DC:0x7FD56D9E2470, SavedDC: 1
> [TGtk2WidgetSet.ReleaseDC] DC:0x7FD56C9E85F0
< [TGtk2WidgetSet.ReleaseDC] FDeviceContexts DC:0x7FD56C9E85F0
< [TGtk2WidgetSet.RestoreDC] DC:0x6D9E2470, Saved: 0 --> True
> [TGtkWidgetSet.ShowCaret] HWND: 0x3C01900
< [TGtk2WidgetSet.ShowCaret] HWND: 0x3C01900 --> True
  [TGtk2WidgetSet.SelectObject] DC: 0x7FD56D9E2470, Type: Brush
  [TGtk2WidgetSet.SelectObject] DC: 0x7FD56D9E2470, Type: Font
< [TWinControl.PaintHandler] TIDESynEditor
< [TWinControl.WMPaint] TIDESynEditor
> [TGtk2WidgetSet.ReleaseDC] DC:0x7FD56D9E2470
< [TGtk2WidgetSet.ReleaseDC] FDeviceContexts DC:0x7FD56D9E2470
  [GTKObject.ClientToScreen] Handle: 0x3C01900 --> (378, 129)
removing timer!!!
removing timer!!!
  [GTKObject.ClientToScreen] Handle: 0x3C01900 --> (378, 129)
  [GTKObject.ClientToScreen] Handle: 0x3C01900 --> (378, 129)
removing timer!!!
  [GTKObject.ClientToScreen] Handle: 0x3C01900 --> (378, 129)
  [GTKObject.ClientToScreen] Handle: 0x3C01900 --> (378, 129)
removing timer!!!
  [GTKObject.ClientToScreen] Handle: 0x3C01900 --> (378, 129)
  [GTKObject.ClientToScreen] Handle: 0x3C01900 --> (378, 129)
removing timer!!!
removing timer!!!
  [GTKObject.ClientToScreen] Handle: 0x3C01900 --> (378, 129)
  [GTKObject.ClientToScreen] Handle: 0x3BDA9F0 --> (376, 127)
  [GTKObject.ClientToScreen] Handle: 0x3BDA9F0 --> (376, 127)
  [GTKObject.ClientToScreen] Handle: 0x3C01900 --> (378, 129)
Event [TimerCB] fired
removing timer!!!
TODO: [gtkkillfocusCB] TIDESynEditor  finish
[TWinControl.WndPRoc] TIDESynEditor --> _KILLFOCUS
 TIDESynEditor
  [TGtk2WidgetSet.HideCaret] HWND: 0x3C01900
 TIDESynEditor
TODO: [gtkkillfocusCB] TSourceNotebook  finish
[TWinControl.WndPRoc] TSourceNotebook --> _KILLFOCUS
 TSourceNotebook
> [TGtk2WidgetSet.NewDC]
> [TWinControl.WMPaint] TIDESynEditor Msg.DC: 0x7FD56D9E2470
> [TWinControl.PaintHandler] TIDESynEditor --> Msg.DC: 0x7FD56D9E2470
  [TGtk2WidgetSet.SelectObject] DC: 0x7FD56D9E2470, Type: Font
> [TGtk2WidgetSet.NewGDIObject]
< [TGtk2WidgetSet.NewGDIObject] FGDIObjects --> 0x00007FD56C7467C0
> [TGtk2WidgetSet.SetTextColor] DC: 0x6D9E2470 Color: 80000008
< [TGtk2WidgetSet.SetTextColor] DC: 0x6D9E2470 Color: 80000008 -->        0
> [TGtk2WidgetSet.NewGDIObject]
< [TGtk2WidgetSet.NewGDIObject] FGDIObjects --> 0x00007FD56C7421C0
> [TGtk2WidgetSet.MoveToEx] DC:0x7FD56D9E2470, X:67, Y:727
< [TGtk2WidgetSet.MoveToEx] DC:0x7FD56D9E2470, X:67, Y:727
  [TGtk2WidgetSet.SelectObject] DC: 0x7FD56D9E2470, Type: Brush
> [TGtk2WidgetSet.NewGDIObject]
< [TGtk2WidgetSet.NewGDIObject] FGDIObjects --> 0x00007FD56C7468C0
> [TGtk2WidgetSet.SetBKColor] DC: 0x6D9E2470 Color:   808080
< [TGtk2WidgetSet.SetBKColor] DC: 0x6D9E2470 Color:   808080 -->   FFFFFF
> [TGtk2WidgetSet.SaveDC]  0x6D9E2470
> [TGtk2WidgetSet.NewDC]
< [TGtk2WidgetSet.SaveDC]  0x6D9E2470 --> 1
  [TGtk2WidgetSet.SelectObject] DC: 0x7FD56D9E2470, Type: Font
> [TGtk2WidgetSet.SetTextColor] DC: 0x6D9E2470 Color:        0
< [TGtk2WidgetSet.SetTextColor] DC: 0x6D9E2470 Color:        0 --> 80000008
> [TGtk2WidgetSet.SetBKColor] DC: 0x6D9E2470 Color:   FFFFFF
< [TGtk2WidgetSet.SetBKColor] DC: 0x6D9E2470 Color:   FFFFFF -->   808080
> [TGtk2WidgetSet.SetBKColor] DC: 0x6D9E2470 Color:   FFFFFF
< [TGtk2WidgetSet.SetBKColor] DC: 0x6D9E2470 Color:   FFFFFF -->   FFFFFF
> [TGtk2WidgetSet.ExtTextOut] DC:0x7FD56D9E2470, X:0, Y:0, Options:2, Str:'', Count: 0
< [TGtk2WidgetSet.ExtTextOut] DC:0x7FD56D9E2470, X:0, Y:0, Options:2, Str:'', Count: 0
> [TGtk2WidgetSet.NewGDIObject]
< [TGtk2WidgetSet.NewGDIObject] FGDIObjects --> 0x00007FD56C741EC0
> [TGtk2WidgetSet.MoveToEx] DC:0x7FD56D9E2470, X:191, Y:14
< [TGtk2WidgetSet.MoveToEx] DC:0x7FD56D9E2470, X:191, Y:14
> [TGtk2WidgetSet.LineTo] DC:0x7FD56D9E2470, X:68, Y:14
< [TGtk2WidgetSet.LineTo] DC:0x7FD56D9E2470, X:68, Y:14
> [TGtk2WidgetSet.ExtTextOut] DC:0x7FD56D9E2470, X:0, Y:0, Options:2, Str:'', Count: 0
< [TGtk2WidgetSet.ExtTextOut] DC:0x7FD56D9E2470, X:0, Y:0, Options:2, Str:'', Count: 0
  [TGtk2WidgetSet.SelectObject] DC: 0x7FD56D9E2470, Type: Font
> [TGtk2WidgetSet.RestoreDC] DC:0x7FD56D9E2470, SavedDC: 1
> [TGtk2WidgetSet.ReleaseDC] DC:0x7FD56C9E85F0
< [TGtk2WidgetSet.ReleaseDC] FDeviceContexts DC:0x7FD56C9E85F0
< [TGtk2WidgetSet.RestoreDC] DC:0x6D9E2470, Saved: 0 --> True
  [TGtk2WidgetSet.SelectObject] DC: 0x7FD56D9E2470, Type: Brush
  [TGtk2WidgetSet.SelectObject] DC: 0x7FD56D9E2470, Type: Font
< [TWinControl.PaintHandler] TIDESynEditor
< [TWinControl.WMPaint] TIDESynEditor
> [TGtk2WidgetSet.ReleaseDC] DC:0x7FD56D9E2470
< [TGtk2WidgetSet.ReleaseDC] FDeviceContexts DC:0x7FD56D9E2470
Event [TimerCB] fired
removing timer!!!

--
_______________________________________________
Lazarus mailing list
[hidden email]
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Reply | Threaded
Open this post in threaded view
|

Re: [Lazarus] Extensive Debug Info from GTK2 bindings

Juha Manninen
In reply to this post by zeljko
zeljko kirjoitti maanantai 21 helmikuu 2011 10:14:40:
> Disable -dDebug ? Are they from lcl or from gtk2 libs ?

Problem solved. I had assertion enabled (-Sa) and forgot it.

IMO the assertions should be made usable in Lazarus code base.
They are useful and serve a different purpose than exceptions.
Currently they can't be used with QT bindings at all,
and GTK2 version outputs too much debug info.

Juha

--
_______________________________________________
Lazarus mailing list
[hidden email]
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Reply | Threaded
Open this post in threaded view
|

Re: [Lazarus] Extensive Debug Info from GTK2 bindings

zeljko
On Monday 21 of February 2011 18:10:39 Juha Manninen wrote:
> zeljko kirjoitti maanantai 21 helmikuu 2011 10:14:40:
> > Disable -dDebug ? Are they from lcl or from gtk2 libs ?
>
> Problem solved. I had assertion enabled (-Sa) and forgot it.
>
> IMO the assertions should be made usable in Lazarus code base.
> They are useful and serve a different purpose than exceptions.
> Currently they can't be used with QT bindings at all,

Because they're not implemented in Qt bindings.

zeljko


--
_______________________________________________
Lazarus mailing list
[hidden email]
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Reply | Threaded
Open this post in threaded view
|

Re: [Lazarus] Extensive Debug Info from GTK2 bindings

Juha Manninen
2011/2/21 zeljko <[hidden email]>
> IMO the assertions should be made usable in Lazarus code base.
> They are useful and serve a different purpose than exceptions.
> Currently they can't be used with QT bindings at all,

Because they're not implemented in Qt bindings.

That is ok but I was referring to the topic in QT mailing list:
  "Assertion failure in Search dialog"
It means I can't use assertions even in my own code because enabling them breaks the search dialog.

The GTK2 bindings code misuses assertions badly. DebugLn should be used instead there, leaving "Assert" for real assertions.
Replace All: "Assert(false," -> "// DebugLn(" could help.
They can be safely commented out because nobody has enabled the assertions either.

Juha


--
_______________________________________________
Lazarus mailing list
[hidden email]
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Reply | Threaded
Open this post in threaded view
|

Re: [Lazarus] Extensive Debug Info from GTK2 bindings

Hans-Peter Diettrich
In reply to this post by Juha Manninen
Juha Manninen schrieb:

> I start Lazarus devel version always from cmd line on Linux.
> When using GTK2 bindings, there is a huge amount of debug lines scrolling in
> the console window all the time.
> How to shut them down?

I use to $ifdef unwanted DebugLn statements, or simply comment them out.
In most cases it's impossible to find out, who added such statements for
what purpose :-(

DoDi


--
_______________________________________________
Lazarus mailing list
[hidden email]
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus