Skip to content

[SignalR-Client-Cpp] cannot start a connection on linux arm #43753

@Wasenshi123

Description

@Wasenshi123

Is there an existing issue for this?

  • I have searched the existing issues

Describe the bug

I built the lib for linux-arm environment (raspberry pi)

And I try to POC a simple connection to my signalr server (ASP .NET core 3.1).

What I get is an error below:

munmap_chunk(): invalid pointer
Aborted

This is the code which is basically a copy of example code on the github :

#include <iostream>

#include <future>

#ifndef WINDOWS
#define NO_SIGNALRCLIENT_EXPORTS
#endif // WINDOWS

#include "signalrclient/hub_connection.h"
#include "signalrclient/hub_connection_builder.h"
#include "signalrclient/signalr_value.h"


using namespace std;

int main(int argc, char **argv)
{
  std::promise<void> start_task;
  signalr::hub_connection connection = signalr::hub_connection_builder::create("http://192.168.0.21:8200/box").build();

  connection.on("NameChanged", [](const std::vector<signalr::value>& m)
  {
      std::cout << m[0].as_string() << std::endl;
  });

  connection.start([&start_task](std::exception_ptr ex) {
    if (ex) {
      std::cout << "Cannot connect to server." << std::endl;
      return 0;
    }

    std::cout << "server connected!" << std::endl;

    start_task.set_value();
  });

  std::cout << "connecting..." << std::endl;

  start_task.get_future().get();

  std::cout << "server connected!" << std::endl;


  return 0;
}

  • I have tried with javascript client lib to check my server setup, the javascript lib can connect to my server via browser normally
  • The RPi (raspberry pi) architect is ARM-linux-gnueabihf (64 bit)

Expected Behavior

The lib should be able to run and connect to server without error.

Steps To Reproduce

No response

Exceptions (if any)

munmap_chunk(): invalid pointer
Aborted

.NET Version

No response

Anything else?

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-signalrIncludes: SignalR clients and servers

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions