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

web socket onFrame crashes with log level i #74

Open
ricdijk opened this issue Feb 10, 2024 · 3 comments
Open

web socket onFrame crashes with log level i #74

ricdijk opened this issue Feb 10, 2024 · 3 comments

Comments

@ricdijk
Copy link

ricdijk commented Feb 10, 2024

PsychicWebSocket.cpp lines 204 and 205:

ESP_LOGI(PH_TAG, "ws_handler: httpd_handle_t=%p, sockfd=%d, client_info:%d", request->server(), httpd_req_to_sockfd(request->request()), httpd_ws_get_fd_info(request->server(), httpd_req_to_sockfd(request->request())));

With log level 'Information', the library crashes on the call 'httpd_ws_get_fd_info(request->server(), httpd_req_to_sockfd(request->request()))'.

I simply took the the argument out of the log_i, not the solution, however works for me.

@T94T
Copy link

T94T commented Feb 19, 2024

Is there already a solution for this? Commenting lines 204 and 205 does work for me also, but this is not a good solution.

@ricdijk
Copy link
Author

ricdijk commented Feb 19, 2024 via email

@dzungpv
Copy link
Contributor

dzungpv commented Mar 1, 2024

I have the same crash. Remove the logs on the PsychicWebSocket.cpp line 204 and it work fine. Here is the log for @hoeken investigate:

Guru Meditation Error: Core  1 panic'ed (LoadProhibited). Exception was unhandled.

Core  1 register dump:
PC      : 0x4016c561  PS      : 0x00060930  A0      : 0x801d6466  A1      : 0x3ffd7e10  
0x4016c561: enum_function at /Users/vietdzung/esp/esp-idf-v4.4.6/components/esp_http_server/src/httpd_sess.c:86

A2      : 0x7fffffff  A3      : 0x3ffd7e60  A4      : 0x00000000  A5      : 0x3ffc4ad8  
A6      : 0x00000001  A7      : 0x0000000c  A8      : 0x00000004  A9      : 0x00000000  
A10     : 0x00000000  A11     : 0x00060d23  A12     : 0x00060d20  A13     : 0x00060d23  
A14     : 0x0000000a  A15     : 0x3ffde7b8  SAR     : 0x0000001d  EXCCAUSE: 0x0000001c  
EXCVADDR: 0x80000000  LBEG    : 0x4000c2e0  LEND    : 0x4000c2f6  LCOUNT  : 0xffffffff  


Backtrace: 0x4016c55e:0x3ffd7e10 0x401d6463:0x3ffd7e40 0x4016c35d:0x3ffd7e60 0x4016e161:0x3ffd7eb0 0x4010cba0:0x3ffd7ed0 0x4010d196:0x3ffd7f90 0x4016be49:0x3ffd8010 0x4016c815:0x3ffd8040 0x4016aad4:0x3ffd8060 0x401d6463:0x3ffd8090 0x4016ae17:0x3ffd80b0 0x4016aebb:0x3ffd8100 0x4008d3fd:0x3ffd8120
0x4016c55e: enum_function at /Users/vietdzung/esp/esp-idf-v4.4.6/components/esp_http_server/src/httpd_sess.c:83

0x401d6463: httpd_sess_enum at /Users/vietdzung/esp/esp-idf-v4.4.6/components/esp_http_server/src/httpd_sess.c:50 (discriminator 1)

0x4016c35d: httpd_sess_get at /Users/vietdzung/esp/esp-idf-v4.4.6/components/esp_http_server/src/httpd_sess.c:181

0x4016e161: httpd_ws_get_fd_info at /Users/vietdzung/esp/esp-idf-v4.4.6/components/esp_http_server/src/httpd_ws.c:521

0x4010cba0: PsychicWebSocketHandler::handleRequest(PsychicRequest*) at /Users/vietdzung/dev/projects/esp32/wsproject/components/PsychicHttp/src/PsychicWebSocket.cpp:204 (discriminator 8)

0x4010d196: PsychicEndpoint::requestCallback(httpd_req*) at /Users/vietdzung/dev/projects/esp32/wsproject/components/PsychicHttp/src/PsychicEndpoint.cpp:72

0x4016be49: httpd_req_new at /Users/vietdzung/esp/esp-idf-v4.4.6/components/esp_http_server/src/httpd_parse.c:776

0x4016c815: httpd_sess_process at /Users/vietdzung/esp/esp-idf-v4.4.6/components/esp_http_server/src/httpd_sess.c:419 (discriminator 9)

0x4016aad4: httpd_process_session at /Users/vietdzung/esp/esp-idf-v4.4.6/components/esp_http_server/src/httpd_main.c:178 (discriminator 9)

0x401d6463: httpd_sess_enum at /Users/vietdzung/esp/esp-idf-v4.4.6/components/esp_http_server/src/httpd_sess.c:50 (discriminator 1)

0x4016ae17: httpd_server at /Users/vietdzung/esp/esp-idf-v4.4.6/components/esp_http_server/src/httpd_main.c:228

0x4016aebb: httpd_thread at /Users/vietdzung/esp/esp-idf-v4.4.6/components/esp_http_server/src/httpd_main.c:250 (discriminator 15)

0x4008d3fd: vPortTaskWrapper at /Users/vietdzung/esp/esp-idf-v4.4.6/components/freertos/port/xtensa/port.c:142

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