get invalid pointer or invalid free() error when copying adjacency_matrix to a vector
I maintainer di solito rispondono entro 1 giorno
@jeremy-murphy ci sta già lavorando.
Dal 19/12/2022.
Valutazione
Questa issue non è ancora stata valutata.
Descrizione
I have been trying to preload adjacency matrices with bundled properties to a std::vector of adjacency matrices in order to benchmark some uni project algorithm and not by chance measure the time to set up the graph.
In that instance i tried different approaches to copy a prototype g0:
- std::fill wouldn't work as AM is not a value type.
- boost::copy_graph() wouldn't work due to AM not being a list type
- using std::vector::emplace to construct the graph in place using a constructor declared in the documentation and the AM.hpp: one (of 2) with the edge iterators and num_nodes. * Luckily boost::edges(graph_t) provides such a thing. But it wouldn't work as the edge-iterator-pair provided does not include a .first member. There is one that needs an a property iterator ep_it. i haven't found any information on how do make one and if this is meant for bundled properties.
- using std::vector::push_back(g0) which works until the final "}" and then crashes when freeing or with a "munmap_chunk(): invalid pointer" error. g0 being a predefined graph i want to fill the vector with. It seems plausible as AM seems to be copy constructible. But apparently not entirely. Or maybe the property maps aren't.
However: after running through the algorithms there seems to be no change to g0. So it does not seem to be a "shallow copy" problem. Also valgrind does not report any memory leaks. But lots of errors.
This also happens when copy constructing only 2 graphs.
- on a sidenote: the documentation for iterator constructible suggests passing the number of edges too as it may speed up some processes. The AM does not seem to provide such a thing in the documentation in the section member functions (i.e. constructors).
- Lingua principale
- C++
- Stelle
- 396
- Fork
- 244
- Merge medio
- 1g 17h
- PR unite (30g)
- 30
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di boostorg/graph
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
boostorg/graph#627 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
beginner friendly
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
boostorg/graph#593 · 36 commenti ·
I maintainer di solito rispondono entro 1 giorno
-
algorithm beginner friendly priority: high
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
boostorg/graph#231 · 2 commenti ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 68/100
boostorg/graph#599 · 2 commenti ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 5/5 Più di una settimana Idoneità per principianti 30/100
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di boostorg/graph
Issue simili
-
feature request
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
I maintainer di solito rispondono entro 2 giorni
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
I maintainer di solito rispondono entro 1 giorno
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
gavinlouuu-kpt/mib-studio-qt#517 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
I maintainer di solito rispondono entro 1 giorno
-
ws_bridge: stripping format=evr for matchmaker connections can concatenate the path and queryApertabug
Difficoltà 2/5 1-3 ore Idoneità per principianti 73/100
EchoTools/nevr-runtime#116 ·
I maintainer di solito rispondono entro 1 giorno