BambuSource2Raw icon indicating copy to clipboard operation
BambuSource2Raw copied to clipboard

munmap_chunk(): invalid pointer

Open totalitarian opened this issue 2 years ago • 5 comments

Trying to generate the cfg and I get this error, any idea?

root@5151c851e8b2:/bambu-bin# ./bambusource2raw gen_cfg -u [email protected] -p xxxxx-r eu -d xxxxx
by hisptoot 2022.12.26
user_name: xxxxx
passwd specified by user
region: eu
dev_id: xxxxx
getting token by login
getting user_id by token
user_id: xxxxx
region: eu user_id: xxxxx dev_id: xxxxx
munmap_chunk(): invalid pointer
Aborted (core dumped)

totalitarian avatar Jul 09 '23 17:07 totalitarian

Hello, thank you for reporting the issue.

It seems to be heap corruption or double-free during the final json generation.

If you are familiar with gdb, you can try to compile the program with -g -O0 and run the program with gdb. When the issue happens, run 'bt' cmd in gdb, report the backtrace info to me.

hisptoot avatar Jul 10 '23 01:07 hisptoot

you can try this linux build (I remove cJSON api from cfg generation). bambusource2raw-for-test-2023-07-10.zip

hisptoot avatar Jul 10 '23 02:07 hisptoot

you can try this linux build (I remove cJSON api from cfg generation). bambusource2raw-for-test-2023-07-10.zip

this test file work ok!~!

skysolf avatar Sep 15 '23 08:09 skysolf

you can try this linux build (I remove cJSON api from cfg generation). bambusource2raw-for-test-2023-07-10.zip

use this file ,can make a conf file,but also show munmap_chunk(): invalid pointer Aborted (core dumped)

use the conf file run with docker,the log like this:

`

2023/09/15 17:08:15 stdout [1;31mfd:: Invalid data found when processing input
2023/09/15 17:08:15 stdout get_bambu_studio_user_info failed
2023/09/15 17:08:15 stdout Parse cfg json failed
2023/09/15 17:08:15 stdout getting user info by BambuNetworkEngine.conf
2023/09/15 17:08:15 stdout by hisptoot 2022.12.26
2023/09/15 17:08:10 stdout wait for 5 seconds
2023/09/15 17:08:10 stdout /bambu-bin/cfg /bambu-bin
2023/09/15 17:08:10 stdout /bambu-bin /bambu-bin/cfg /bambu-bin
2023/09/15 17:08:10 stdout [0mstarting rtsp-simple-server
`

skysolf avatar Sep 15 '23 09:09 skysolf

bambusource2raw-2023-11-14-for-test2.zip try this version, check if 'munmap_chunk(): invalid pointer' is fixed

'Parse cfg json failed' is another problem, check if the conf file contains a valid json data.

hisptoot avatar Nov 14 '23 06:11 hisptoot