Table crash

Bugs

Modérateur : xcasadmin

ftneek
Messages : 19
Inscription : sam. juin 08, 2024 7:40 pm

Table crash

Message par ftneek » mar. oct. 08, 2024 8:00 pm

Attempting to assign a second value to a table causes a crash

Code : Tout sélectionner

A[1,1]:=1; A[1,2]:=1;
In the terminal is this message:
libc++abi: terminating due to uncaught exception of type std::__1::bad_function_call: std::exception

parisse
Messages : 5878
Inscription : mar. déc. 20, 2005 4:02 pm
Contact :

Re: Table crash

Message par parisse » jeu. oct. 10, 2024 7:39 am

Indeed, seems related to a recent change that was suggested to me to be compatible with cpp11 functional headers, if I make the following change in gen.h line 444, it works here

Code : Tout sélectionner

#if 0 //def CPP11
  typedef std::map<gen,gen,std::function<bool(const gen &, const gen &)> > gen_map;
#else
  typedef std::map<gen,gen,comparegen> gen_map;
#endif
Does it work on your side?

ftneek
Messages : 19
Inscription : sam. juin 08, 2024 7:40 pm

Re: Table crash

Message par ftneek » jeu. oct. 10, 2024 9:18 am

That seems to resolve the crash on my side.

parisse
Messages : 5878
Inscription : mar. déc. 20, 2005 4:02 pm
Contact :

Re: Table crash

Message par parisse » jeu. oct. 10, 2024 10:17 am

Ok, then I will keep this version. If someone complains about issues compiling with "new" libstdc++ headers, I'll debug. I do not understand why compatibility is not maintained by some implementations...

Répondre