r16turbo / gdipp

Automatically exported from code.google.com/p/gdipp
0 stars 0 forks source link

0.8.2 doesn't render fonts at all #86

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Which program triggers the problem? Specify the filename if possible.
All programs.

What steps will reproduce the problem?
1. Install 0.8.2 on windows 7 x64
2. Start gdipp services
3. Boring Windows font rendering not changed.

What is the expected output? What do you see instead?
I expect gdipp 0.8.2 to render fonts the same, or better, than 0.8.1.  But no 
gdipp font rendering is taking place. It is as if gdipp is not installed.

What version of gdipp (including renderer)? On which operating system?
0.8.2 installed as a service, renderer==10, Windows 7 Enterprise x64.

Please provide any additional information below. Screenshots always help.
The gdipp services start okay, but there is no change to the font rendering. I 
noticed that the <version> tag in the settings file is still set to 0.8.1.  So 
I changed it to 0.8.2, but that made no difference.  I am using the default 
settings file created by the 0.8.2 installer.

Original issue reported on code.google.com by seandy...@gmail.com on 5 Jul 2010 at 9:39

GoogleCodeExporter commented 9 years ago
The <version> number has no effect on rendering, as noted in 
http://code.google.com/p/gdipp/wiki/SETTING_Beta. I forgot to change the number 
before releasing. Thanks for noticing that.

Can you please download the troubleshooting archive in 
http://code.google.com/p/gdipp/downloads/detail?name=gdipp.zip, overwrite files 
and try again? Thanks.

Original comment by crendk...@gmail.com on 5 Jul 2010 at 3:09

GoogleCodeExporter commented 9 years ago
I overwrote those files with the troubleshooting ones and restarted. But there 
is no difference to Windows' rendering.  For what it's worth, Task Manager 
shows the service repeatedly spawning gdipp_hook.exe's as fast as it can.

Original comment by seandy...@gmail.com on 5 Jul 2010 at 3:41

GoogleCodeExporter commented 9 years ago
I have the same problem in win7 x64 with gdipp 0.8.2.It's too unstable.

Original comment by yyz...@gmail.com on 5 Jul 2010 at 4:04

GoogleCodeExporter commented 9 years ago
gdipp_hook_xx.exe is the new component to take charge of hooking. If this 
process cannot be spawned and working correctly, there will be no rendering.

I tested the new hooking mechanism in several machines without any problem. I 
also received positive reports from other users. It is meant to be more stable 
and efficient than ANY of the previous versions. However, the hooking mechanism 
uses an Windows API (SetWindowsHookEx) that might be considered malicious by 
anti-virus softwares or HIPS. Could this be your situations? If yes, please 
close the softwares and try again.

Original comment by crendk...@gmail.com on 5 Jul 2010 at 5:01

GoogleCodeExporter commented 9 years ago
I have to add path to environmental variable to start gdipp.

After that, everything is fine. At least for me, the symbolic method doesn't 
work.

x64 0.8.2

Original comment by DCatcher...@gmail.com on 5 Jul 2010 at 5:17

GoogleCodeExporter commented 9 years ago
What do you mean by "doesn't work"? The symbolic links cannot be created? Or 
even the links are created, you still need to change PATH?

Original comment by crendk...@gmail.com on 6 Jul 2010 at 7:30

GoogleCodeExporter commented 9 years ago
I don't know where to find these symbolic links.
After update, an error says some dll is missing. I added the path of gdipp to 
PATH, then all is fine.

Original comment by DCatcher...@gmail.com on 6 Jul 2010 at 10:51

GoogleCodeExporter commented 9 years ago
The 0.8.2 installer will make symbolic links (using mklink) of EasyHookxx.dll, 
gdipp_common_xx.dll and gdipp_setting.xml to the System32 (and SysWOW64) 
directory. If you cannot find such object there, either the installer script 
has bug, or user has no permission to create object there, or some unexpected 
error.

Original comment by crendk...@gmail.com on 6 Jul 2010 at 11:58

GoogleCodeExporter commented 9 years ago
I have EasyHookxx.dll in System32 and SysWOW64 (datestamped 26 April 2010 
01:09), but _no_ gdipp* files in either directory. :-(

Original comment by seandy...@gmail.com on 6 Jul 2010 at 12:13

GoogleCodeExporter commented 9 years ago
I cannot find any of these dll mentioned,  neither in System32 nor in SysWOW64.
A check of whether these links are created after installation is good.

Original comment by yan...@google.com on 6 Jul 2010 at 12:32

GoogleCodeExporter commented 9 years ago
I will find out why those symbolic links are not created. For now, please 
download 
[http://code.google.com/p/gdipp/downloads/detail?name=gdipp_0.8.2_mklink.zip] 
and extract all .bat files to the gdipp directory. Use Enable_32.bat to 
manually create the links if you are running 32-bit Windows. Let me know if the 
problem solves.

Original comment by crendk...@gmail.com on 6 Jul 2010 at 2:12

GoogleCodeExporter commented 9 years ago
I cannot find EasyHook32.dll in System32 and both EasyHook32.dll and 
EasyHook64.dll in SysWOW64.
1.copy EasyHookxx.dll to System32 and SysWOW64.
2.change PATH.
3.close avria antivir.
After that,I still cannot start gdipp.

Original comment by yyz...@gmail.com on 6 Jul 2010 at 2:22

GoogleCodeExporter commented 9 years ago
Another note: the symbolic link of gdipp_common_xx.dll and gdipp_setting.xml is 
not required for most of the applications except the latest Chrome Dev AFAIK if 
you use Service mode. Both are required for all application if you use Registry 
mode.

For those who cannot find any of the symbolic links, please kindly use the 
following command line to generate a log file of the installation process and 
upload, thanks:

msiexec /i <path_of_msi> /log C:\gdipp.log

You can find the generated log file in C:\gdipp.log.

Original comment by crendk...@gmail.com on 6 Jul 2010 at 2:27

GoogleCodeExporter commented 9 years ago
I had the exact same issue (gdipp_hook starting and exiting as fast as it 
could, and gdipp failing to render anything on my system). I have a great deal 
of difficulty figuring out exactly what I should be doing to help, so I have 
gone ahead and uninstalled gdipp, then reinstalled with the log file option as 
in comment 13.

Attached is my log file. Perhaps it will be helpful to you.

Original comment by mbal...@gmail.com on 7 Jul 2010 at 9:33

Attachments:

GoogleCodeExporter commented 9 years ago
Here is my log file.  I added the X (extra debugging) and V (verbose) options 
to the msiexec launcher.

Original comment by seandy...@gmail.com on 9 Jul 2010 at 9:19

Attachments:

GoogleCodeExporter commented 9 years ago
The rendering works for me after I add the path to gdipp's directory to the 
PATH variable, run the mklink files as per crendking's Comment 11, and set the 
files gdipp_hook_32.exe and gdipp_hook_64.exe to Run as Administrator

Original comment by pkchu.s...@gmail.com on 14 Jul 2010 at 4:17

GoogleCodeExporter commented 9 years ago
Just an amendment to my Comment 16: I manually started gdipp_hook_32.exe and 
gdipp_hook_64.exe after I completed the steps highlighted in my previous 
comment to get the rendering to start. If I restart the services from the 
Services management console, I would have to launch both processes manually 
again to start it again.

Original comment by pkchu.s...@gmail.com on 14 Jul 2010 at 4:50

GoogleCodeExporter commented 9 years ago
Have you made any progress on this, crendking? Any ideas on how to fix? :-)

Original comment by seandy...@gmail.com on 15 Jul 2010 at 12:23

GoogleCodeExporter commented 9 years ago
Issue 97 has been merged into this issue.

Original comment by crendk...@gmail.com on 19 Aug 2010 at 11:33

GoogleCodeExporter commented 9 years ago
0.8.2 as well as 0.9.0 won't render anything at all unless you kill 
gdipp_hook_xx.exe and manually set them to run as administrator.

Original comment by Taoism...@gmail.com on 24 Aug 2010 at 1:32

GoogleCodeExporter commented 9 years ago
For me also 0.9.0 does not render at all. I have created manually symbolic 
links to mentioned dll and xml files. After rebooting, gdi_svc_32 and 
gdi_svc_64 are running, but gdipp_hook_32 and gdipp_hook_64 are NOT running, 
and I still get no rendering. I have to start manually gdipp_hook_32 and 
gdipp_hook_64 as an administrator everytime I boot and then everything is ok. 
¿Any clue on how to get gdipp services starting gdipp_hook_XX processes 
automatically as an administrator after every reboot?

Original comment by pepe.has...@gmail.com on 24 Aug 2010 at 9:08

GoogleCodeExporter commented 9 years ago
0.9 renders as well as 0.8.2 for me.

Added path to environment.

Original comment by DCatcher...@gmail.com on 25 Aug 2010 at 12:30

GoogleCodeExporter commented 9 years ago
crendking,

I have some clues that may help fixing this issue. Regarding the lack of links 
in System32 and SysWOW64, I have found that links are only created if windows 
User Account Control (UAC) is disabled during gdipp installation. Seems like 
you need
Deferred and NoImpersonate for custom actions creating the links (see 
http://stackoverflow.com/questions/249876/why-msi-customaction-that-sets-a-reg-k
ey-needs-to-be-deffered-on-vista-with-uac)

UAC seems to be also related somehow to gdipp not rendering at all. First of 
all, I must correct the information I provided in Comment 21. In my PC, when I 
boot, all of gdipp_svc_32, gdipp_svc_64, gdipp_hook_32 and gdipp_hook_64 ARE 
RUNNING, but they are all running as SYSTEM user. At this point I get no 
rendering at all. Looking at the source code for gdipp_svc.cpp, I see a comment 
that states that "some functions of gdipp Enumerator may require interactive 
session" but I think that SYSTEM is not. If UAC is disabled and I manually 
restart gdipp services, gdipp_svc_32 and gdipp_svc_64 run again as SYSTEM user, 
but gdipp_hook_32 and gdipp_hook_64 run now
as my active user. At this point gdipp rendering works fine, but if I reboot, 
gdipp_hook_32 and gdipp_hook_64 run again as SYSTEM user (no rendering). I 
think that the problem is that gdipp services launch gdipp_hook_32 and 
gdipp_hook_64 before I log in. In any case, if UAC is enabled, I get no 
rendering and If I try to restart services manually (gdipp_hook_32 and 
gdipp_hook_64 do NOT run at all). If UAC is enabled, I can only get rendering 
after manually starting as administrator files gdipp_hook_32.exe and 
gdipp_hook_64.exe.

Hope this helps you in fixing this issue. Thanks for your work on gdipp.

Original comment by pepe.has...@gmail.com on 28 Aug 2010 at 5:50

GoogleCodeExporter commented 9 years ago
Hi again,
I have one modified version of gdipp_svc_XX that runs fine on my PC. Basically, 
I kill gdipp_hook_XX from the service on SERVICE_CONTROL_SESSIONCHANGE 
notification, so that the service starts a new instance of the hook running as 
the currently logged user (not running as SYSTEM). I have also noticed that 
gdipp_hook_XX processes should run as admin for gdipp being able to render 
applications running as admin. I got this using the following code:

    TOKEN_LINKED_TOKEN admin;
    DWORD len;
    GetTokenInformation(h_user_token, TokenLinkedToken, &admin, sizeof(TOKEN_LINKED_TOKEN), &len);
    HANDLE AdminToken = admin.LinkedToken;

    STARTUPINFOW si = {};
    si.cb = sizeof(STARTUPINFO);

    return CreateProcessAsUserW(AdminToken, gdipp_hook_path, NULL, NULL, NULL, FALSE, 0, NULL, NULL, &si, &pi_hook);

but I haven't test it when a non-admin user is logged.

Original comment by pepe.has...@gmail.com on 29 Aug 2010 at 9:50

GoogleCodeExporter commented 9 years ago
Thank you very much pepe.haskell for your information. Although I haven't 
tested your comment, I think "I think that the problem is that gdipp services 
launch gdipp_hook_32 and gdipp_hook_64 before I log in" is the key to the 
solution. gdipp Hook has to be running in the active administrator user 
account, or it fails to hook the active user's windows, or fails because of 
access denial.

Original comment by crendk...@gmail.com on 30 Aug 2010 at 10:24

GoogleCodeExporter commented 9 years ago
Solved. Now the hook process spawns only after a user is logged on, and 
terminates when a user is logged off. When multiple users (even 
non-administrators) are logged on, same number of hook processes are spawned.

Still of course, you have to be an administrator to install gdipp as service.

Original comment by crendk...@gmail.com on 31 Aug 2010 at 4:27

GoogleCodeExporter commented 9 years ago
I believe I was having this same issue when testing out 0.8.2 and 0.9.0. Now 
that it appears to be solved, when will a new beta version with the fix come 
out?

Original comment by peterd...@gmail.com on 7 Sep 2010 at 5:49

GoogleCodeExporter commented 9 years ago
I have tried to compile new sources in order to test those changes, but files 
outline.h and outline.cpp are not in the repo. ¿Could you please upload them?

Original comment by pepe.has...@gmail.com on 10 Sep 2010 at 9:26

GoogleCodeExporter commented 9 years ago
I have compiled sources at repo in order to test your latest changes related to 
this issue. Although I got gdipp rendering, I detected a couple of problems:

1) gdipp does not render for an application running as administrator

