You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by "Alexey Petrenko (JIRA)" <ji...@apache.org> on 2007/04/04 09:51:32 UTC

[jira] Created: (HARMONY-3569) [classlib][awt] gl library depends on uxtheme.dll which is not present in Windows 2000

[classlib][awt] gl library depends on uxtheme.dll which is not present in Windows 2000
--------------------------------------------------------------------------------------

                 Key: HARMONY-3569
                 URL: https://issues.apache.org/jira/browse/HARMONY-3569
             Project: Harmony
          Issue Type: Bug
          Components: Classlib
         Environment: Windows 2000
            Reporter: Alexey Petrenko
            Priority: Critical


AWT uses uxtheme.dll only in one place.
We should make this dependency optional.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Resolved: (HARMONY-3569) [classlib][awt] gl library depends on uxtheme.dll which is not present in Windows 2000

Posted by "Nathan Beyer (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HARMONY-3569?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Nathan Beyer resolved HARMONY-3569.
-----------------------------------

    Resolution: Fixed

I've committed the changed, please verify them. Thanks.

> [classlib][awt] gl library depends on uxtheme.dll which is not present in Windows 2000
> --------------------------------------------------------------------------------------
>
>                 Key: HARMONY-3569
>                 URL: https://issues.apache.org/jira/browse/HARMONY-3569
>             Project: Harmony
>          Issue Type: Bug
>          Components: Classlib
>         Environment: Windows 2000
>            Reporter: Alexey Petrenko
>         Assigned To: Nathan Beyer
>            Priority: Critical
>         Attachments: HARMONY-3569-uxtheme-optional.patch, HARMONY-3569-WinThemeGraphics.patch, Harmony-3569-WinThemeGraphics.patch
>
>
> AWT uses uxtheme.dll only in one place.
> We should make this dependency optional.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (HARMONY-3569) [classlib][awt] gl library depends on uxtheme.dll which is not present in Windows 2000

Posted by "Andrey Pavlenko (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HARMONY-3569?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12488018 ] 

Andrey Pavlenko commented on HARMONY-3569:
------------------------------------------

> If I just add something like this after the lookup of the DrawThemeBackground, would this be okay? 

It's ok, but i don't think it's necessary. It's abnormal situation if this method is not found in the UXTheme library and in this case we will be notified with an error instead of silent return.

> Additionally, do we need some form of synchronization to protect the static fields?

AFAIU this method should not be invoked concurrently by multiple threads.

> [classlib][awt] gl library depends on uxtheme.dll which is not present in Windows 2000
> --------------------------------------------------------------------------------------
>
>                 Key: HARMONY-3569
>                 URL: https://issues.apache.org/jira/browse/HARMONY-3569
>             Project: Harmony
>          Issue Type: Bug
>          Components: Classlib
>         Environment: Windows 2000
>            Reporter: Alexey Petrenko
>         Assigned To: Nathan Beyer
>            Priority: Critical
>         Attachments: HARMONY-3569-WinThemeGraphics.patch, Harmony-3569-WinThemeGraphics.patch
>
>
> AWT uses uxtheme.dll only in one place.
> We should make this dependency optional.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (HARMONY-3569) [classlib][awt] gl library depends on uxtheme.dll which is not present in Windows 2000

Posted by "Nathan Beyer (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HARMONY-3569?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Nathan Beyer updated HARMONY-3569:
----------------------------------

    Attachment: HARMONY-3569-uxtheme-optional.patch

Check out this updated patch file. I've included the previous changes with some minor tweaks and I've changed the code in the other Win32 CPP file to check for null libuxtheme. I didn't know what the best return value would be for these methods in the case of a missing library, so I just returned 0.

As of right now, with this patch, I'm able to successfully run the AWT and Swing tests in the classlib over the IBMVM on Windows 2000, which is very nice and gets us one step closer.

> [classlib][awt] gl library depends on uxtheme.dll which is not present in Windows 2000
> --------------------------------------------------------------------------------------
>
>                 Key: HARMONY-3569
>                 URL: https://issues.apache.org/jira/browse/HARMONY-3569
>             Project: Harmony
>          Issue Type: Bug
>          Components: Classlib
>         Environment: Windows 2000
>            Reporter: Alexey Petrenko
>         Assigned To: Nathan Beyer
>            Priority: Critical
>         Attachments: HARMONY-3569-uxtheme-optional.patch, HARMONY-3569-WinThemeGraphics.patch, Harmony-3569-WinThemeGraphics.patch
>
>
> AWT uses uxtheme.dll only in one place.
> We should make this dependency optional.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (HARMONY-3569) [classlib][awt] gl library depends on uxtheme.dll which is not present in Windows 2000

