hermanator
11th September 2003 22:42 UTC
InstallOptions page freeze on Win ME
I'm using 2.0 b4 from 7/20, and noticed that my custom page would come up blank on Windows ME.. and clicking next would cause the installer to freeze. After trying to see what I had changed (seeing as this did not happen before) I noticed that I had converted my *.ini file to Unix line endings. Converting the ini file back to dos line endings solved the problem.
It is curious though that the ini files that the example InstallOptions.nsi file uses, have unix line endings yet the resulting installer works fine on Windows ME.
I tried using the latest cvs version.. problem still occurs. Also, when using the latest cvs version, the Welcome and Finish pages came up blank for my MUI installer (On Windows ME).
None of these problems occur on Win2k.
kichik
11th September 2003 23:16 UTC
INI files are read using Windows API functions, therefore it makes sense they won't work right when given a wrongly formatted file. It also makes sense it will work on Windows NT and not on 9x because NT is usually more forgiving.
That said, it still shouldn't freeze because the INI file is using only \n instead of \r\n. I'll try to check and see what's wrong when I get my Windows 9x machine working again. But for now, and in all future INI files you should use Windows line breakings.
As for the finish and welcome page, make sure you didn't convert ioSpecial.ini in Contrib\Modern UI to Unix line breaks too.
kichik
12th September 2003 09:11 UTC
Tested on Windows 98, worked perfectly. Mind attaching the script and INI file in a zip?
hermanator
12th September 2003 15:35 UTC
You can also find the attached files in the gaim cvs repository.
kichik
12th September 2003 15:44 UTC
That file has Windows line breaks. Does it happen with that file too?
BTW, in the latest CVS version you can easily use another directory page to show the GTK directory selection window. With a little SectionGetFlags/SectionSetFlags games you can also make it show seperate required/available space figures for directory each page.
hermanator
12th September 2003 16:04 UTC
Yes the attached gtkInstall.ini has dos line endings.. switching it to unix line endings should trigger the problem. I noticed the new directory page feature.. Can I conditionally show the directory page, as I am doing now?
kichik
12th September 2003 16:10 UTC
Yes, of course you can. Just call Abort from the pre function if you don't want to show the page.
kichik
12th September 2003 16:24 UTC
That INI file works for me too. Please tell me what's the value this produces on that Windows ME machine (add it after MUI_INSTALLOPTIONS_EXTRACT):
Push $0
!insertmacro MUI_INSTALLOPTIONS_READ $0 "gtkInstall.ini" "Settings" "NumFields"
MessageBox MB_OK $0
Pop $0
I have made InstallOptions fail instead of crashing when it can't find any fields (or zero fields in NumFields as the default if Windows API fails) about 2 months ago, so this shouldn't happen with the latest CVS version.
hermanator
12th September 2003 19:29 UTC
The value is 4. BTW, the installer does not crash.. When the blank page comes up, I can still click back to get to the previous page. Only when clicking next will the installer freeze and stop responding.
kichik
12th September 2003 20:02 UTC
Right, assumed that from last time.
Anyway, can you test the attached DLL please? Tell me if it shows any message boxes too.
hermanator
12th September 2003 20:38 UTC
Using 9/11 cvs:
Before the welcome page:
nldx = 0 has nType = 0 -- invalid, skipping
nldx = 2 has nType = 0 -- invalid, skipping
Before the custome page:
nldx = 1 has nType = 0 -- invalid, skipping
nldx = 2 has nType = 0 -- invalid, skipping
nldx = 3 has nType = 0 -- invalid, skipping
kichik
12th September 2003 22:03 UTC
Does it freeze when clicking next?
I'll create another debug version with some more information tomorrow.
hermanator
13th September 2003 00:23 UTC
yes
kichik
13th September 2003 10:55 UTC
OK, here's a version stuffed with debug information. Get DebugView, run it, compile your installer with the InstallOptions.dll attached and attach its output here.
hermanator
13th September 2003 20:17 UTC
00000000 0.00000000 [Gaim-0] myGetProfileString("Settings", "Title") = ""
00000001 0.00006080 [Gaim-0] myGetProfileString("Settings", "CancelButtonText") = ""
00000002 0.00009440 [Gaim-0] myGetProfileString("Settings", "NextButtonText") = ""
00000003 0.00012720 [Gaim-0] myGetProfileString("Settings", "BackButtonText") = ""
00000004 0.00016720 [Gaim-0] GetPrivateProfileInt("Settings", "NumFields", 0, "C:\WINDOWS\TEMP\nsg313.TMP\ioSpecial.ini") = 3
00000005 0.00027120 [Gaim-0] Allocated 456 bytes for fields data [0x8B0D50]
00000006 0.00031200 [Gaim-0] myGetProfileString("Field 1", "TYPE") = ""
00000007 0.00032640 [Gaim-0] LookupToken(0x10004008, "")
00000008 0.00034720 [Gaim-0] LookupToken - no match found [] returning 0
00000009 0.00038320 [Gaim-0] myGetProfileString("Field 2", "TYPE") = "label"
00000010 0.00039760 [Gaim-0] LookupToken(0x10004008, "label")
00000011 0.00041360 [Gaim-0] LookupToken - found match [LABEL] returning 1
00000012 0.00042880 [Gaim-0] LookupToken(0x10004080, "label")
00000013 0.00045120 [Gaim-0] LookupToken - no match found [label] returning 0
00000014 0.00048560 [Gaim-0] myGetProfileString("Field 2", "TEXT") = ""
00000015 0.00052080 [Gaim-0] myGetProfileString("Field 2", "STATE") = ""
00000016 0.00055760 [Gaim-0] myGetProfileString("Field 2", "ROOT") = ""
00000017 0.00059280 [Gaim-0] myGetProfileString("Field 2", "ListItems") = ""
00000018 0.00066320 [Gaim-0] myGetProfileString("Field 2", "ValidateText") = ""
00000019 0.00079280 [Gaim-0] myGetProfileString("Field 2", "Flags") = ""
00000020 0.00085440 [Gaim-0] myGetProfileString("Field 3", "TYPE") = ""
00000021 0.00086880 [Gaim-0] LookupToken(0x10004008, "")
00000022 0.00088560 [Gaim-0] LookupToken - no match found [] returning 0
00000023 0.00124560 [Gaim-0] createCfgDlg - creating field number 0 [0]
00000024 0.00126000 [Gaim-0] createCfgDlg - skipping invalid field
00000025 0.00127440 [Gaim-0] createCfgDlg - creating field number 1 [1]
00000026 0.00133680 [Gaim-0] createCfgDlg - creating field number 2 [0]
00000027 0.00135120 [Gaim-0] createCfgDlg - skipping invalid field
00000028 2.55022720 [Gaim-0] got WM_NOTIFY_OUTER_NEXT, saving settings for the leave function...
00000029 2.55025040 [Gaim-0] SaveSettings()
00000030 2.55026720 [Gaim-0] SaveSettings - Field 1
00000031 2.55028080 [Gaim-0] SaveSettings - invalid field, skipping
00000032 2.55030080 [Gaim-0] SaveSettings - WritePrivateProfileString("Field 1", "STATE", "", "C:\WINDOWS\TEMP\nsg313.TMP\ioSpecial.ini")
00000033 2.55036240 [Gaim-0] SaveSettings - wrote
00000034 2.55037520 [Gaim-0] SaveSettings - Field 2
00000035 2.55038720 [Gaim-0] SaveSettings - label
00000036 2.55040560 [Gaim-0] SaveSettings - WritePrivateProfileString("Field 2", "STATE", "", "C:\WINDOWS\TEMP\nsg313.TMP\ioSpecial.ini")
00000037 2.55044480 [Gaim-0] SaveSettings - wrote
00000038 2.55045760 [Gaim-0] SaveSettings - Field 3
00000039 2.55047040 [Gaim-0] SaveSettings - invalid field, skipping
00000040 2.55048960 [Gaim-0] SaveSettings - WritePrivateProfileString("Field 3", "STATE", "", "C:\WINDOWS\TEMP\nsg313.TMP\ioSpecial.ini")
00000041 2.55055200 [Gaim-0] SaveSettings - wrote
00000042 2.55056720 [Gaim-0] SaveSettings - finished saving 3 fields
00000043 2.55058080 [Gaim-0] saved.
00000044 2.55059760 [Gaim-0] WM_NOTIFY_OUTER_NEXT - leave function didn't abort
00000045 2.55061200 [Gaim-0] WM_NOTIFY_OUTER_NEXT - next page - validating fields...
00000046 2.55062640 [Gaim-0] WM_NOTIFY_OUTER_NEXT - posting WM_CLOSE
00000047 2.55065200 [Gaim-0] WM_NOTIFY_OUTER_NEXT - posted WM_CLOSE
00000048 2.55068240 [Gaim-0] SaveSettings()
00000049 2.55069680 [Gaim-0] SaveSettings - Field 1
00000050 2.55071040 [Gaim-0] SaveSettings - invalid field, skipping
00000051 2.55073040 [Gaim-0] SaveSettings - WritePrivateProfileString("Field 1", "STATE", "", "C:\WINDOWS\TEMP\nsg313.TMP\ioSpecial.ini")
00000052 2.55076800 [Gaim-0] SaveSettings - wrote
00000053 2.55078160 [Gaim-0] SaveSettings - Field 2
00000054 2.55079280 [Gaim-0] SaveSettings - label
00000055 2.55081200 [Gaim-0] SaveSettings - WritePrivateProfileString("Field 2", "STATE", "", "C:\WINDOWS\TEMP\nsg313.TMP\ioSpecial.ini")
00000056 2.55085200 [Gaim-0] SaveSettings - wrote
00000057 2.55086560 [Gaim-0] SaveSettings - Field 3
00000058 2.55087840 [Gaim-0] SaveSettings - invalid field, skipping
00000059 2.55089680 [Gaim-0] SaveSettings - WritePrivateProfileString("Field 3", "STATE", "", "C:\WINDOWS\TEMP\nsg313.TMP\ioSpecial.ini")
00000060 2.55093840 [Gaim-0] SaveSettings - wrote
00000061 2.55095200 [Gaim-0] SaveSettings - finished saving 3 fields
00000062 5.15950880 [Gaim-0] myGetProfileString("Settings", "Title") = ""
00000063 5.15954800 [Gaim-0] myGetProfileString("Settings", "CancelButtonText") = ""
00000064 5.15958080 [Gaim-0] myGetProfileString("Settings", "NextButtonText") = ""
00000065 5.15961440 [Gaim-0] myGetProfileString("Settings", "BackButtonText") = ""
00000066 5.15965440 [Gaim-0] GetPrivateProfileInt("Settings", "NumFields", 0, "C:\WINDOWS\TEMP\nsg313.TMP\gtkInstall.ini") = 4
00000067 5.15975920 [Gaim-0] Allocated 608 bytes for fields data [0x7C15EC]
00000068 5.15979360 [Gaim-0] myGetProfileString("Field 1", "TYPE") = "label"
00000069 5.15980800 [Gaim-0] LookupToken(0x10004008, "label")
00000070 5.15982640 [Gaim-0] LookupToken - found match [LABEL] returning 1
00000071 5.15984080 [Gaim-0] LookupToken(0x10004080, "label")
00000072 5.15986320 [Gaim-0] LookupToken - no match found [label] returning 0
00000073 5.15990080 [Gaim-0] myGetProfileString("Field 1", "TEXT") = "Setup will install GTK+ in the following folder"
00000074 5.15993840 [Gaim-0] myGetProfileString("Field 1", "STATE") = ""
00000075 5.15997280 [Gaim-0] myGetProfileString("Field 1", "ROOT") = ""
00000076 5.16000640 [Gaim-0] myGetProfileString("Field 1", "ListItems") = ""
00000077 5.16007360 [Gaim-0] myGetProfileString("Field 1", "ValidateText") = ""
00000078 5.16019200 [Gaim-0] myGetProfileString("Field 1", "Flags") = ""
00000079 5.16024720 [Gaim-0] myGetProfileString("Field 2", "TYPE") = ""
00000080 5.16026080 [Gaim-0] LookupToken(0x10004008, "")
00000081 5.16027840 [Gaim-0] LookupToken - no match found [] returning 0
00000082 5.16036720 [Gaim-0] myGetProfileString("Field 3", "TYPE") = ""
00000083 5.16038240 [Gaim-0] LookupToken(0x10004008, "")
00000084 5.16039920 [Gaim-0] LookupToken - no match found [] returning 0
00000085 5.16043520 [Gaim-0] myGetProfileString("Field 4", "TYPE") = ""
00000086 5.16044960 [Gaim-0] LookupToken(0x10004008, "")
00000087 5.16046640 [Gaim-0] LookupToken - no match found [] returning 0
00000088 5.16082320 [Gaim-0] createCfgDlg - creating field number 0 [1]
00000089 5.16089200 [Gaim-0] createCfgDlg - creating field number 1 [0]
00000090 5.16090640 [Gaim-0] createCfgDlg - skipping invalid field
00000091 5.16092000 [Gaim-0] createCfgDlg - creating field number 2 [0]
00000092 5.16093280 [Gaim-0] createCfgDlg - skipping invalid field
00000093 5.16094640 [Gaim-0] createCfgDlg - creating field number 3 [0]
00000094 5.16095920 [Gaim-0] createCfgDlg - skipping invalid field
00000095 14.50706080 [Gaim-0] got WM_NOTIFY_OUTER_NEXT, saving settings for the leave function...
00000096 14.50708560 [Gaim-0] SaveSettings()
00000097 14.50710160 [Gaim-0] SaveSettings - Field 1
00000098 14.50711360 [Gaim-0] SaveSettings - label
00000099 14.50713360 [Gaim-0] SaveSettings - WritePrivateProfileString("Field 1", "STATE", "", "C:\WINDOWS\TEMP\nsg313.TMP\gtkInstall.ini")
00000100 14.50769680 [Gaim-0] SaveSettings - wrote
00000101 14.50771200 [Gaim-0] SaveSettings - Field 2
00000102 14.50772480 [Gaim-0] SaveSettings - invalid field, skipping
00000103 14.50774480 [Gaim-0] SaveSettings - WritePrivateProfileString("Field 2", "STATE", "", "C:\WINDOWS\TEMP\nsg313.TMP\gtkInstall.ini")
00000104 14.50778640 [Gaim-0] SaveSettings - wrote
00000105 14.50779920 [Gaim-0] SaveSettings - Field 3
00000106 14.50781200 [Gaim-0] SaveSettings - invalid field, skipping
00000107 14.50783120 [Gaim-0] SaveSettings - WritePrivateProfileString("Field 3", "STATE", "", "C:\WINDOWS\TEMP\nsg313.TMP\gtkInstall.ini")
00000108 14.50787760 [Gaim-0] SaveSettings - wrote
00000109 14.50789120 [Gaim-0] SaveSettings - Field 4
00000110 14.50790320 [Gaim-0] SaveSettings - invalid field, skipping
00000111 14.50792240 [Gaim-0] SaveSettings - WritePrivateProfileString("Field 4", "STATE", "", "C:\WINDOWS\TEMP\nsg313.TMP\gtkInstall.ini")
00000112 14.50796240 [Gaim-0] SaveSettings - wrote
00000113 14.50797600 [Gaim-0] SaveSettings - finished saving 4 fields
00000114 14.50799040 [Gaim-0] saved.
00000115 35.23716720 [Pcfmgr] PMDeviceManager Server: DllCanUnloadNow says Nope
kichik
13th September 2003 23:10 UTC
By the looks of it the hang comes from the NSIS installer, not InstallOptions. Since the only thing NSIS does for custom pages when the next button is clicked is calling the leave function, the problem must be in VerifyDir's loops. I haven't checked it too much but it seems the first loop that gets the root directory is the source of the problem. You might want to use GetRoot since it works with empty inputs and is also compatible with UNC paths.
As for the UNIX line-endings, I guess Windows ME just doesn't know how to handle those... As you can see by the log it returns empty strings for things that are there (hmm... maybe double check that by opening the INI file when the dialog "shows") and doesn't return any error (the debug code should have printed them if they existed). You will have to convert to Windows line-endings before compiling the installer.
Please attach large scripts/data next time, it makes the forum easier to read.