Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2003-08

Lazarus crash on Win32

8 messages · 3 people ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Horacio Jamilis
to Horacio Jamilis: � I downloaded today snapshot and compiled ok on win32. As always until today, I can't…

If you tell me how I will do it.

I am trying.

I compiled with fpc 1.0.10

I hope the next is the stack back trace: (bt)

#0 $006ccc43 in PCHAR_TO_ANSISTR (A=$0, P=$a918) at astrings.inc:266 #1 $0068d3bd in PROPENUMPROC (WINDOW=656794, STR=$a918, DATA=-1) at win32callback.inc:66
#2 $77d398a1 in USER32!EnumDesktopWindows () from /cygdrive/c/WINDOWS/system32/user32.dll
#3 $77d398df in USER32!EnumPropsA () from
/cygdrive/c/WINDOWS/system32/user32.dll
#4 $77d37ad7 in USER32!SetWindowPlacement () from /cygdrive/c/WINDOWS/system32/user32.dll
#5 $77d3ccd4 in USER32!DefRawInputProc () from
/cygdrive/c/WINDOWS/system32/user32.dll
#6 $77d145bd in USER32!TranslateMessageEx () from /cygdrive/c/WINDOWS/system32/user32.dll
#7 $77d147d4 in USER32!DefWindowProcA () from
/cygdrive/c/WINDOWS/system32/user32.dll
#8 $77f65da3 in ntdll!LdrDestroyOutOfProcessImage () from ntdll.dll #9 $00653620 in CNSENDMESSAGE (LM_MESSAGE=1026, SENDER=$36a56f4, DATA=$0) at controls.pp:1266
#10 $00659894 in TWINCONTROL__DESTROYCOMPONENT (this=$36a56f4) at wincontrol.inc:2640
#11 $00659aa9 in TWINCONTROL__DESTROYWND (this=$36a56f4) at wincontrol.inc:2704
#12 $0065731d in TWINCONTROL__DESTROYHANDLE (this=$36a56f4) at wincontrol.inc:1546
#13 $00657304 in TWINCONTROL__DESTROYHANDLE (this=$36a3e64) at wincontrol.inc:1543
#14 $0065867f in TWINCONTROL__DESTROY (this=$36a3e64) at wincontrol.inc:2169 #15 $0064a04c in TSCROLLINGWINCONTROL__DESTROY (this=$36a3e64) at scrollingwincontrol.inc:163
#16 $0064a2f0 in TCUSTOMFORM__DESTROY (this=$36a3e64) at customform.inc:119 #17 $0066366e in TPROMPTDIALOG__DESTROY (this=$36a3e64) at promptdialog.inc:209
#18 $006ce7a6 in TOBJECT__FREE (this=$36a3e64) at objpas.inc:56 #19 $00663d1b in SHOWPROMPTDIALOG (DIALOGCAPTION=$6e92c9, DIALOGMESSAGE=$6e9203, DIALOGTYPE=256, BUTTONS=$366ef34, BUTTONCOUNT=1, DEFAULTINDEX=0, ESCAPERESULT=9, USEDEFAULTPOS=true, X=0, Y=0) at promptdialog.inc:370
#20 $006c5977 in TINTERFACEBASE__PROMPTUSER (DIALOGCAPTION=$6e92c9, DIALOGMESSAGE=$6e9203, DIALOGTYPE=256, BUTTONS=$366ef34, BUTTONCOUNT=1, DEFAULTINDEX=0, ESCAPERESULT=9, this=$89f008) at interfacebase.inc:1286 #21 $0067520e in PROMPTUSER (DIALOGCAPTION=$6e92c9, DIALOGMESSAGE=$6e9203, DIALOGTYPE=256, BUTTONS=$366ef34, BUTTONCOUNT=1, DEFAULTINDEX=0, ESCAPERESULT=9) at winapi.inc:896
#22 $00662a22 in MESSAGEDLG (ACAPTION=$6e92c9, AMSG=$6e9203, DLGTYPE=MTWARNING, BUTTONS=[MBIGNORE], HELPCTX=0) at messagedialogs.inc:164 #23 $0040da57 in SETUPFPCSOURCEDIRECTORY (INTERACTIVESETUP=true) at initialsetupdlgs.pas:107
#24 $00614536 in TMAINIDE__LOADGLOBALOPTIONS (this=$36a2f64) at main.pp:790 #25 $006146fb in TMAINIDE__CREATE (THEOWNER=$89ef38, this=$36a2f64) at main.pp:826
#26 $0064edcb in TAPPLICATION__CREATEFORM (INSTANCECLASS=$7d0834, REFERENCE=void, this=$89ef38) at application.inc:1101 #27 $006d40dc in main () at lazarus.pp:74

If I try to close the dialog window with the [x] (close button), it crashes sooner.

Horacio

Earlier message 32 lines
----- Original Message ----- From: "Micha Nelissen" To: Sent: Monday, August 25, 2003 11:35 AM Subject: Re: [lazarus] Lazarus crash on Win32 > Horacio Jamilis wrote: > > > I downloaded today snapshot and compiled ok on win32. > > As always until today, I can't start Lazarus properly. > > > > The splash screen is properly shown, then the FPC Sources Directory not > > found dialog appears, and when I press Ignore, Lazarus crashes. > > I followed the error, and it is raised on: > > Line 2169 of wincontrol.inc -> DestroyHandle; > > > > It is called from the Inherited clause on the Dialog free. > > Can you see _why_ it crashes? Nil-pointer dereference etc? Can you start > in gdb and give a stack trace? What compiler version are you using? > > Regards, > > Micha. > > > _________________________________________________________________ > To unsubscribe: mail with > "unsubscribe" as the Subject > archives at http://www.lazarus.freepascal.org/mailarchives >