Posted by "Andrey Pavlenko (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HARMONY-3569?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12488033 ] 

Andrey Pavlenko commented on HARMONY-3569:
------------------------------------------

Nathan, you are right. UxTheme is also used by 11 functions from org_apache_harmony_awt_nativebridge_windows_Win32.cpp...

LOAD_LIB(libUxTheme, "UxTheme"); should not cause an error, it should assign NULL to libUxTheme if the library was not found. I think the error is caused by one of the functions referencing UxTheme.

To workaround VM crash we could add to each function something like

    if (libUxTheme == NULL) {
    	return 0;
    }

But I don't know how it will behave on win2000.

> [classlib][awt] gl library depends on uxtheme.dll which is not present in Windows 2000
> --------------------------------------------------------------------------------------
>
>                 Key: HARMONY-3569
>                 URL: https://issues.apache.org/jira/browse/HARMONY-3569
>             Project: Harmony
>          Issue Type: Bug
>          Components: Classlib
>         Environment: Windows 2000
>            Reporter: Alexey Petrenko
>         Assigned To: Nathan Beyer
>            Priority: Critical
>         Attachments: HARMONY-3569-WinThemeGraphics.patch, Harmony-3569-WinThemeGraphics.patch
>
>
> AWT uses uxtheme.dll only in one place.
> We should make this dependency optional.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Assigned: (HARMONY-3569) [classlib][awt] gl library depends on uxtheme.dll which is not present in Windows 2000

Posted by "Nathan Beyer (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HARMONY-3569?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Nathan Beyer reassigned HARMONY-3569:
-------------------------------------

    Assignee: Nathan Beyer

> [classlib][awt] gl library depends on uxtheme.dll which is not present in Windows 2000
> --------------------------------------------------------------------------------------
>
>                 Key: HARMONY-3569
>                 URL: https://issues.apache.org/jira/browse/HARMONY-3569
>             Project: Harmony
>          Issue Type: Bug
>          Components: Classlib
>         Environment: Windows 2000
>            Reporter: Alexey Petrenko
>         Assigned To: Nathan Beyer
>            Priority: Critical
>         Attachments: Harmony-3569-WinThemeGraphics.patch
>
>
> AWT uses uxtheme.dll only in one place.
> We should make this dependency optional.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (HARMONY-3569) [classlib][awt] gl library depends on uxtheme.dll which is not present in Windows 2000

Posted by "Andrey Pavlenko (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HARMONY-3569?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Andrey Pavlenko updated HARMONY-3569:
-------------------------------------

    Attachment: HARMONY-3569-WinThemeGraphics.patch

I've removed asserts from the patch.

> [classlib][awt] gl library depends on uxtheme.dll which is not present in Windows 2000
> --------------------------------------------------------------------------------------
>
>                 Key: HARMONY-3569
>                 URL: https://issues.apache.org/jira/browse/HARMONY-3569
>             Project: Harmony
>          Issue Type: Bug
>          Components: Classlib
>         Environment: Windows 2000
>            Reporter: Alexey Petrenko
>         Assigned To: Nathan Beyer
>            Priority: Critical
>         Attachments: HARMONY-3569-WinThemeGraphics.patch, Harmony-3569-WinThemeGraphics.patch
>
>
> AWT uses uxtheme.dll only in one place.
> We should make this dependency optional.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Closed: (HARMONY-3569) [classlib][awt] gl library depends on uxtheme.dll which is not present in Windows 2000

Posted by "Nathan Beyer (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HARMONY-3569?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Nathan Beyer closed HARMONY-3569.
---------------------------------


