Closed joohwankimNV closed 1 year ago
I believe this issue is sourced from the result of getenv("USERNAME")
( a const char *
) coming back as a null pointer. This then fails the assignment to the info.username
(a G3D::String
) in line 7. We need to dig a bit deeper on this, but there should probably be a null check on the result of getenv("USERNAME")
before we directly assign this value to the info.username
field.
Can confirm that this matches the documented behavior of std::getenv()
. The null return value is expected for a value not in the environment variable. We should certainly null check these values in FPSci and report some default value (like "unknown"
) when nulls are returned.
getenv("USERNAME")
(at line 7 ofSystemInfo.cpp
) sometimes throws access violation exception. This happened to me when I newly reinstalled my Windows 10. Seems like a bug on the Windows side, specifically the installation process.While waiting for a solution, here is how I get around it. The exception is resolved when I manually set the username by doing
Windows Key + R
-> typenetplwiz
-> double click on my user account -> enter a user name