I have been playing with the code in sage/src/sage/libs/gap/element.pyx and the errors we are seeing are very similar to those that occur when you are not careful with wrapping things with GAP_Enter()/GAP_Leave().
Could it be that executing W(w) (w being a GapElement_Permutation) calls back into GAP somewhere and this is not properly bracketed? Best, Michel On Sunday, February 8, 2026 at 9:33:35 AM UTC+1 Michel VAN DEN BERGH wrote: > On Saturday, February 7, 2026 at 10:53:27 PM UTC+1 wrote: > > I find Sage's permutation groups a bit weird. > Old GAP interface was slow, so there were some Cython classes written, and > then libgap came along... > > Can you do your computations in "pure" libgap groups? > > > Probably. But then I couldn't benefit from the stuff in Sage implemented > for Weyl groups. I would have to learn the GAP equivalents. > That's probably not too hard, but since there is a workaround for the bug > (albeit an inconvenient one for large groups) I think I'll stick with that. > > Best, > Michel > > > > I.e. convert W into libgap(W), then these conversions from libgap > permutations to W's permutations aren't even necessary. > > I am aware of one potentially serious libgap interface bug, which might be > playing up here - calls to libgap functions, which pass handles to GAP > objects, might get optimised by the compiler, and break things, unless they > are declared volatile. > And the latter is only done in few places so far - see e.g. sage issue > #37026 > > Dima > > -- You received this message because you are subscribed to the Google Groups "sage-support" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion visit https://groups.google.com/d/msgid/sage-support/85d5abb8-f7d9-49cb-b285-df8cc3fcf46cn%40googlegroups.com.