> [classlib][awt] gl library depends on uxtheme.dll which is not present in Windows 2000
> --------------------------------------------------------------------------------------
>
>                 Key: HARMONY-3569
>                 URL: https://issues.apache.org/jira/browse/HARMONY-3569
>             Project: Harmony
>          Issue Type: Bug
>          Components: Classlib
>         Environment: Windows 2000
>            Reporter: Alexey Petrenko
>            Assignee: Nathan Beyer
>            Priority: Critical
>         Attachments: HARMONY-3569-uxtheme-optional.patch, HARMONY-3569-WinThemeGraphics.patch, Harmony-3569-WinThemeGraphics.patch
>
>
> AWT uses uxtheme.dll only in one place.
> We should make this dependency optional.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (HARMONY-3569) [classlib][awt] gl library depends on uxtheme.dll which is not present in Windows 2000

Posted by "Nathan Beyer (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HARMONY-3569?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12487992 ] 

Nathan Beyer commented on HARMONY-3569:
---------------------------------------

I think there's another file referencing UXTheme.

The file is - org_apache_harmony_awt_nativebridge_windows_Win32.cpp

I found this bit of code, which is causing a blow up.

    LOAD_LIB(libUxTheme, "UxTheme");

> [classlib][awt] gl library depends on uxtheme.dll which is not present in Windows 2000
> --------------------------------------------------------------------------------------
>
>                 Key: HARMONY-3569
>                 URL: https://issues.apache.org/jira/browse/HARMONY-3569
>             Project: Harmony
>          Issue Type: Bug
>          Components: Classlib
>         Environment: Windows 2000
>            Reporter: Alexey Petrenko
>         Assigned To: Nathan Beyer
>            Priority: Critical
>         Attachments: HARMONY-3569-WinThemeGraphics.patch, Harmony-3569-WinThemeGraphics.patch
>
>
> AWT uses uxtheme.dll only in one place.
> We should make this dependency optional.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (HARMONY-3569) [classlib][awt] gl library depends on uxtheme.dll which is not present in Windows 2000

Posted by "Pavel Dolgov (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HARMONY-3569?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12490023 ] 

Pavel Dolgov commented on HARMONY-3569:
---------------------------------------

Nathan's patch should fix the problem: the function IsThemeActive() will return zero on Win2000, so XP themes will not be used at all.

However, the file org_apache_harmony_awt_nativebridge_windows_Win32.cpp is machine generated, and if it will be re-generated, the problem could return. The re-generation may be needed if future fixes/enhancements will require WinAPI functions not listed in the WIn32 wrapper. 
The probability of such situation is quite low, actually.  This is just to let you know.

> [classlib][awt] gl library depends on uxtheme.dll which is not present in Windows 2000
> --------------------------------------------------------------------------------------
>
>                 Key: HARMONY-3569
>                 URL: https://issues.apache.org/jira/browse/HARMONY-3569
>             Project: Harmony
>          Issue Type: Bug
>          Components: Classlib
>         Environment: Windows 2000
>            Reporter: Alexey Petrenko
>         Assigned To: Nathan Beyer
>            Priority: Critical
>         Attachments: HARMONY-3569-uxtheme-optional.patch, HARMONY-3569-WinThemeGraphics.patch, Harmony-3569-WinThemeGraphics.patch
>
>
> AWT uses uxtheme.dll only in one place.
> We should make this dependency optional.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (HARMONY-3569) [classlib][awt] gl library depends on uxtheme.dll which is not present in Windows 2000

Posted by "Nathan Beyer (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HARMONY-3569?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12487946 ] 

Nathan Beyer commented on HARMONY-3569:
---------------------------------------

If I just add something like this after the lookup of the DrawThemeBackground, would this be okay?

        if (drawThemeBackground == NULL) {
            isUxThemeAvailable = false;
            return;
        }

Additionally, do we need some form of synchronization to protect the static fields?

> [classlib][awt] gl library depends on uxtheme.dll which is not present in Windows 2000
> --------------------------------------------------------------------------------------
>
>                 Key: HARMONY-3569
>                 URL: https://issues.apache.org/jira/browse/HARMONY-3569
>             Project: Harmony
>          Issue Type: Bug
>          Components: Classlib
>         Environment: Windows 2000
>            Reporter: Alexey Petrenko
>         Assigned To: Nathan Beyer
>            Priority: Critical
>         Attachments: HARMONY-3569-WinThemeGraphics.patch, Harmony-3569-WinThemeGraphics.patch
>
>
> AWT uses uxtheme.dll only in one place.
> We should make this dependency optional.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (HARMONY-3569) [classlib][awt] gl library depends on uxtheme.dll which is not present in Windows 2000