2) the service does not respond if I try to stop it from the SCM. I have to 
kill gdi_hook_XX processes manually.

I got both problems solved by modifying function start_hook as follows:

BOOL start_hook(ULONG session_id)
{
    BOOL b_ret;

    h_user_tokens.insert(pair<ULONG, HANDLE>(session_id, HANDLE()));
    b_ret = WTSQueryUserToken(session_id, &h_user_tokens[session_id]);
    if (!b_ret)
        return FALSE;

    TOKEN_LINKED_TOKEN admin;
    DWORD len;
    GetTokenInformation(h_user_tokens[session_id], TokenLinkedToken, &admin, sizeof(TOKEN_LINKED_TOKEN), &len);
    HANDLE AdminToken = admin.LinkedToken;

    // this event handle is inheritable
    SECURITY_ATTRIBUTES inheritable_sa = {sizeof(SECURITY_ATTRIBUTES), NULL, TRUE};
    h_hook_events[session_id] = CreateEvent(&inheritable_sa, TRUE, FALSE, NULL);
    if (h_hook_events[session_id] == NULL)
        return FALSE;

    swprintf_s(hook_env_str, L"h_gdipp_hook_wait=%p%c", h_hook_events[session_id], 0);

    STARTUPINFOW si = {sizeof(STARTUPINFO)};

    pi_hooks.insert(pair<ULONG, PROCESS_INFORMATION>(session_id, PROCESS_INFORMATION()));
    return CreateProcessAsUserW(AdminToken, gdipp_hook_path, NULL, NULL, NULL, TRUE, CREATE_UNICODE_ENVIRONMENT, hook_env_str, NULL, &si, &pi_hooks[session_id]);
}