Reply by email

Micha Nelissen
to Horacio Jamilis: � I downloaded today snapshot and compiled ok on win32. As always until today, I can't…
Horacio Jamilis wrote 11 lines
If you tell me how I will do it. I am trying. I compiled with fpc 1.0.10 I hope the next is the stack back trace: (bt) #0 $006ccc43 in PCHAR_TO_ANSISTR (A=$0, P=$a918) at astrings.inc:266 #1 $0068d3bd in PROPENUMPROC (WINDOW=656794, STR=$a918, DATA=-1) at win32callback.inc:66

Okay, now we getting there. Now when you start gdb type:
- 'file lazarus.exe' (you did that, i guess)
- 'b win32callback.inc:66'
- 'run'
- when it stops on win32callback.inc:66, step into the PCHAR_TO_ANSISTR function with 's', then print some variables 'print a', and 'x/s p', which dumps the string at location p.

HTH,

Micha.

Reply by email

Micha Nelissen
to Horacio Jamilis: � I downloaded today snapshot and compiled ok on win32. As always until today, I can't…
Horacio Jamilis wrote 15 lines
Ok, What i found: in astrings.inc - procedure PChar_To_AnsiStr - line 266: print a -> $8 = (PCHAR) $0 print p -> $6 = (PCHAR) $a918 x/s p -> $a918: <Address $a918 out of bounds> print p[0] -> Error: Cannot access memory at address $a918 any hint?

Hmm it seems p does not point to a valid string after, maybe it's some windows atom. In that case, I think you need to comment the assert code (the line 66 in win32callback.inc) and try again. It seems parameter Str is expected to be a string, but apparantly this is not the case.

What do other people think?

Regards,

Micha.

Reply by email

Micha Nelissen
to Horacio Jamilis: � I downloaded today snapshot and compiled ok on win32. As always until today, I can't…
Karl Brandt wrote 8 lines
Micha Nelissen wrote: > What do other people think? Are the snapshots being updated? I don't see these problems with CVS version (Until 23/08).

Have you compiled with debugging on?

'make DEBUG=1 OPT=-g all' or something alike? Otherwise it's fairly logical you don't see the bug because the code isn't there, no assertions.

Regards,

Micha.

Reply by email

Horacio Jamilis
to Horacio Jamilis: � I downloaded today snapshot and compiled ok on win32. As always until today, I can't…

Ok,

What i found:

in astrings.inc - procedure PChar_To_AnsiStr - line 266:

print a -> $8 = (PCHAR) $0

print p -> $6 = (PCHAR) $a918

x/s p -> $a918: <Address $a918 out of bounds>

print p[0] -> Error: Cannot access memory at address $a918

any hint?

Horacio

Earlier message 38 lines
----- Original Message ----- From: "Micha Nelissen" To: Sent: Monday, August 25, 2003 12:29 PM Subject: Re: [lazarus] Lazarus crash on Win32 > Horacio Jamilis wrote: > > > If you tell me how I will do it. > > > > I am trying. > > > > I compiled with fpc 1.0.10 > > > > I hope the next is the stack back trace: (bt) > > > > #0 $006ccc43 in PCHAR_TO_ANSISTR (A=$0, P=$a918) at astrings.inc:266 > > #1 $0068d3bd in PROPENUMPROC (WINDOW=656794, STR=$a918, DATA=-1) at > > win32callback.inc:66 > > Okay, now we getting there. Now when you start gdb type: > - 'file lazarus.exe' (you did that, i guess) > - 'b win32callback.inc:66' > - 'run' > - when it stops on win32callback.inc:66, step into the PCHAR_TO_ANSISTR > function with 's', then print some variables 'print a', and 'x/s p', > which dumps the string at location p. > > HTH, > > Micha. > > _________________________________________________________________ > To unsubscribe: mail with > "unsubscribe" as the Subject > archives at http://www.lazarus.freepascal.org/mailarchives >

Reply by email

Micha Nelissen
to Horacio Jamilis: � I downloaded today snapshot and compiled ok on win32. As always until today, I can't…
Horacio Jamilis wrote 9 lines
I downloaded today snapshot and compiled ok on win32. As always until today, I can't start Lazarus properly. The splash screen is properly shown, then the FPC Sources Directory not found dialog appears, and when I press Ignore, Lazarus crashes. I followed the error, and it is raised on: Line 2169 of wincontrol.inc -> DestroyHandle; It is called from the Inherited clause on the Dialog free.

Can you see _why_ it crashes? Nil-pointer dereference etc? Can you start in gdb and give a stack trace? What compiler version are you using?

Regards,

Micha.

Reply by email

Horacio Jamilis

Hi,
�
I downloaded today snapshot and compiled ok on
win32.
As always until today, I can't start Lazarus
properly.
�
The splash screen is properly shown, then the FPC
Sources Directory not found dialog appears, and when I press Ignore, Lazarus crashes.
I followed the error, and it is raised
on:
Line 2169 of wincontrol.inc ->
DestroyHandle;
�
It is called from the Inherited clause on the
Dialog free.
�
Horacio Jamilis

Reply by email