Posted by "Alexey Petrenko (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HARMONY-3569?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12487783 ] 

Alexey Petrenko commented on HARMONY-3569:
------------------------------------------

Andrey, your new patch does not check that DrawThemeBackground is found.

SY, Alexey


> [classlib][awt] gl library depends on uxtheme.dll which is not present in Windows 2000
> --------------------------------------------------------------------------------------
>
>                 Key: HARMONY-3569
>                 URL: https://issues.apache.org/jira/browse/HARMONY-3569
>             Project: Harmony
>          Issue Type: Bug
>          Components: Classlib
>         Environment: Windows 2000
>            Reporter: Alexey Petrenko
>         Assigned To: Nathan Beyer
>            Priority: Critical
>         Attachments: HARMONY-3569-WinThemeGraphics.patch, Harmony-3569-WinThemeGraphics.patch
>
>
> AWT uses uxtheme.dll only in one place.
> We should make this dependency optional.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (HARMONY-3569) [classlib][awt] gl library depends on uxtheme.dll which is not present in Windows 2000

Posted by "Andrey Pavlenko (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HARMONY-3569?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Andrey Pavlenko updated HARMONY-3569:
-------------------------------------

    Attachment: Harmony-3569-WinThemeGraphics.patch

I haven't win2000 installed, so I'm not able to check this patch, but I hope it should fix the issue. Could somebody check, please?

> [classlib][awt] gl library depends on uxtheme.dll which is not present in Windows 2000
> --------------------------------------------------------------------------------------
>
>                 Key: HARMONY-3569
>                 URL: https://issues.apache.org/jira/browse/HARMONY-3569
>             Project: Harmony
>          Issue Type: Bug
>          Components: Classlib
>         Environment: Windows 2000
>            Reporter: Alexey Petrenko
>            Priority: Critical
>         Attachments: Harmony-3569-WinThemeGraphics.patch
>
>
> AWT uses uxtheme.dll only in one place.
> We should make this dependency optional.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (HARMONY-3569) [classlib][awt] gl library depends on uxtheme.dll which is not present in Windows 2000

Posted by "Andrey Pavlenko (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HARMONY-3569?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12488388 ] 

Andrey Pavlenko commented on HARMONY-3569:
------------------------------------------

Great! So, if the AWT and Swing tests pass with your patch on win2000, i think it should be applied.

> [classlib][awt] gl library depends on uxtheme.dll which is not present in Windows 2000
> --------------------------------------------------------------------------------------
>
>                 Key: HARMONY-3569
>                 URL: https://issues.apache.org/jira/browse/HARMONY-3569
>             Project: Harmony
>          Issue Type: Bug
>          Components: Classlib
>         Environment: Windows 2000
>            Reporter: Alexey Petrenko
>         Assigned To: Nathan Beyer
>            Priority: Critical
>         Attachments: HARMONY-3569-uxtheme-optional.patch, HARMONY-3569-WinThemeGraphics.patch, Harmony-3569-WinThemeGraphics.patch
>
>
> AWT uses uxtheme.dll only in one place.
> We should make this dependency optional.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (HARMONY-3569) [classlib][awt] gl library depends on uxtheme.dll which is not present in Windows 2000

Posted by "Nathan Beyer (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HARMONY-3569?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12488112 ] 

Nathan Beyer commented on HARMONY-3569:
---------------------------------------

Yes, you're correct. The library load isn't causing the crash, it's the null pointer usage.

> [classlib][awt] gl library depends on uxtheme.dll which is not present in Windows 2000
> --------------------------------------------------------------------------------------
>
>                 Key: HARMONY-3569
>                 URL: https://issues.apache.org/jira/browse/HARMONY-3569
>             Project: Harmony
>          Issue Type: Bug
>          Components: Classlib
>         Environment: Windows 2000
>            Reporter: Alexey Petrenko
>         Assigned To: Nathan Beyer
>            Priority: Critical
>         Attachments: HARMONY-3569-WinThemeGraphics.patch, Harmony-3569-WinThemeGraphics.patch
>
>
> AWT uses uxtheme.dll only in one place.
> We should make this dependency optional.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.