web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics AX (Archived)

Dynamics Ax Crashes while debugging

(0) ShareShare
ReportReport
Posted on by

hi ,

code works  if i don't  add breakpoint.  but if I want to debug the code  ax  crashes .   it doesn't crash  on specific  part of code .  it  can  crash  in   any method .   code  connects to external web service .  do you know such problem  and how can i  help this ?   

most important is  , that  code works fine  without debugging .

*This post is locked for comments

I have the same question (0)
  • Anitha Eswaran Profile Picture
    312 on at

    Hi,

    Is this crash happening only with one process ? or across the environment?

    Regards,

    Anitha.E

  • Community Member Profile Picture
    on at

    one process .  

  • Anitha Eswaran Profile Picture
    312 on at

    Can you check in activity monitor and SQL trace.

    you will know if there are any blocks.

    anithasantosh.wordpress.com/.../trace-parser-ax2012

  • Vilmos Kintera Profile Picture
    46,149 on at

    You did not explain whether you use the AX debugger or Visual Studio, if you use soft or hard breakpoints. Provide more details.

  • Community Member Profile Picture
    on at

    i am using standard ax debugger.

    also  , when i  run the  class method from job , it works  with debugger too .  but  if  i debug run time , when  i call this methods from form for example,  ax crashes .

    in  new  method of the class i am initilizing  service object

    ClrObject clientType;
        PrxRSGEInvoice.ServiceReference1.NtosServiceSoapClient clientService;
        System.Exception ex;
        str serviceRef = "PrxRSGEInvoice.ServiceReference1.NtosServiceSoapClient";
        ;
        new InteropPermission(InteropKind::ClrInterop).assert();
        try
        {
           clientType = CLRInterop::getType(serviceRef);
           clientService = AifUtil::CreateServiceClient(clientType);
           serviceClient = clientService;
    
        }
        catch(Exception::CLRError)
        {
            ex = CLRInterop::getLastException();
            info(ex.ToString());
        }

    CLRObject serviceClient;  // in class declaration

    than i use serviceClient CLRObject  in different methods of the class.

    just  assign PrxRSGEInvoice.ServiceReference1.NtosServiceSoapClient clientService = serviceClient;

    and call clientService  service methods .

    it crashes  when i hit breakpoint   and  class is called from form .  i call  from job and from form with same parameters .

  • Verified answer
    Vilmos Kintera Profile Picture
    46,149 on at

    First of all unitck "Execute business operations in CIL" in your user options and see if that makes a difference (restart your client before debugging).

    Alternatively try Visual Studio debugger and see what happens there.

  • Community Member Profile Picture
    on at

    unchecking  didn't solve the issue . i will try  visual studio

  • Suggested answer
    Vilmos Kintera Profile Picture
    46,149 on at

    Does your AX client, AX AOS executable and AX debugger versions match? They must be on the same kernel patch level, otherwise communication protocol changes between versions could also result in crashes.

  • Verified answer
    Community Member Profile Picture
    on at

    i Debugged In Visual Studio . exception was thrown

    Unhandled exception at 0x77C66054 (ntdll.dll) in Ax32.exe: 0xC0000374: A heap has been corrupted (parameters: 0x77C82378).

    than i uncheck  to throw  this exception in CLR errors .  and debugging continued  without a problem . 

  • Vilmos Kintera Profile Picture
    46,149 on at

    So if debugging worked in VS, make sure you mark the suggested answer couple of posts above for that as verified as well.

    Cheers

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
Martin Dráb Profile Picture

Martin Dráb 4 Most Valuable Professional

#1
Priya_K Profile Picture

Priya_K 4

#3
MyDynamicsNAV Profile Picture

MyDynamicsNAV 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans