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

Generating (or subscribing to?) the mqtt rx topic crashes the application with a corrupted backtrace if the rx topic contains an variable whose value is not empty. To duplicate: Enable MQTT in the wizard and build the default project. Optionally adjust the device_id default value to be an empty string to observe a successful connection instead. Observed on ESP32. #7

Closed
Tracked by #5
cpq opened this issue May 16, 2024 · 4 comments
Assignees

Comments

@cpq
Copy link
Member

cpq commented May 16, 2024

No description provided.

@cpq cpq mentioned this issue May 16, 2024
14 tasks
@cpq
Copy link
Member Author

cpq commented May 16, 2024

@robertc2000 I was not able to reproduce it. Please try to reproduce on your side.

"Generating (or subscribing to?) the mqtt rx" - cannot reproduce that. If I just enable MQTT in a default config, works fine (uses non-empty device_id expansion). If I use a non-existent variable, works too. Let me know the way to reproduce, please!

@dvosully please let us know the sequence to reproduce that

@dvosully
Copy link

I think the functions doing variable expansion have been changed since I reported that issue, I'll check again later but it may have been fixed already. At the time, running the default project with MQTT enabled would cause it to occur.

@dvosully
Copy link

I can confirm this is no longer an issue. expandvar got patched between reporting and now.
The fix was:

---      n2 = mg_snprintf(tmp + n1, len - n1, "%M", s_vars[vi].fn);
+++      n2 = mg_snprintf(tmp + n1, len - n1, "%M", glue_pfn, s_vars[vi].fn);

@cpq
Copy link
Member Author

cpq commented May 17, 2024

@dvosully thanks David!

@cpq cpq closed this as completed May 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants