Sign in Join

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

Mailing lists / lazarus / 2000-03

Lazarus crash

8 messages · 4 people ·

Reply by email Subscribe to this list Your subscription

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

Alexandr A. Alexandrov

Hello!

Well, i finally did it! Got lararus.exe on my Win98. It even started. :-) The problem is, though, ith gtk stuff - when i try to do project->new, i get

Show quoted text 7 lines
Gdk-WARNING **: gdk_font_load: font name -*--normal-r-*-*-0-*-*-*-*-*-*-* illegal TODO:[TWinControl.Focused] An unhandled exception occurred at 0x00432C42 : Access violation An unhandled exception occurred at 0x0040F4F4 : Assertion failed.

Looks like it tries to load a font, but is unable to do that. This is not the only "GTK-critical" error in the list - but this is the one that crashes Lazarus...

Regards, Alexandr A. Alexandrov ()

Reply by email

Marc Weustink
to Alexandr A. Alexandrov

+ From: Alexandr A. Alexandrov

+ Well, i finally did it! Got lararus.exe on my Win98. It even
+ started. :-) The problem is, though, ith gtk stuff - when i
+ try to do project->new, i get
+ > Gdk-WARNING **: gdk_font_load:
+ > font name -*--normal-r-*-*-0-*-*-*-*-*-*-* illegal
+ > TODO:[TWinControl.Focused]

This is a known problem on win32 platforms. gdk crashes when loading an illegal font. (on Linux it is no problem). I thought I fixed this by not loading a font when no name was supplied.

However you get a TODO:[TWinControl.Focused] line so the problem might be somewhere else.

do you get a
WARNING: [TgtkObject.CreateFontIndirect] No fontname

if not then change the following:
TgtkObject.CreateFontIndirect:

if lfFaceName = '' --> if Lenght(lfFaceName) = 0

this might help. Let me know.

Marc

Reply by email

Marc Weustink
to Marc Weustink
Florian Klaempfl wrote 8 lines
> > if lfFaceName = '' --> if Lenght(lfFaceName) = 0 > > this might help. Let me know. This shouldn't make any difference, even the generated code should be the same for shortstrings as well as for ansistrings.

lfFaceName is an array[0..LF_FACESIZE - 1] of AnsiChar.

Marc

Reply by email

Florian Klaempfl
to Marc Weustink: + From: Alexandr A. Alexandrov + Well, i finally did it! Got lararus.exe on my Win98.…
Show quoted text 13 lines
At 18:43 10-03-2000 +0100, Florian Klaempfl wrote: > > > > if lfFaceName = '' --> if Lenght(lfFaceName) = 0 > > > > this might help. Let me know. > >This shouldn't make any difference, even the generated code should be the >same for >shortstrings as well as for ansistrings. lfFaceName is an array[0..LF_FACESIZE - 1] of AnsiChar.

In that case you should use the pchar functions! I suppose it's a string passed to the gtk and gtk knows only zero terminated strings i.e. it should be
if strlen(lfFaceName)=0 then
...
or
if ansistring(lfFaceName)='' then
...
should work too (but is much slower).

Reply by email

Peter Vreman
to Alexandr A. Alexandrov: Hello! + >> Gdk-WARNING **: gdk_font_load: + >> font name…
you wrote 11 lines
+ From: Alexandr A. Alexandrov + + WARNING: [TgtkObject.CreateFontIndirect] No fontname + TODO:[TWinControl.Focused] + An unhandled exception occurred at 0x004196C4 : + Access violation + + how should i debig this? Pfff.. normally I would say use DDD, however on a win32 platform I don't know. Heyt Vincent, how are you debugging things ?

insight from cygnus works good. Also gdb 4.18 seems rather stable. gdb 4.18 with pascal additions is delivered with 0.99.14 & 0.99.14a

And for backtraces there is since 0.99.14a a new option in the compiler to show the lines: compile with -gl. Using the makefiles it will be 'make OPT=-gl'

Peter

Reply by email

Alexandr A. Alexandrov
to Marc Weustink: + From: Alexandr A. Alexandrov + Well, i finally did it! Got lararus.exe on my Win98.…

Hello!

Friday, March 10, 2000, 12:41:24 PM, You wrote:

+ >> Gdk-WARNING **: gdk_font_load:
+ >> font name -*--normal-r-*-*-0-*-*-*-*-*-*-* illegal
+ >> TODO:[TWinControl.Focused]

MW> This is a known problem on win32 platforms. gdk crashes when loading an MW> illegal font. (on Linux it is no problem). I thought I fixed this by not MW> loading a font when no name was supplied.

MW> However you get a TODO:[TWinControl.Focused] line so the problem might be MW> somewhere else.

That is probably the case, because i changed CreateFontIndirect,

MW> do you get a
MW> WARNING: [TgtkObject.CreateFontIndirect] No fontname

MW> if not then change the following:
MW> TgtkObject.CreateFontIndirect:

MW> if lfFaceName = '' --> if Lenght(lfFaceName) = 0

and get the same:

WARNING: [TgtkObject.CreateFontIndirect] No fontname TODO:[TWinControl.Focused]
An unhandled exception occurred at 0x004196C4 :
Access violation

how should i debig this?

Regards, Alexandr A. Alexandrov ()

Reply by email

Marc Weustink
to Alexandr A. Alexandrov

+ From: Alexandr A. Alexandrov
+
+ WARNING: [TgtkObject.CreateFontIndirect] No fontname
+ TODO:[TWinControl.Focused]
+ An unhandled exception occurred at 0x004196C4 :
+ Access violation
+
+ how should i debig this?

Pfff.. normally I would say use DDD, however on a win32 platform I don't know. Heyt Vincent, how are you debugging things ?

Marc

Reply by email