Bug 96671

Summary: Correctly detect windows 64-bit OS
Product: LibreOffice Reporter: Yousuf Philips (jay) (retired) <philipz85>
Component: LibreOfficeAssignee: Jakub KoĊ›cielak <kuba>
Status: RESOLVED FIXED    
Severity: normal CC: michael.meeks, momonasmon
Priority: medium    
Version: 5.1.0.0.alpha0+ Master   
Hardware: x86-64 (AMD64)   
OS: Windows (All)   
Whiteboard: target:24.8.0
Crash report or crash signature: Regression By:
Bug Depends on:    
Bug Blocks: 103202    

Description Yousuf Philips (jay) (retired) 2015-12-22 15:15:41 UTC
Steps:
1) Open a 32-bit version of LO on a windows 64-bit OS
2) Open the about dialog

screenshot - attachment 121497 [details]

Version: 5.2.0.0.alpha0+
Build ID: 014633f83e44ae8ba33087b6f38e8e253e281969
CPU Threads: 2; OS Version: Windows 6.1; UI Render: default; 
TinderBox: Win-x86@62-merge-TDF, Branch:MASTER, Time: 2015-12-15_06:21:44
Locale: en-US (en_US)

In order to correctly determine if its 64-bit, the registry key BuildLabEx needs to be examined from HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion. If it has amd64 in it (e.g. 7601.18717.amd64fre.win7sp1_gdr.150113-1808) it is a 64-bit system and if it has x86 in it (e.g. 6001.17387.x86fre.vistasp1_gdr.070927-1921) its a 32-bit system.

It might be useful to also grab EditionID (e.g. 'Professional') and/or CSDVersion (e.g. 'Service Pack 1') to include it as part of the 'OS Version' string.
Comment 1 Michael Meeks 2015-12-22 15:48:31 UTC
Ah - this is a good point; pwrt. 64bit builds on 32bit systems etc. I think we're more interested in the build than the system from a bug filing perspective; though prolly both are interesting.

Hmm =)
Comment 2 Yousuf Philips (jay) (retired) 2015-12-23 03:50:25 UTC
Yes from a bug filing perspective, the build would likely be the most important thing, but its important to gather correct details for it to be sent through the new 'Send OS version & simple hardware info' checkbox, as that would also likely be used in the user metrics data collection.

Is this issue also relevant to 32-bit linux builds on a 64-bit OS?

Are there plans to extend the sent info, as it would be good to also collect graphics hardware info like the gpu vendor, gpu name/code, opengl version, driver name, driver version?
Comment 3 Michael Meeks 2015-12-23 10:39:48 UTC
It would be nice to extend the sent info - but I think we need to get users to opt-in for this; so that will require new strings etc. for 5.2. I -hope- that for 5.2 we'll also have the UX metrics reporting too which will need something similar.
Comment 4 QA Administrators 2017-01-03 19:57:44 UTC Comment hidden (obsolete)
Comment 5 QA Administrators 2019-12-03 14:53:01 UTC Comment hidden (obsolete)
Comment 6 QA Administrators 2021-12-03 04:42:31 UTC Comment hidden (obsolete)
Comment 7 Mike Kaganski 2023-05-10 18:00:10 UTC
This could be made an easyhack.

The function to use is
https://learn.microsoft.com/en-us/windows/win32/api/wow64apiset/nf-wow64apiset-iswow64process

And also, conditionally, to support 32-bit-ion-Arm, we could get function address and call
https://learn.microsoft.com/en-us/windows/win32/api/wow64apiset/nf-wow64apiset-iswow64process2
Comment 8 Commit Notification 2024-05-11 15:46:58 UTC
kubak committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/dc03e4fd524384963bafc529d0843d048e159106

tdf#96671 - Correctly detect windows 64-bit OS

It will be available in 24.8.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 9 Commit Notification 2024-05-12 06:16:24 UTC
Mike Kaganski committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/0bcb62c6b71eb3f886e6d4885b1c2b691ce810b6

Related: tdf#96671 Also handle other Windows architectures

It will be available in 24.8.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.