Hope this helps.

Original comment by pepe.has...@gmail.com on 17 Sep 2010 at 5:38

GoogleCodeExporter commented 9 years ago
What is your system version and which version did you checked out? I had 
several tester reports confirming that the latest service works just fine.

Original comment by crendk...@gmail.com on 17 Sep 2010 at 6:31

GoogleCodeExporter commented 9 years ago
Also, is UAC enabled when you tested? Which level?

Original comment by crendk...@gmail.com on 17 Sep 2010 at 6:53

GoogleCodeExporter commented 9 years ago
I am running Windows 7 Professional (64bits). I got latest source files from 
the repository today and compiled them myself.

Original comment by pepe.has...@gmail.com on 17 Sep 2010 at 6:55

GoogleCodeExporter commented 9 years ago
Yes, UAC is enabled. The level is the default one (Notify me only when programs 
try to make changes to my computer)

Original comment by pepe.has...@gmail.com on 17 Sep 2010 at 6:59

GoogleCodeExporter commented 9 years ago
Crendking,

my code in Comment 29 does not work when user is not an administrator. The 
following works:

    TOKEN_LINKED_TOKEN admin;
    DWORD len;
    HANDLE AdminToken;
    if(!GetTokenInformation(h_user_tokens[session_id], TokenLinkedToken, &admin, sizeof(TOKEN_LINKED_TOKEN), &len)) 
        AdminToken = h_user_tokens[session_id];
    else
        AdminToken = admin.LinkedToken;

Original comment by pepe.has...@gmail.com on 17 Sep 2010 at 7:29

GoogleCodeExporter commented 9 years ago
I have not tested the code with UAC enabled. I think your delta would be 
helpful for UAC case. I will test it out ASAP.

Original comment by crendk...@gmail.com on 17 Sep 2010 at 8:16

GoogleCodeExporter commented 9 years ago
I tested. Your delta works! However, it is still not perfect. If I log in as a 
standard user with UAC set to the highest level, when I try to launch a program 
as administrator, it will not be rendered, even I enter the correct 
administrator password. This is because the gdipp_hook_xx.exe is still created 
with the un-elevated token. I'm thinking if I can create every 
gdipp_hook_xx.exe with administrator's token...

Original comment by crendk...@gmail.com on 18 Sep 2010 at 2:50

GoogleCodeExporter commented 9 years ago
pepe.haskell, I guess your code is by far the best and simplest solution. I 
will adopt your code in 0.9.1. Would you mind if I endorse your name in the 
ChangeLog as credit? Thank you!

Original comment by crendk...@gmail.com on 18 Sep 2010 at 4:06

GoogleCodeExporter commented 9 years ago
Crendking, I'm glad the code was useful. It is ok if you want to cite me, but 
mine is a very minor contribution to such a great project as gdipp is. Thank 
you for all your work. 

Original comment by pepe.has...@gmail.com on 18 Sep 2010 at 9:25

GoogleCodeExporter commented 9 years ago

Original comment by crendk...@gmail.com on 18 Sep 2010 at 5:37