Skip to content

nanoFramework.SignalR.Client causes System.OutOfMemoryException on nanoFramework.Json.dll #1626

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

Open
VuTruHoangDa opened this issue Apr 18, 2025 · 2 comments

Comments

@VuTruHoangDa
Copy link

Library/API/IoT binding

nanoFramework.SignalR.Client

Visual Studio version

VS2022 (17.13.6)

.NET nanoFramework extension version

19.243

Target name(s)

ESP32_REV3

Firmware version

No response

Device capabilities

No response

Description

I am using SignalR.Client on ESP32 to send and receive data from server. And when send/receive data sometimes, it crashes and shows System.OutOfMemoryException in nanoFramework.Json.dll. I am debugging with Visual Studio 2022

How to reproduce

  1. Clone git repo: https://github.com/VuTruHoangDa/WebApp.git
  2. Build project "Server" and host to address 192.168.1.250 in the same network with ESP32
  3. Solder ESP32 to LCD2004 (SDA pin 25, SCL pin 26) and solder Touchpads to ESP32 gpio pin or you can modify codes of project "ESP32Client" to do whatever you want to send/receive data from server
  4. Run project "ESP32Client" and touch the touchpads to send data and watch received data in LCD2004, or you can modify codes to use any buttons and serial monitor to send/receive data. Now when you send data serveral times, it will show OutOfMemoryException in VS Debugger.

Expected behaviour

The app crashes with System.OutOfMemoryException in nanoFramework.Json.dll

Screenshots

Image

Sample project or code

https://github.com/VuTruHoangDa/WebApp.git

Aditional information

No response

@josesimoes
Copy link
Member

Does the ESP32 device you're using has PSRAM? If not, depending on the message size and the cadence of the messages, it can deplete the available memory quite fast.

@VuTruHoangDa
Copy link
Author

Does the ESP32 device you're using has PSRAM? If not, depending on the message size and the cadence of the messages, it can deplete the available memory quite fast.

No. My board is ESP 32 WROOM 32

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants