Skip to main content

Notifications

Announcements

No record found.

Finance | Project Operations, Human Resources, ...
Suggested answer

Switching between companies makes GP use more memory each time until it runs out of memory

Posted on by 10

I Have GP2016 Release 16.00.0552 (R2)

Every time I change company without terminating the aplication, GP uses abount 5 more Mb or memory. Sometimes this number increases, and sometimes decreases, but on average continues to grow on each logon to company. This happneds without any aditional module (the most basic installation possible).

MI question is: Does anybody knows of a fix frm MS? Can I disable something? Any ideas on how can I solve this?

This is a problem because I developed a module that post transactions that is ready to post. When is done, it switches company and does this indefinitly. After about 4 hours running (some 400 company changes), the app crhash due to lack of memory.

Because of this I decided to set up the simplest out of the box installation, no aditional modules, nothing, but  2 new companies, then I started changing companies between company 1 and 2 and after some 10 iteratiosn, memory had increase from 102,840 KB to 130,492 KB.

I have disabled all panels for the user on the home screen.

After a lot of ccompany switching, the app crash with the follogin error.

First error on event log

Faulting application name: Dynamics.exe, version: 16.0.33.0, time stamp: 0x583359b7
Faulting module name: KERNELBASE.dll, version: 6.1.7601.24545, time stamp: 0x5e0eb7f5
Exception code: 0xe0434352
Fault offset: 0x0000c5af
Faulting process id: 0x1810
Faulting application start time: 0x01d6567168f12c5c
Faulting application path: C:\Program Files (x86)\Microsoft Dynamics\GP2016\Dynamics.exe
Faulting module path: C:\Windows\syswow64\KERNELBASE.dll
Report Id: c6860d49-c286-11ea-8b99-00155d010231

Second error on event log

Application: Dynamics.exe
Framework Version: v4.0.30319
Description: The process was terminated due to an unhandled exception.
Exception Info: System.OutOfMemoryException
at System.Windows.Forms.ToolStripItem.System.Windows.Forms.Layout.IArrangedElement.get_Properties()
at System.Windows.Forms.Layout.CommonProperties.GetMargin(System.Windows.Forms.Layout.IArrangedElement)
at System.Windows.Forms.ToolStripItem.SetAmbientMargin()
at System.Windows.Forms.ToolStripItem..ctor()
at System.Windows.Forms.ToolStripGrip..ctor()
at System.Windows.Forms.ToolStrip.get_Grip()
at System.Windows.Forms.ToolStrip.set_GripStyle(System.Windows.Forms.ToolStripGripStyle)
at System.Windows.Forms.ToolStripDropDown.Initialize()
at System.Windows.Forms.ToolStripDropDownMenu.Initialize()
at System.Windows.Forms.ToolStripDropDown..ctor()
at System.Windows.Forms.ToolStripDropDownMenu..ctor(System.Windows.Forms.ToolStripItem, Boolean)
at System.Windows.Forms.ToolStripMenuItem.CreateDefaultDropDown()
at System.Windows.Forms.ToolStripDropDownItem.get_DropDown()
at System.Windows.Forms.ToolStripDropDownItem.get_DropDownItems()
at DtwUIShellManagedToolbars.DestroyToolStripItem(System.Windows.Forms.ToolStripItem)
at DtwUIShellManagedToolbars.DestroyToolStripItem(System.Windows.Forms.ToolStripItem)
at DtwUIShellManagedToolbars.DestroyToolStripItem(System.Windows.Forms.ToolStripItem)
at DtwUIShellManagedToolbars.DestroyToolStripItem(System.Windows.Forms.ToolStripItem)
at DtwUIShellManagedToolbars.DestroyToolStripItem(System.Windows.Forms.ToolStripItem)
at DtwUIShellManagedToolbars.DestroyToolStrip(System.Windows.Forms.ToolStrip)
at DtwUIShellManagedToolbars.RemoveToolbar(UInt16)
at <Module>.dt_commandbar_remove_toolbar(UInt16)
at <Module>.TNT_new_event_loop(Int16 (HWND__*, EVENT*, Int16*), Int16, Int16)
at <Module>.dtw_run()
at <Module>._WinMainCRTStartup()

Dynamics.set

16
0
Microsoft Dynamics GP
346
Manufacturing
949
FieldService
1042
Interfund Management
1493
SmartList
1632
Cash Flow Management
1878
Excel-Based Budgeting
2277
Purchase Order Enhancements
2416
Control Account Management
2547
Enhanced Commitment Management
2992
CopierSeries
3104
Advanced Security
3278
Report Scheduler
4067
ML Checks
5597
HITB Report
6499
Dynamics Online Services
Windows
:C:Program Files (x86)/Microsoft Dynamics/GP2016/Dynamics.dic
:C:Program Files (x86)/Microsoft Dynamics/GP2016/Data/FORMS.DIC
:C:Program Files (x86)/Microsoft Dynamics/GP2016/Data/REPORTS.DIC
:C:Program Files (x86)/Microsoft Dynamics/GP2016/ICONMFG.DIC
:C:Program Files (x86)/Microsoft Dynamics/GP2016/Data/ICONFRMS.DIC
:C:Program Files (x86)/Microsoft Dynamics/GP2016/Data/ICONRPTS.DIC
:C:Program Files (x86)/Microsoft Dynamics/GP2016/SrvcAdv.DIC
:C:Program Files (x86)/Microsoft Dynamics/GP2016/Data/FRMS949.DIC
:C:Program Files (x86)/Microsoft Dynamics/GP2016/Data/RPTS949.DIC
:C:Program Files (x86)/Microsoft Dynamics/GP2016/IFund.dic
:C:Program Files (x86)/Microsoft Dynamics/GP2016/Data/1042FORM.DIC
:C:Program Files (x86)/Microsoft Dynamics/GP2016/Data/1042RPTS.DIC
:C:Program Files (x86)/Microsoft Dynamics/GP2016/EXP1493.dic
:C:Program Files (x86)/Microsoft Dynamics/GP2016/Data/EXP1493F.DIC
:C:Program Files (x86)/Microsoft Dynamics/GP2016/Data/EXP1493R.DIC
:C:Program Files (x86)/Microsoft Dynamics/GP2016/CFM.DIC
:C:Program Files (x86)/Microsoft Dynamics/GP2016/Data/CFMFORM.DIC
:C:Program Files (x86)/Microsoft Dynamics/GP2016/Data/CFMRPTS.DIC
:C:Program Files (x86)/Microsoft Dynamics/GP2016/XLBudget.dic
:C:Program Files (x86)/Microsoft Dynamics/GP2016/Data/XL1878F.DIC
:C:Program Files (x86)/Microsoft Dynamics/GP2016/Data/XL1878R.DIC
:C:Program Files (x86)/Microsoft Dynamics/GP2016/POE2277.DIC
:C:Program Files (x86)/Microsoft Dynamics/GP2016/Data/POE2277F.DIC
:C:Program Files (x86)/Microsoft Dynamics/GP2016/Data/POE2277R.DIC
:C:Program Files (x86)/Microsoft Dynamics/GP2016/CAM2416.dic
:C:Program Files (x86)/Microsoft Dynamics/GP2016/Data/CAMFORM.DIC
:C:Program Files (x86)/Microsoft Dynamics/GP2016/Data/CAMRPTS.DIC
:C:Program Files (x86)/Microsoft Dynamics/GP2016/ECM2547.DIC
:C:Program Files (x86)/Microsoft Dynamics/GP2016/Data/ECM2547F.DIC
:C:Program Files (x86)/Microsoft Dynamics/GP2016/Data/ECM2547R.DIC
:C:Program Files (x86)/Microsoft Dynamics/GP2016/QK2992.DIC
:C:Program Files (x86)/Microsoft Dynamics/GP2016/Data/QDF2992.DIC
:C:Program Files (x86)/Microsoft Dynamics/GP2016/Data/QKR2992.DIC
:C:Program Files (x86)/Microsoft Dynamics/GP2016/AdvSecur.dic
:C:Program Files (x86)/Microsoft Dynamics/GP2016/Data/ADVS_FRM.DIC
:C:Program Files (x86)/Microsoft Dynamics/GP2016/Data/ADVS_RPT.DIC
:C:Program Files (x86)/Microsoft Dynamics/GP2016/RPTSCHED.dic
:C:Program Files (x86)/Microsoft Dynamics/GP2016/Data/F3278.DIC
:C:Program Files (x86)/Microsoft Dynamics/GP2016/Data/R3278.DIC
:C:Program Files (x86)/Microsoft Dynamics/GP2016/MLChecks.dic
:C:Program Files (x86)/Microsoft Dynamics/GP2016/Data/4067F.DIC
:C:Program Files (x86)/Microsoft Dynamics/GP2016/Data/4067R.DIC
:C:Program Files (x86)/Microsoft Dynamics/GP2016/HTB5597.DIC
:C:Program Files (x86)/Microsoft Dynamics/GP2016/Data/HTBF5597.DIC
:C:Program Files (x86)/Microsoft Dynamics/GP2016/Data/HTBR5597.DIC
:C:Program Files (x86)/Microsoft Dynamics/GP2016/DO6499.DIC
:C:Program Files (x86)/Microsoft Dynamics/GP2016/Data/DO6499F.DIC
:C:Program Files (x86)/Microsoft Dynamics/GP2016/Data/DO6499R.DIC

