View Issue Details

IDProjectCategoryView StatusLast Update
0036193LazarusLCLpublic2020-05-18 20:15
ReporterMihail Assigned To 
PrioritynormalSeverityminorReproducibilityalways
Status newResolutionopen 
Platformx64OSms windows 
Product Version1.8.4 
Summary0036193: win32 error with TOpenDialog.Execute
DescriptionUse crosscompile win32.
Add TOpenDialog. Call TOpenDialog.Execute. After show OpenDialog raise exception - file C:\Users\Пользователь\Desktop not exists. I think promblem OpenDialog use encoding Utf-8. Windows expect Win-1251.
TagsNo tags attached.
Fixed in Revision
LazTarget-
WidgetsetWin32/Win64
Attached Files

Relationships

has duplicate 0037063 resolvedBart Broersma Error on TOpenDialog.execute when username is in Cyrillic 

Activities

Bart Broersma

2019-10-17 18:24

developer   ~0118645

Please attach a compileable sample program demonstarting the issue.
LCL is entirley UTF8 and the Win32/64 interface translates that UTF8 to UTF16 before calling the Windows API.

Mihail

2019-10-18 02:50

reporter   ~0118656

Demo project reproducing the problem in the attachment. I'm build and run x86 application on windows 64 bit. System language os - Russian.
In the attachment app32_os64.png show error. If I'm build and run x64 application on windows 64 bit no error, view app64_os64.png in the attachment.
errOpenDialog.zip (208,350 bytes)

Bart Broersma

2019-10-18 13:42

developer   ~0118659

So, if I understand it correctly then when you build this for Win64/x86-64 all is fine, but when you build for Win32/i386 and then run on Win64 you get an exception by just trying to excute a TOpenDialog?
Obviously I can't understand the error dialog in your attachment ;-)

Anton Kavalenka

2019-10-18 16:43

reporter   ~0118660

Last edited: 2019-10-18 16:50

View 2 revisions

Tested with FPC 3.3.1 built 2019-10-09 on i386-win32 WIndows 2003 server.
No problem. My user name in Latin characters.

Seems like username is in locale-specific symbols and one of shell32 callbacks receives utf8-encoded user home directory name.

I even created a user "Вася" and tried to execute example from desktop of that user and from console with active home (c:\Documents and Settings\Вася)
No problem.

Anton Kavalenka

2019-10-18 18:53

reporter   ~0118666

Under win10 with Cyrillic profile name - no problems.

Mihail

2019-10-21 06:35

reporter   ~0118745

The error raise if run Win32/i386 application on Win64 os.

Anton Kavalenka

2019-10-21 08:03

reporter   ~0118746

I did testing i386-win32 binary on x86-64 win7 and win10.
Binary was compiled with FPC 3.3.1 SVN trunk.

Bart Broersma

2020-05-14 18:47

developer   ~0122798

Did you use the DisableUtf8RTL define when you built the program?

Vitaly V Gorbukov

2020-05-18 03:25

reporter   ~0122896

I now installed the Win64 version - the error when opening remained consistent.

Anton Kavalenka

2020-05-18 10:50

reporter   ~0122899

The problem may be not in application, but in shell extensions (for instance Kasperski trojan installed on your system) calling dialog hooks which improperly handled.
Can you test on clean machine?
Can you list the DLLs loaded by your process?

Bart Broersma

2020-05-18 20:15

developer   ~0122909

B.t.w. Why does the TOpenDialog try to open with Desktop as default folder (since you don't set that in your project)?

Issue History

Date Modified Username Field Change
2019-10-17 10:44 Mihail New Issue
2019-10-17 18:24 Bart Broersma Status new => feedback
2019-10-17 18:24 Bart Broersma LazTarget => -
2019-10-17 18:24 Bart Broersma Note Added: 0118645
2019-10-18 02:50 Mihail File Added: errOpenDialog.zip
2019-10-18 02:50 Mihail Note Added: 0118656
2019-10-18 02:50 Mihail Status feedback => new
2019-10-18 13:42 Bart Broersma Note Added: 0118659
2019-10-18 16:43 Anton Kavalenka Note Added: 0118660
2019-10-18 16:50 Anton Kavalenka Note Edited: 0118660 View Revisions
2019-10-18 18:53 Anton Kavalenka Note Added: 0118666
2019-10-21 06:35 Mihail Note Added: 0118745
2019-10-21 08:03 Anton Kavalenka Note Added: 0118746
2020-05-14 18:46 Bart Broersma Relationship added has duplicate 0037063
2020-05-14 18:47 Bart Broersma Note Added: 0122798
2020-05-18 03:25 Vitaly V Gorbukov Note Added: 0122896
2020-05-18 10:50 Anton Kavalenka Note Added: 0122899
2020-05-18 20:15 Bart Broersma Note Added: 0122909