Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Each gRPC client call logs "ERROR: THIS POINTER IS NOT REGISTERED" #270

Closed
bkeryan opened this issue Jun 20, 2023 · 3 comments
Closed

Each gRPC client call logs "ERROR: THIS POINTER IS NOT REGISTERED" #270

bkeryan opened this issue Jun 20, 2023 · 3 comments
Labels
type: bug Something isn't working type: showstopper Issues that are blocking a client's release and need immediate attention.

Comments

@bkeryan
Copy link
Collaborator

bkeryan commented Jun 20, 2023

Bug Report

If you build a measurement service into an EXE and statically register it with the MeasurementLink discovery service, it logs "ERROR: THIS POINTER IS NOT REGISTERED".

This error comes from https://github.com/ni/grpc-labview/blob/master/src/pointer_manager.h

It is looking up the client context from contextId. This parameter is optional, so leaving it unwired should not log errors.

 	labview_grpc_server.dll!grpc_labview::PointerManager<grpc_labview::gRPCid>::TryCastTo<grpc_labview::ClientContext>(grpc_labview::gRPCid * ptr, int * status) Line 75	C++
 	labview_grpc_server.dll!grpc_labview::gRPCid::CastTo<grpc_labview::ClientContext>() Line 43	C++
>	labview_grpc_server.dll!ClientUnaryCall(grpc_labview::gRPCid * clientId, int * occurrence, const char * methodName, const char * requestMessageName, const char * responseMessageName, char * requestCluster, grpc_labview::gRPCid * * callId, int timeoutMs, grpc_labview::gRPCid * contextId) Line 277	C++
 	000001b5208f61b4()	Unknown
 	LabVIEW.exe!DoCaughtExtFuncCall(long(*)(DSHeader *) funcPtr, DSHeader * dsp) Line 109	C++
 	LabVIEW.exe!ExtFuncWrapper(long(*)(DSHeader *) funcPtr, void * pSetTLSIndex, long bExcludeTryCatch, DSHeader * dsp, long qeOffset) Line 241	C++
 	000001b5208f50fe()	Unknown

Repro or Code Sample

Build MeasurementLink example measurements into EXEs.
Copy the build output to C:\ProgramData\National Instruments\MeasurementLink\Services
Run the measures in InstrumentStudio.
Look at C:\ProgramData\National Instruments\MeasurementLink\Logs\DiscoveryService.txt

Expected Behavior

Does not log unexpected errors.

Current Behavior

Logs unexpected errors:

===== 06/14/2023 14:46:03 ===== Information: Launching service "UI Progress Updates (LabVIEW)" at path: "C:\ProgramData\National Instruments\MeasurementLink\Services\UI Progress Updates\UI Progress Updates.exe"
===== 06/14/2023 14:46:05 ===== Information: "UI Progress Updates (LabVIEW)": "Server listening on localhost:0"
===== 06/14/2023 14:46:05 ===== Information: "UI Progress Updates (LabVIEW)": "ERROR: THIS POINTER IS NOT REGISTERED"
===== 06/14/2023 14:46:05 ===== Information: HTTP "POST" "/ni.measurementlink.discovery.v1.DiscoveryService/ResolveService" responded 200 in 1863.6233 ms
===== 06/14/2023 14:46:05 ===== Information: HTTP "POST" "/ni.measurementlink.discovery.v1.DiscoveryService/RegisterService" responded 200 in 1.1826 ms
===== 06/14/2023 14:46:05 ===== Information: HTTP "POST" "/ni.measurementlink.discovery.v1.DiscoveryService/ResolveService" responded 200 in 0.1295 ms
===== 06/14/2023 14:46:37 ===== Information: Launching service "NI-DCPower Source DC Voltage (LabVIEW)" at path: "C:\ProgramData\National Instruments\MeasurementLink\Services\NI-DCPower Measurement\NI-DCPowerMeasurement.exe"
===== 06/14/2023 14:46:38 ===== Information: "NI-DCPower Source DC Voltage (LabVIEW)": "Server listening on localhost:0"
===== 06/14/2023 14:46:38 ===== Information: "NI-DCPower Source DC Voltage (LabVIEW)": "ERROR: THIS POINTER IS NOT REGISTERED"
===== 06/14/2023 14:46:38 ===== Information: HTTP "POST" "/ni.measurementlink.discovery.v1.DiscoveryService/ResolveService" responded 200 in 1895.3099 ms
===== 06/14/2023 14:46:38 ===== Information: HTTP "POST" "/ni.measurementlink.discovery.v1.DiscoveryService/RegisterService" responded 200 in 1.0880 ms
===== 06/14/2023 14:46:39 ===== Information: HTTP "POST" "/ni.measurementlink.discovery.v1.DiscoveryService/ResolveService" responded 200 in 0.0981 ms
===== 06/14/2023 14:46:39 ===== Information: "PinMapService": "[14:46:39 INF] HTTP POST /ni.measurementlink.pinmap.v1.PinMapService/UpdatePinMapFromXml responded 200 in 24.2984 ms"
===== 06/14/2023 14:46:39 ===== Information: "PinMapService": "[14:46:39 INF] HTTP POST /ni.measurementlink.pinmap.v1.PinMapService/QueryPins responded 200 in 0.2363 ms"
===== 06/14/2023 14:46:39 ===== Information: HTTP "POST" "/ni.measurementlink.discovery.v1.DiscoveryService/ResolveService" responded 200 in 0.0848 ms
===== 06/14/2023 14:46:41 ===== Information: "NI-DCPower Source DC Voltage (LabVIEW)": "ERROR: THIS POINTER IS NOT REGISTERED"
===== 06/14/2023 14:46:41 ===== Information: HTTP "POST" "/ni.measurementlink.discovery.v1.DiscoveryService/ResolveService" responded 200 in 0.0845 ms
===== 06/14/2023 14:46:41 ===== Information: "NI-DCPower Source DC Voltage (LabVIEW)": "ERROR: THIS POINTER IS NOT REGISTERED"
===== 06/14/2023 14:46:41 ===== Information: Launching service "NI gRPC Device Server" at path: "C:\Program Files\National Instruments\Shared\MeasurementLink\Services\gRPC Device Server Activation\NationalInstruments.MeasurementLink.GrpcDeviceServerActivationService.exe"
===== 06/14/2023 14:46:42 ===== Information: "NI-DCPower Source DC Voltage (LabVIEW)": "ERROR: THIS POINTER IS NOT REGISTERED"

Context

Testing a new example MeasurementLink service

Your Environment

  • OS & Device: Windows 10
  • ni-measurement-service version: 1.0.1
  • grpc-labview version: 1.0.0.1
  • MeasurementLink version: 23.3

AB#2427675

@Rohith-Grandhi Rohith-Grandhi added type: bug Something isn't working type: showstopper Issues that are blocking a client's release and need immediate attention. labels Jun 21, 2023
@twaltersp
Copy link

We are seeing the same bug in the ADAS offering. We are not doing anything with ML but if we create a client on RT that connects to the server (also on RT) we get this printed to the screen. The client and server still seem to function correctly.

@twaltersp
Copy link

@ni-sujain Is there a planned next build/release that will include this fix?
FYI @gaoruhao

@ni-sujain
Copy link
Collaborator

ni-sujain commented Jun 30, 2023

@twaltersp We will be doing a release for oneof datatype support in some days. This fix might come along with that release

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug Something isn't working type: showstopper Issues that are blocking a client's release and need immediate attention.
Projects
None yet
Development

No branches or pull requests

4 participants