LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

GetExternalModuleAddr returns address with unknown function name

I have a CVI 5.0.1 project that launches TestExec and loads a sequence without any trouble as long as the sequence is referencing my C source files. When I try to "Edit Paths" in the sequence editor to point to an object file, I get a general protection fault when I try to continue. The problem is in the sequence setup execution.

There fault occurs in TX_RunPrePostTest() (txengine.c) when theTestFuncPtr is accessed. Pointer is equal to theTest->hPreTest (gTXEngine.hMetaPreTest>hPreTest) which gets populated by GetExternalModuleAddr.

When the C source runs GetExternalModuleAddr returns an
address and shows the function name but when the OBJ is used GetExternalModuleAddr returns an address but states tha
t the function name is unknown.

One more bit of information, this was all working until a few additional functions were added to the source file making me think the OBJ file is too big. If I view the dynamic memory I can't get to the address that is returned by GetExternalModuleAddr. Is the stack getting corrupted somehow?

Thanks.

-Steve
0 Kudos
Message 1 of 3
(3,107 Views)
Sir,
Sorry for the long delay. We have come up with a few ideas. The GetExternalModuleAddr should only report an unknown function error if the function doesn't exist, the function hasn't been exposed, or you are using the wrong .obj file. We don't think there are any conditions where a .obj file would be too large, but we shouldn't rule that completely out. Was the .obj file working before you made these additions?

Daniel McChane
Application Engineer
National Instruments
0 Kudos
Message 2 of 3
(3,107 Views)
The call to GetExternalModuleAddr was not returning an error, it was returning a success. Looking at the variables window, GetExternalModuleAddr returned an address, next to the address it shows function name is unknown. Something like:

0A5D0023 (function name is unknown)

The obj was working prior to adding additional functions.

-Steve
0 Kudos
Message 3 of 3
(3,107 Views)