Qucs / qucsator

Circuit simulator of the Qucs project
http://qucs.sourceforge.net
GNU General Public License v2.0
23 stars 10 forks source link

Assertion in stl_vector.h:1123 on Fedora 28 #37

Closed KavalchukD closed 1 year ago

KavalchukD commented 1 year ago

Simulating any circuit leads to a failed assertion on Fedora 28 and the version of the project from Fedora rep qucs-0.0.20~rc2-3.fc38.x86_64 Assertion string looks like: /usr/include/c++/13/bits/stl_vector.h:1123: std::vector<_Tp, _Alloc>::reference std::vector<_Tp, _Alloc>::operator [with _Tp = qucs::nodelist_t; _Alloc = std::allocator<qucs::nodelist_t>; reference = qucs::nodelist_t*&; size_type = long unsigned int]: Assertion '__n < this->size()' failed. The picture of the circuit: image It seems it is the same issue as the following https://github.com/rstudio/httpuv/issues/133. Here is a fix https://github.com/rstudio/httpuv/commit/6cf767fbb6b981aa44ce8f6970feca9a773ed42e.

Since there is no trace and only logs, it is quite tricky to determine the exact line where undefined behaviour happened. Here is the log though: log.txt Please, do not hesitate to contact me if you need any help with gathering additional info or even debugging the program.

felix-salfelder commented 1 year ago

On Tue, May 16, 2023 at 02:50:54PM -0700, Dzmitry Kavalchuk wrote:

Simulating any circuit leads to a failed assertion on Fedora 28 and the version of the project from Fedora rep qucs-0.0.20~rc2-3.fc38.x86_64 Assertion string looks like: /usr/include/c++/13/bits/stl_vector.h:1123: std::vector<_Tp, _Alloc>::reference std::vector<_Tp, _Alloc>::operator [with _Tp = qucs::nodelist_t; _Alloc = std::allocator<qucs::nodelist_t>; reference = qucs::nodelist_t*&; size_type = long unsigned int]: Assertion '__n < this->size()' failed. The picture of the circuit: image It seems it is the same issue as the following https://github.com/rstudio/httpuv/issues/133. Here is a fix https://github.com/rstudio/httpuv/commit/6cf767fbb6b981aa44ce8f6970feca9a773ed42e.

Since there is no trace and only logs, it is quite tricky to determine the exact line where undefined behaviour happened. Here is the log though: log.txt Please, do not hesitate to contact me if you need any help with gathering additional info or even debugging the program.

Hi Dzmitry.

At least one bug of this kind has been fixed in qucsator/develop (after the 0.0.20 release). Please check if the problem still exists there.

thanks felix

KavalchukD commented 1 year ago

Hey Felix! Sure. I should admit I've faced some issues while building the project locally. I had decided to use cmake + ninja, and qucsator file didn't seem to run. It hung for at least several minutes as far as I checked.

KavalchukD commented 1 year ago

It seems I failed to recognise the structure of this project. I built a correct project which is of course qucs itself, and the object of the issue is seems fixed on the actual revision. image Thank you, Felix.