Help with callback functions

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #10797
    AnonymousNatalia Sostre
    Spectator

    I keep getting memory access issues when invoking the functions that use the callback functions.
    I am using VS C++ and in debug mode this function works OK Edit_DebugEdit
    However same exact thing does not work on the server (release version) I want this on, crashes with 0x00000C memory error after reading one of the messages from the edits engine.

    Also, locally on VS C++ in DEbug mode, the call to functions Edit_RunEdits fails altogether – memory error there.

    Any sample code would be appreciated.

    I am using a console application; calls to Edit_LoadEditSet and Edit_Initialize works just fine – but I think it is because there are no call back functions to them.

    #10805

    The EDITS50 API documentation provides C++ code samples for all functions. Go to the page for Edit_RunEdits, and follow the link at the bottom for C++ code sample.

    Additionally, since you are writing a console app using Visual Studio, you could retrieve the archive containing the Linux binaries from the EDITS50 download page (https://www.cdc.gov/cancer/npcr/tools/edits/edits50.htm – scroll to the bottom of the page and download EDITS50_for_Linux_2017Feb20.zip). It contains C++ source for a console demo app, called RunEdits50, and a make file for g++. Just set up a new project in VC++, import the source files, and build it. The app demonstrates many features of EDITS50, including running edits, generating feedback to an Html page. (Note: you will probably want to update the variables at the top of function main; this sample was written back when the current metafile was at v15.)

    #10806
    AnonymousNatalia Sostre
    Spectator

    Thank you so much. I was able to figure out the issue. Now I am able to get the messages from the callback functions successfully. I have a console application on my machine Windows 7 64 bit and both the debug and release versions work correctly now.

    However, when I placed it on a Windows 2012 64 bit Server, the console application is able to get the first message from the callback function (after running RunEdits or Summary methods), but then it crashes after the first message is read. If you have any suggestions on that I would appreciate it. Thanks again.

    #10807

    Sorry, I don’t have any suggestions regarding why your application would run in one environment but not another.

    As a test, could you install EditWriter-64 bit on your 2012 server and use it to run edits? (Use the Edit Set/run edits feature of that program to generate a report.) If that fails, it could indicate something is needed in your server environment. (EditWriter is written using C++11 and does not require any supporting frameworks.)

    Perhaps somebody else reading this forum who works with Win2012-64 will offer some insight.

    #10808
    AnonymousNatalia Sostre
    Spectator

    I compiled and ran the sample c++ project referenced in EDITS50_for_Linux_2017Feb20.zip.
    It works OK on windows 7 64 bit. But the very same application also fails on the Windows Server 2012 64 bit OS.
    You should be able to recreate using the same project provided in EDITS50_for_Linux_2017Feb20.zip
    I am using Visual Studio 2015 to compile the sample project.

    #10809

    Unfortunately, I cannot be of further assistance, for the following reasons:

    1. I do not have access to a Windows 2012 server.
    2. I am retired; I just subscribe to this forum in the spirit of “peer support”, in case I can easily answer a question posted here.

    You might try contacting NPCR directly, to see if they can help you. Email to [email protected]

    Does the test application work at all? If so, how far does it get?

    #10810

    EDITS50.dll is built with Visual Studio 2017, Platform Toolset Visual Studio 2017 (v141).

    I have been running searches on DuckDuckGo using key words C++ DLL Windows Server 2012 and variations, and finding discussions concerning Windows API function LoadLibrary and its (possible) dependence on the operating system’s C runtime library.

    So it would be very helpful to know where in the source code the application is failing, and what error messages are displayed (if any). This might involve embedding more std::cout statements in the source code.

    I do think the problem has to do with the environment, and perhaps adding one or more OS libraries to the system directory (e.g., C:\Windows\SysWOW64 or its Win2012 equivalent). If you have a network admin, could (s)he help you debug this?

Viewing 7 posts - 1 through 7 (of 7 total)
  • The forum ‘Technical – programmers requesting help with implementing the API’ is closed to new topics and replies.

Copyright © 2018 NAACCR, Inc. All Rights Reserved | naaccr-swoosh-only See NAACCR Partners and Sponsors