Exceptions calling GetUserId and GetOrganizationIds functions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎2025-04-15
10:35 AM
- last edited on
‎2025-04-21
05:18 PM
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
‎2025-04-29 03:16 PM
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
‎2025-04-30 10:17 AM
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
‎2025-04-30 01:38 PM
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
‎2025-04-30 01:57 PM
No, no debug libraries linked in release version.