EStackOverflow ntdll.dll Windows7 Delphi 2006

rinaldo_sync
rinaldo_sync used Ask the Experts™
on
Hello, please somebody help me!

This error ocurrs only in a station with Windows 7 Professional.
The application is compiled with BDS 2006.
Database Oracle

The error ocurrs at the line:
FormatDateTime('dddd', Date);

PS:
The .BPL's files and .EXE are compressed with ASPack.

Eurekalog.txt
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®

Commented:
FormatDateTime();
dd = Day
mm = Month
yy = Year with 2 digits
yyyy = Year with 4 digits

hh = Hour
mm = minute
ss = Second

dddd = ?
FormatDateTime('dd/mm/yy', Date) = 01/02/10
FormatDateTime('dd', Date) = 01
FormatDateTime('mm/dd/yyyy', Date) = 02/01/2010
What kind of format do u want?
Ferruccio AccalaiSenior developer, analyst and customer assistance

Commented:
cebasso, dddd is for Longdaynames

Investigating if there are differences in formatting times between W7 and previous versions

Author

Commented:
Borland Help FormatDateTime Routine:

dddd
Displays the day as a full name (Sunday-Saturday) using the strings given by the LongDayNames global variable.
11/26 Forrester Webinar: Savings for Enterprise

How can your organization benefit from savings just by replacing your legacy backup solutions with Acronis' #CyberProtection? Join Forrester's Joe Branca and Ryan Davis from Acronis live as they explain how you can too.

Commented:
Cool!
I never read the Help file for this routine haha
So, with a new project you got this error too?
i tested here, Windows 7 Home Premmium with default Locale Brazil and all others settings set to Brazil too and no problem...
test in your application something like
showmessage(formatdatetime('dddd', date));
should display 'segunda-feira' correct? or you got the error just calling that?
Senior developer, analyst and customer assistance
Commented:
@The .BPL's files and .EXE are compressed with ASPack.

You should try with uncompressed bpl and exe, to see if mem location changes and if execute the formatting code correctly.

Author

Commented:
No...
With a new project the error doesn't happen...
Commented:
Ok,
first of all, try what @Ferruccio68 said, compile your entire project again without using ASPack
after, if the error is appearing... maybe the error isnt really there...
maybe in DateTimetoStr() function?
your log
|51F3574C|rtl100.bpl       |Sysutils.pas    |           |DateTimeToStr   |

Author

Commented:
Ok, I will test without ASPack....

Author

Commented:
More details:
1. In other computers with Windows XP the error doesn't happen
2. In Windows 7 Standard the error doesn't happen
3. The EurekaLog always show the correct line number, using ASPack or not.

Commented:
Can you give us, part of your code?
you are using FormatDateTime with 'dddd' format for what?
what is receiving this format? are you using it after? example
var
  szBuff: String;
begin
  szBuff := FormatDateTime('dddd', Date);
  do something with szBuff
  using szBuff again
do you tried to debug your application setting a breakpoint and using step by step (F8) inside Delphi?

Author

Commented:
AddValue('DiaSem',UCaseFirst(FormatDateTime('dddd',Date)));

Yes, I'm using the result to populate a TStringList...
My computer runs on Windows XP....
The computer of my client runs on Windows 7.
It's impossible to debug....

Commented:
Can you take a look at Default Locale Settings in your client computer?
I already got problem with differents locale settings...
i mean for example, in your computer the default is Portuguese-Brazil and in your client is English-United States
Control Panel > Locale and Languages
Painel de Controle > Relógio Idioma e Região > Região e Idioma > Formato

Author

Commented:
Sorry....
I think this is not a error related to Locale Settings
The error ocurrs in ntdll.dll ..... RtlAllocateHeap()

Commented:
not exactly... formatdatetime('dddd', Date) in brazilian portuguese return "segunda-feira" and for united states "monday"
datetimetostr(date) in brazilian portuguese will return "01/02/2010" and for united states "2/1/2010"
for OnGuard components, you got error comparing dates with diferent local settings and is needed to override it at the application startup
i don't know where or for what do you are calling this... then you may try :)
Regards,

Author

Commented:
I'm using ASPack 2.12
This version is not compatible with Windows 7.
Without ASPack, it works !!

Thanks !!!

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial