Open Forum

Expand all | Collapse all

GP crashes every time any VBA code is run

Jump to Best Answer
  • 1.  GP crashes every time any VBA code is run

    SILVER CONTRIBUTOR
    Posted 12 days ago

    We have almost completed a test upgrade from GP 2013 to 2018.  GP is running normally until any VBA code is run. GP is installed on Server 2019 with SQL 2018. We have quite a few customizations in GP2013 using VBA. The project files imported without errors and all VBA code looks normal in the Editor. But GP crashes anytime VBA code is run.

    To simplify testing I removed the modified Forms and Reports dictionaries and the Dynamics.vba files. I added a standard (unmodified) GP form and the "New" button on the form to VBA, and created this Sub;

    Private Sub New_AfterUserChanged()

    End Sub

    The form that I added to VBA works normally until I click the New button which fires the event and runs the Sub. This confirms that the issue is not due to specific code but with the VBA environment.

     

    The Application log shows the following error;

    GP01   1026       Error      .NET Runtime    Application         9/26/2019 9:53:21 AM

    Application: Dynamics.exe

    Framework Version: v4.0.30319

    Description: The process was terminated due to an unhandled exception.

    Exception Info: System.AccessViolationException

       at <Module>.TNT_new_event_loop(Int16 (HWND__*, EVENT*, Int16*), Int16, Int16)

       at <Module>.dtw_run()

       at <Module>._WinMainCRTStartup()

     

    Searching the error found this post;  https://community.dynamics.com/gp/f/microsoft-dynamics-gp-forum/110463/gp-2013-intermittent-crash/239914

    A reply in the thread included 7 possible causes and resolutions but none of them resolved our issue.

    #VBA #Upgrade 

    ​​​Thanks in advance for any suggestions.

    ------------------------------
    Jeff Martin
    Director of IT
    DeRosa Corporation
    Wauwatosa WI
    ------------------------------
    Conference-GPUG_200x200


  • 2.  RE: GP crashes every time any VBA code is run

    GOLD CONTRIBUTOR
    Posted 12 days ago
    Jeff,

    We had some small VB customs on our windows that ran for years (multiple upgrades) without needing any attention.  Then they started to intermittently crash GP after we upgraded to GP2018R2.  My MS partner identified the offending code and fixed/upgraded it for me quickly.

    Maybe you are in the same situation as me (not having any GP development/Dexterity skills on staff).  Sometimes having good VB skills isn't enough.

    Chris





    ------------------------------
    Chris Donnelly
    Sr Mgr of Info Systems and Financial Reporting
    Healthmark Industries
    ------------------------------

    Conference-GPUG_200x200


  • 3.  RE: GP crashes every time any VBA code is run

    TOP CONTRIBUTOR
    Posted 12 days ago
    What GP 2018 point release are you using? Windows Server​ 2019 is supported, but the System Requirements show Microsoft Windows Server 2019 Essentials Edition or Standard Edition (18.2.1007 GP version or later)

    Also here is a note on an Office/VBA issue...
    https://community.dynamics.com/gp/b/dynamicsgp/posts/dynamics-gp-crashes-closes-when-emailing-after-office-update


    ------------------------------
    David Morinello
    Senior Dynamics GP Systems Architect
    Ascend Learning, LLC
    Leawood KS
    ------------------------------

    Conference-GPUG_200x200


  • 4.  RE: GP crashes every time any VBA code is run

    Posted 12 days ago
    Edited by Stephen Hudson 12 days ago
    I've seen this issue in the past when the .NET framework either is corrupt or isn't at the correct version. This link has the pre-req's for GP2018 R2, just in case you haven't seen them yet. https://docs.microsoft.com/en-us/dynamics-gp/installation/system-requirements

    ------------------------------
    Stephen Hudson
    Dynamics GP Developer
    Independent Contractor
    ------------------------------

    Conference-GPUG_200x200


  • 5.  RE: GP crashes every time any VBA code is run
    Best Answer

    SILVER CONTRIBUTOR
    Posted 10 days ago
    Hello Jeff,

    You're running into a compatibility issue as Windows Server 2019 is not compatible with Dynamics GP 2018.  Support will be added with the Microsoft Dynamics GP (October 2019) release.  We've tested that release on Windows Server 2019 and VBA no longer causes the crash.

    We do not expect to port this compatibility back to previous versions of Dynamics GP.

    Let me know if you have any questions.

    ------------------------------
    Lucas Miller
    Support Escalation Engineer
    Microsoft
    Fargo, ND
    ------------------------------

    Conference-GPUG_200x200


  • 6.  RE: GP crashes every time any VBA code is run

    SILVER CONTRIBUTOR
    Posted 10 days ago
    Thank you Chris, David, Stephen, and Lucas for your replies.  As David and Lucas mentioned there are still some compatibility issues with Server 2019. Our Partner had discussed the issues with us prior to starting the upgrade and we decided it was best to move forward with Server 2019. Out of habit I started testing on the server instead of on a pc. I have now installed GP 2018 on a pc and begun me testing. So far all of our VBA modifications seem to have upgraded without any problems and are working. We will avoid using the GP client on the server until we can test it with the October release.

    ------------------------------
    Jeff Martin
    Director of IT
    DeRosa Corporation
    Wauwatosa WI
    ------------------------------

    Conference-GPUG_200x200


If you've found this thread useful, dive deeper into User Group community content by role