View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0030761 | Community | OCCT:Application Framework | public | 2019-06-02 18:39 | 2019-06-16 11:39 |
Reporter | Vico Liang | Assigned To | bugmaster | ||
Priority | normal | Severity | block | ||
Status | closed | Resolution | fixed | ||
Product Version | 7.1.0 | ||||
Target Version | 7.4.0 | Fixed in Version | 7.4.0 | ||
Summary | 0030761: Application Framework - HOMEDRIVE and TEMP are undefined on UWP | ||||
Description | It's impossible to save or open any document of OCAF. There are exception in below function, HOMEDRIVE and TEMP environment are undefined on UWP. TCollection_ExtendedString CDF_FWOSDriver::DefaultFolder() { TCollection_ExtendedString theDefaultFolder; if (theDefaultFolder.Length() == 0) { #ifdef _WIN32 TCollection_ExtendedString hd=UTL::xgetenv("HOMEDRIVE"); if(hd.Length() != 0) { theDefaultFolder=hd; theDefaultFolder+=UTL::xgetenv("HOMEPATH"); } else { theDefaultFolder=UTL::xgetenv("TEMP"); if(theDefaultFolder.Length()==0) throw Standard_Failure("cannot determine default folder; HOMEDRIVE and TEMP are undefined"); } #else TCollection_ExtendedString home=UTL::xgetenv("HOME"); if(home.Length() !=0) theDefaultFolder = home; else theDefaultFolder= TCollection_ExtendedString("/tmp"); #endif } return theDefaultFolder; } | ||||
Steps To Reproduce | Not required | ||||
Tags | No tags attached. | ||||
Test case number | Not required | ||||
|
Branch CR30761 has been created by mpv. SHA-1: a89a076d90d7be0e67fda0977476562c57dcf5ea Detailed log of new commits: Author: mpv Date: Mon Jun 3 16:05:25 2019 +0300 30761: HOMEDRIVE and TEMP are undefined on UWP Avoid CDF_Stroe to find default folder since there is no case where this folder does not reset to exact value given by the user. Also, remove the exception raising for the case this method is called from outside. |
|
Dear mpv, I got your patch and build it for UWP. though the exception is gone away, it still can't save and load any ocaf document on UWP. There are error PCDM_RS_UnknownDocument when call PCDM_ReaderStatus TDocStd_Application::Open (const TCollection_ExtendedString& path, Handle(TDocStd_Document)& aDoc). The same code works on windows 10, but not working on uwp. Could you please take a look at it? thanks. |
|
There is no environment variables on UWP since it run in a sandbox. So occt should process all environment variables specially on uwp. |
|
Dear Vico, OCCT already has a mechanism to open/save documents wihtout usage of resource files and special variables referencing to that files and drivers libraries: https://www.opencascade.com/doc/occt-7.3.0/overview/html/occt_user_guides__ocaf.html#occt_ocaf_4_3_format You may just link (for an example, binary) drivers directly to your application by call: BinDrivers::DefineFormat (app); Where "app" is your TDocStd_Application instance. It may be done on creation of the application or just before save/open of the document. |
|
Actually I do it without resource files. It doesn't work. I can't debug the code in vs2017, don't know why, otherwise more details can be provided. |
|
So, the original problem is fixed. SZY, please review the fix. No regressions are detected: http://vm-jenkins-test-12.nnov.opencascade.com:8080/job/CR30761-master-MPV-Products-Windows-64-VC14-opt-test-compare/1/ at http://vm-jenkins-test-12.nnov.opencascade.com:8080/job/CR30761-master-MPV-Products-Debian80-64-opt-test-compare/1/ |
|
I have reported another bug 0030769 about the file open/save. |
|
Reviewed. |
|
Fix has been tested on combination master/master |
|
Now all are right Combination - OCCT branch : CR30761 master SHA - a89a076d90d7be0e67fda0977476562c57dcf5ea d67d4b811012eef8913d3c535c29654d0acf3c4c Products branch : master SHA - 77ee1bd5095e6eb90974be94ecc6b503a187125a was compiled on Linux, MacOS and Windows platforms and tested in optimize mode. Number of compiler warnings: No new/fixed warnings Regressions/Differences/Improvements: No regressions/differences CPU differences: Debian80-64: OCCT Total CPU difference: 16288.120000000074 / 16197.160000000013 [+0.56%] Products Total CPU difference: 771.9299999999893 / 771.9399999999893 [-0.00%] Windows-64-VC14: OCCT Total CPU difference: 17747.203125 / 17603.203125 [+0.82%] Products Total CPU difference: 12117.703125 / 12092.375 [+0.21%] Image differences : No differences that require special attention Memory differences : No differences that require special attention |
|
Branch CR30761 has been deleted by inv. SHA-1: a89a076d90d7be0e67fda0977476562c57dcf5ea |
occt: master 7f662bf4 2019-06-03 13:05:25
Committer: bugmaster Details Diff |
0030761: Application Framework - HOMEDRIVE and TEMP are undefined on UWP Avoid CDF_Stroe to find default folder since there is no case where this folder does not reset to exact value given by the user. Also, remove the exception raising for the case this method is called from outside. |
Affected Issues 0030761 |
|
mod - src/CDF/CDF_FWOSDriver.cxx | Diff File | ||
mod - src/CDF/CDF_Store.cxx | Diff File |
Date Modified | Username | Field | Change |
---|---|---|---|
2019-06-02 18:39 | Vico Liang | New Issue | |
2019-06-02 18:39 | Vico Liang | Assigned To | => mpv |
2019-06-03 04:31 | Vico Liang | Severity | minor => block |
2019-06-03 16:06 | git | Note Added: 0084770 | |
2019-06-03 16:28 | kgv | Product Version | 7.4.0 => 7.1.0 |
2019-06-03 16:28 | kgv | Summary | HOMEDRIVE and TEMP are undefined on UWP => Application Framework - HOMEDRIVE and TEMP are undefined on UWP |
2019-06-03 17:55 | Vico Liang | Note Added: 0084772 | |
2019-06-03 17:57 | Vico Liang | Note Edited: 0084772 | |
2019-06-04 08:15 | Vico Liang | Note Added: 0084789 | |
2019-06-04 12:17 |
|
Note Added: 0084802 | |
2019-06-04 18:56 | Vico Liang | Note Added: 0084825 | |
2019-06-05 09:47 |
|
Note Added: 0084842 | |
2019-06-05 09:47 |
|
Assigned To | mpv => szy |
2019-06-05 09:47 |
|
Status | new => resolved |
2019-06-05 09:47 |
|
Steps to Reproduce Updated | |
2019-06-05 17:53 | Vico Liang | Note Added: 0084897 | |
2019-06-05 17:53 | Vico Liang | Relationship added | related to 0030769 |
2019-06-13 12:03 |
|
Note Added: 0085028 | |
2019-06-13 12:03 |
|
Assigned To | szy => bugmaster |
2019-06-13 12:03 |
|
Status | resolved => reviewed |
2019-06-13 16:11 | bugmaster | Note Added: 0085033 | |
2019-06-13 16:12 | bugmaster | Assigned To | bugmaster => mpv |
2019-06-13 16:12 | bugmaster | Status | reviewed => assigned |
2019-06-13 19:49 | bugmaster | Note Added: 0085042 | |
2019-06-13 19:50 | bugmaster | Status | assigned => resolved |
2019-06-13 19:50 | bugmaster | Assigned To | mpv => bugmaster |
2019-06-13 19:50 | bugmaster | Status | resolved => reviewed |
2019-06-13 19:51 | bugmaster | Status | reviewed => tested |
2019-06-13 19:51 | bugmaster | Test case number | => Not required |
2019-06-15 16:04 | bugmaster | Changeset attached | => occt master 7f662bf4 |
2019-06-15 16:04 | bugmaster | Status | tested => verified |
2019-06-15 16:04 | bugmaster | Resolution | open => fixed |
2019-06-16 11:39 | git | Note Added: 0085070 |