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 SL (Archived)

Dynamics SL 2015 SDK Upgrade Error 5046

(0) ShareShare
ReportReport
Posted on by 6,451

Upgrading a SL 2011 SDK project to SL 2015.  Have done this with other projects, and had success.  One particular project is throwing System Message 5046 "Invalid memory array handle passed to kernel" when running the project in Debug Mode.  Cannot figure out what the problem is.  Anyone have any thoughts they can share on what to review?

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    Community Member Profile Picture
    on at

    Mark, not sure if this helps or not but one of my projects got that error after converting to SL 2015 and I found out it was caused by the code not detecting an empty array (empty because no data was found to populate it).

  • Mark E Profile Picture
    6,451 on at

    Rick,

    Thanks, but not sure that is my problem here.  I went ahead and commented out some basic code in the Form_Load event, and now I am seeing this:

    System.AccessViolationException was unhandled

     HResult=-2147467261

     Message=Attempted to read or write protected memory. This is often an indication that other memory is corrupt.

     Source=System.Windows.Forms

     StackTrace:

          at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageA(MSG& msg)

          at System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(IntPtr dwComponentID, Int32 reason, Int32 pvLoopData)

          at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)

          at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)

          at System.Windows.Forms.Application.Run(ApplicationContext context)

          at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.OnRun()

          at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.DoApplicationModel()

          at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.Run(String[] commandLine)

          at EM17100.My.MyApplication.Main(String[] Args) in 17d14f5c-a337-4978-8281-53493378c1071.vb:line 81

     InnerException:

  • Community Member Profile Picture
    on at

    Without seeing the actual project it is hard to be of much help.  I am assuming the project is for a screen.  Does the screen contain an SL grid object?  If so, what is the DBNAV for the grid?  At what point does the error occur?  During form load or after entering something on the screen?

  • Mark E Profile Picture
    6,451 on at

    Yes, a screen that is loading a grid.  DBNAV for the grid is "SOHeader_all", "bcompany.cpnyid"; 0; 0; 0; 0, "bcustomer.custid"; 0; 0; 0; 1,

    Error happens when loading the project, cannot get past that action.

    I'm baffled currently...

  • Community Member Profile Picture
    on at

    I suspect, and that is only a guess, that there is something wrong with the grid control since SL grids use a memory array and this error is related to an attempt to access an array out of bounds of the array.  I am also assuming that this project works fine under SL 2011.  For what it is worth, I have lots of projects that use SL grid controls and have not encountered a problem with SL 2015 grids on projects converted from 2011 to 2015 so I do not believe it is a basic conversion problem.  Sorry I could not be of that much help.

  • Mark E Profile Picture
    6,451 on at

    I tried replacing the DSLGrid control, but that did not change the results.  Thanks for the suggestions, though.  I'll keep researching.

  • Verified answer
    Mark E Profile Picture
    6,451 on at

    OK, I went back to ground zero, started the conversion process over again, changed the Target Framework to .NET Framework 4, replaced any missing or invalid references, and seem to have it working.  The problem might have been in the initial pass of running the DynamicsSLSDKConversion.exe Utility, I had selected the option to "Remove Assembly Reference", which may have buggered up the conversion.

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 SL (Archived)

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans