[Lazarus] Win32 Swedish Locale "Failed to create win32 control"

Brad Campbell brad at wasp.net.au
Tue Mar 16 10:15:22 CET 2010


Martin wrote:
> On 16/03/2010 00:40, Brad Campbell wrote:
>> José Mejuto wrote:
>>> Hello Lazarus-List,
>>>
>>> Monday, March 15, 2010, 3:52:26 PM, you wrote:
>>>
>>> BC> Exception :
>>> BC> TApplication.HandleException Failed to create win32 control, 
>>> error: 0 : +tgõrden
>>> BC>   har slutf÷rts.
>>> BC>    Stack trace:
>>> BC>    $0055994D  FINISHCREATEWINDOW,  line 225 of win32wscontrols.pp
>>>
>>> CreateWindowsExW returns NULL, so an error in the creation of the
>>> control happends, but GetLastError returns zero which usually means no
>>> error :-?
>>>
>>> Had you tested your code with heaptrc ? To me it looks like a memory
>>> corruption. I was unable to seen nothing that could be related to
>>> swedish locale, or any other locale. I think that a copy of that
>>> specific form could help, but as the exception appears only in some
>>> "builds" it strongly make me think in a memory corruption.
>>
>> Yes, I test with heaptrc regularly. The thing is this has a couple of 
>> hundred users scattered around
>> the place, but this guy is the only one with the problem and as far as 
>> I know he's the only one
>> using a localised version of windows. I've been through the code in 
>> the backtrace, and I can't find
>> any sane reason either, but I thought I'd ask as I'm not really up on 
>> win32.
>>
>>> Which Lazarus and fpc are you using ?
>>
>> >(I'm running fpc 2.4 fixes branch svn : r14896 and the App was built 
>> with Lazarus svn : r23855)
>>
>> I've attached that form for reference if it helps.
>>
>> Regards,
>> Brad
> 
> Not sure if it is strictly locale related. I run into the exact same 
> error/stacktrace today. Happened with lazarus itself (when I tried to 
> open the "debug /debug output" window (the debug log memo win)).
> It happened just once, and I could not reproduce it. It happened after a 
> long debug session, so it may have been the content of the memo?
> 
> Running on an english Windows Vista.

Now that is interesting.

I create the form, then I load the memo from a compressed stream and call the forms showmodal 
method. I assumed the crash was during the form's creation, so it never gets to the stage where it 
loads the memo.

In the case of this crash though it happens on a clean start. He fires up the application and goes 
to Help->About and it blows up. It is at least helpful that it's reproducible on his machine, it's 
just that his machine is in Sweden and I'm not :)

I've installed Swedish XP-PRO-SP3 & XP-Home in a VM (which was a challenge in itself, Bork Bork 
Bork!) but I can't reproduce the fault locally.

Brad
-- 
Dolphins are so intelligent that within a few weeks they can
train Americans to stand at the edge of the pool and throw them
fish.





More information about the Lazarus mailing list