Categories:
  • Suggested answer
    RE: Switching between companies makes GP use more memory each time until it runs out of memory

    Also I disabled all the home screen elements, hide all the elements from the left sidebar and the ribon look I Changed to menu (under User preference). All thos actions recude dramatically the memory usage but still grew by each company switch.

    Finnaly I had to force the Garbage collector for .Net To reduce the size of the memory used. For that I use the app PerfView.exe.

    But the final solution must bet provided by Microsoft.

  • RE: Switching between companies makes GP use more memory each time until it runs out of memory

    I'm using Dexterity to develop the module to change companies.

    Also if I change companies by hand me memory usage still grows so I'm sure is not my module, but a bug from GP, probably a memory leak every time I switch company.

    Also I notice if I change the "Windows command display" from Action pane to Menu bar, the memory growth seems slower. I'm running a test to measure how slower it is but will take hours. (by hand and automated).

    It seems it has to do with the Home page or the toobars. I'm always testing on an out of the box installation.

    I tried to change comapanies by hand (old mouse and keyboard) using openning the dictionary in dexterity in debug mode (plain dictionary, not even startup script), and the memory usage increase by 20% after 10 company switch.

  • steveendow Profile Picture
    steveendow 2,281 on at
    RE: Switching between companies makes GP use more memory each time until it runs out of memory

    Hi Hernan,

    What tool are you using for your posting and company switching?  Dex or .NET?

    My colleague said that he does recall seeing a memory issue when switching companies using the .NET AddIn. He says it was due to the .NET AddIn, and not GP itself.  He was able to resolve the issue through some change in the AddIn, but it was years ago, so he does not remember the solution.

    Steve

  • steveendow Profile Picture
    steveendow 2,281 on at
    RE: Switching between companies makes GP use more memory each time until it runs out of memory

    Hi Hernan,

    The original version of Post Master, Post Master Standard, ran inside of the full GP client to post batches, and switched companies.  But I don't recall this being an issue for our customers.

    I will check with my colleague to see if he recalls any customers having reliability or memory issues with Post Master Standard.

  • RE: Switching between companies makes GP use more memory each time until it runs out of memory

    My suspicions are on the home page, but unfortunatelly there is no way I know to completly disable the loading. Also could be the toolbars because that's there the crash started.

    I gues there is not much I can do.

  • RE: Switching between companies makes GP use more memory each time until it runs out of memory

    Thanks, I'll check this product but posting is one of the functionalities of the module.

  • Beat Bucher  GP Geek  GPUG All Star Profile Picture
    Beat Bucher GP Gee... 28,021 Super User 2024 Season 1 on at
    RE: Switching between companies makes GP use more memory each time until it runs out of memory

    Hi Hernan,

    Not much I can say .. other than GP probably wasn't designed with so many company switches in mind in such a short period of time thru a day..

    Basically, I'd suggest to look for a 3rd-party tools that does allow for batch posting without having to run GP at all.. this exists as .NET application and can be purchased not too expensively.

    It would solve your problem and you woulnd't have to develop your own solution.

    Check this out : http://envisagesoftware.com/post-master-for-dynamics-gp/

    Contact Steve Endow that would gladely provide you more details and 30-days trial license.

    Hope that helps.

  • Lucas Miller Profile Picture
    Lucas Miller on at
    RE: Switching between companies makes GP use more memory each time until it runs out of memory

    Hello Hernan,

    I did have something along these lines written up back in Dynamics GP 2013 and at that time it was addressed in GP 2015 R2.  In that case it had to do with not disposing of objects on the Dynamic GP home page when companies are switched, which eventually added up and caused the crash.  I see that you've disabled home page sections, but I imagine the ActiveX components are still loading anyway.

    If you're seeing this in a newer version of GP then either a) it didn't make it into GP 2016 for some reason or b) it is a new issue.  You'll want to open a new support case so we can track this and write it up if necessary.

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,280 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,214 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Product updates

Dynamics 365 release plans