Exceptions calling GetUserId and GetOrganizationIds functions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2 weeks ago
- last edited
2 weeks ago
by
Laszlo Nagy
I made some tests with GSID functions to get user ID and organization IDs but there are some issues.
This is the code:
GS::UniString userStr;
GS::UniString orgsStr;
auto gsid = ACAPI::CreateGSIDObject();
if (!gsid.IsErr())
{
auto userId = gsid->GetUserId();
if (userId.IsOk())
userStr = *userId;
auto userOrgs = gsid->GetOrganizationIds();
if (userOrgs.IsOk())
{
for (const auto& userOrg : *userOrgs)
{
orgsStr += userOrg + ", ";
}
}
}
I tried this code on Windows in Archicad 27 and 28 with same behavior.
If there is no logged user in Archicad there is an exception when class
destructor of "userId" is called at the end.
If there is a logged user in Archicad instead userId is OK, but the line
"for (const auto& userOrg : *userOrgs)" raises an exception.
Thanks in advice
- Labels:
-
Possible Bug
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Tuesday
Does the same thing happen with both release and debug builds? And is this on macOS or Windows?
Central Innovation
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Wednesday
The issue is only on Windows and happens with both debug and release versions.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Wednesday
Is your release build linking against any debug libraries, e.g. MSVCRTD.lib?
Central Innovation
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Wednesday
No, no debug libraries linked in release version.