Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9300247
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T22:44:27+00:00 2026-06-18T22:44:27+00:00

I am getting an win32 exception that I need help debugging. I have a

  • 0

I am getting an win32 exception that I need help debugging. I have a SharePoint page that has a custom Web Part that when I browse to that page, I get the following message:

In w3wp.dmp the assembly instruction at ntdll!RtlReportCriticalFailure+62 in 
C:\Windows\System32\ntdll.dll from Microsoft Corporation has caused an unknown
exception (0xc0000374) on thread 43

Unhandled exception at 0xHEX in w3wp.exe: 0xc0000374: 
A heap has been corrupted

I don’t really know where to begin debugging this issue and searching the internet has yielded very little results.

I have saved the DMP file and I’ve loaded it into the Debug Diagnostic Tool for analysis. I don’t know what parts are most important, so if someone could tell me which sections I should post, I will post them.

Where I think the problem is:

I have narrowed down the location of where the problem might be. If I don’t call these methods, I don’t get the error. Is there something wrong with the way I’m accessing the TermStore?

    private void GetTerms()
    {
        using (SPSite site = new SPSite(PhaseListUrl.Value))
        {
            var session = new TaxonomySession(site);
            if (session.TermStores == null || session.TermStores.Count == 0) return;

            OfficeDropdown.Items.Clear();
            OfficeDropdown.Items.Add("");

            var termStore = session
                .TermStores
                .FirstOrDefault(ts => ts.Groups.Any(g => g.Name == TaxonomyName.Value));
            try
            {
                var group = termStore.Groups[TaxonomyName.Value];
                foreach (var ts in group.TermSets)
                {
                    if (!ts.IsAvailableForTagging) continue;

                    AddTerms(site, termStore, ts.Id, ts.Terms);
                }
            }
            catch (NullReferenceException) { OfficeDropdown.Items.Add("ERROR: Check your Org Term Store Name"); }
            catch (ArgumentOutOfRangeException) { OfficeDropdown.Items.Add("ERROR: Check your Org Term Store Name"); }
        }
    }

    private void AddTerms(SPSite site, TermStore termStore, Guid tsId, TermCollection coll)
    {
        foreach (var t in coll)
        {
            if (t.IsAvailableForTagging)
            {
                var wssIds = TaxonomyField.GetWssIdsOfTerm(site, termStore.Id, tsId, t.Id, true, 1000);

                if (wssIds.Length != 0)
                {
                    var id = wssIds[0];
                    var validatedString = string.Format("{0};#{1}{2}{3}", id, t.Name, TaxonomyField.TaxonomyGuidLabelDelimiter, t.Id);
                    OfficeDropdown.Items.Add(new ListItem(t.Name, validatedString));
                }
                else
                {
                    int id = -1;
                    var value = new TaxonomyFieldValue(SPContext.Current.Web.AvailableFields[new Guid("{a64c1f69-c0d6-421a-8c8a-9ef8f459d7a2}")]);
                    value.TermGuid = t.Id.ToString();

                    var dummy = value.ValidatedString;
                    if (dummy != null)
                        id = value.WssId;

                    var validatedString = string.Format("{0};#{1}{2}{3}", id, t.Name, TaxonomyField.TaxonomyGuidLabelDelimiter, t.Id);
                    OfficeDropdown.Items.Add(new ListItem(t.Name, validatedString));
                }
            }
            AddTerms(site, termStore, tsId, t.Terms);
        }
    }

UPDATE:

The bug was in the TaxonomyField. I was accessing terms cross site collection and the IDs hadn’t been generated. Also look out for TermStore IDs not being the same cross site collection (and know where you are calling from and where you are calling to!)

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-18T22:44:29+00:00Added an answer on June 18, 2026 at 10:44 pm

    Here are some suggestions.

    1. Pull up ULS Log Viewer and study the logs, if you hit the page and get that error, it should be logged there.

    2. Check the application event logs on the web front-end server(s).

    3. Have you also tried attaching to the W3P.exe process and debug the solution? (Assuming it’s not the production environment of course).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm attempting to use code I've found that uses Win32. However, I'm getting this
After I have changed my dll containing my custom control I am getting warnings
Getting extremely confused with an adminhtml module i'm trying to write! Effectively I have
Getting 'Dispatcher has no subscribers' error while trying to post message to a channel
Getting red warning message that expected identifier for this statement CALayer = ImageView.layer; Using
Getting this weird LINQ error. title = System.Linq.Enumerable+WhereSelectEnumerableIterator`2[System.Xml.Linq.XElement,System.String Here is the code I have:
I have been using Process.Start to launch executables (.exe) files. Now I need to
I'm getting reports from a WPF application that is deployed in the field that
I have an unmanaged C++ MFC dll that was developed in VS 6.0. I
I am getting a strange unhandled exception when I click the linklabel which should

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.