[lazarus] Progressbar example for win32 crashes

Micha Nelissen mdvpost at hotmail.com
Mon Jun 23 11:12:32 EDT 2003


Hi,

When running the progressbar example it shows the main form, then after a
while a second form (larger than screen it seems) with two buttons, one with
a green icon and the other with a red icon, however without text. It then
segfaults. It seems the timer does not work properly, but I can't track the
source of the problem real well. If I try to trace it in gdb, then it loses
control when calling DoOnTimer in line 154 of customtimer.pas Can somebody
give me some debugging hints?

---GDB Output:---
GNU gdb 5.2.1
Copyright 2002 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain
conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "i686-pc-mingw32".
(gdb) file progressbar.exe
Reading symbols from progressbar.exe...done.
(gdb) run
Starting program: D:\Projects\freepascal\lazarus\examples/progressbar.exe

Program received signal SIGSEGV, Segmentation fault.
$00494169 in SYSWIN32 ()
(gdb) bt
#0  $00494169 in SYSWIN32 ()
#1  $0041d9b6 in TRACEASSERTHANDLER (
<a load of junk>, LINENO=0, THEADDR=40500924) at utrace.pp:63
#2  $0045616f in TIMERWINDOWPROC (WINDOW_HWND=12255580, MSG=275,
    WPARAM=5074880, LPARAM=0) at win32callback.inc:521
#3  $77e3a244 in _size_of_stack_reserve__ ()
#4  $77e145e5 in _size_of_stack_reserve__ ()
#5  $77e15b51 in _size_of_stack_reserve__ ()
#6  $00418733 in TAPPLICATION__HANDLEMESSAGE (this=$4d70e0)
    at application.inc:689
#7  $004189c8 in TAPPLICATION__RUN (this=$4d70e0) at application.inc:798
#8  $0049c2a2 in main () at progressbar.pp:278
(gdb)

---Trace output----

 [TCustomForm.LMPaint] TFORM1
> [TWinControl.WMPaint] TFORM1 Msg.DC: 0x680108C6
> [TWinControl.PaintHandler] TFORM1 --> Msg.DC: 0x680108C6
> [TWin32Object.MoveToEx] DC:0x680108C6, X:0, Y:0
< [TWin32Object.MoveToEx] DC:0x680108C6, X:0, Y:0
< [TWinControl.PaintHandler] TFORM1
< [TWinControl.WMPaint] TFORM1
WindowProc - Exit
WindowProc - Start
WindowProc - Getting Object With Callback Procedure
WindowProc - Getting Callback Object
WindowProc - Checking Proc
WindowProc - Window Value: $0180-10944896; Msg Value: WM_CTLCOLORBTN;
WParam: $0
9BF; LParam: $0164
WindowProc - Exit
WindowProc - Start
WindowProc - Getting Object With Callback Procedure
WindowProc - Getting Callback Object
WindowProc - Checking Proc
WindowProc - Window Value: $0180-10944896; Msg Value: WM_CTLCOLORBTN;
WParam: $0
9BF; LParam: $0166
WindowProc - Exit
WindowProc - Start
WindowProc - Getting Object With Callback Procedure
WindowProc - Getting Callback Object
WindowProc - Checking Proc
WindowProc - Window Value: $0180-10944896; Msg Value: WM_CTLCOLORBTN;
WParam: $0
9BF; LParam: $016A
WindowProc - Exit
WindowProc - Start
WindowProc - Getting Object With Callback Procedure
WindowProc - Getting Callback Object
WindowProc - Checking Proc
WindowProc - Window Value: $0180-10944896; Msg Value: WM_CTLCOLORBTN;
WParam: $0
9BF; LParam: $0182
WindowProc - Exit
WindowProc - Start
WindowProc - Getting Object With Callback Procedure
WindowProc - Getting Callback Object
WindowProc - Checking Proc
WindowProc - Window Value: $0180-10944896; Msg Value: WM_CTLCOLORBTN;
WParam: $0
9BF; LParam: $01D8
WindowProc - Exit
WindowProc - Start
WindowProc - Getting Object With Callback Procedure
WindowProc - Getting Callback Object
WindowProc - Checking Proc
WindowProc - Window Value: $0180-10944896; Msg Value: WM_CTLCOLORBTN;
WParam: $0
9BF; LParam: $0262
WindowProc - Exit
WindowProc - Start
WindowProc - Getting Object With Callback Procedure
WindowProc - Getting Callback Object
WindowProc - Checking Proc
WindowProc - Window Value: $0180-10944896; Msg Value: WM_CTLCOLORBTN;
WParam: $0
9BF; LParam: $0290
WindowProc - Exit
IntSendMessage3 - Start, Received (LM_SETVALUE)
IntSendMessage3 - Value of Sender = $004D8D00
[TWin32Object.SetValue] TPROGRESSBAR
TWin32Object.WaitMessage - Start
Leave wait message

-------------

Regards,

Micha.






More information about the Lazarus mailing list