Closed mzavadil closed 5 years ago
Commit a9331e1fd9c0ead599d523f4c4322a67f2dbd065 messed up something which causes this (some self tests fail too). Haven't tracked it down yet.
The problem is may be in this change of core/SympyCdb.cc
:
Return value of append_child
was not used, but the call of it may be something do - just guess, I have not studied it in detail.
Yes, that one, and a similar one in core/algorithms/explicit_indices.cc
. I went a bit too wild ripping out lines at every compiler warning. Now fixed in master.
By the way, in your code example, both complete
and evaluate
work directly on their argument and change it in place. There is no need to assign the result.
Thanks for a hint and quick fix.
If you want to eliminate every warnings, then here are some of the MS Build:
Build succeeded.
"C:\Users\bigfo\Workspace\dev\cadabra2\build\install.vcxproj" (default target) (1) ->
"C:\Users\bigfo\Workspace\dev\cadabra2\build\ALL_BUILD.vcxproj" (default target) (3) ->
"C:\Users\bigfo\Workspace\dev\cadabra2\build\tests\beginners_test.vcxproj" (default target) (4) ->
"C:\Users\bigfo\Workspace\dev\cadabra2\build\core\cadabra2cadabra.vcxproj" (default target) (5) ->
(ClCompile target) ->
c:\users\bigfo\workspace\dev\cadabra2\libs\whereami\whereami.c(49): warning C4005: 'WIN32_LEAN_AND_MEAN': macro redefinition [C:\Users\bigfo\Workspace\dev\cadabra2\build
\core\cadabra2cadabra.vcxproj]
"C:\Users\bigfo\Workspace\dev\cadabra2\build\install.vcxproj" (default target) (1) ->
"C:\Users\bigfo\Workspace\dev\cadabra2\build\ALL_BUILD.vcxproj" (default target) (3) ->
"C:\Users\bigfo\Workspace\dev\cadabra2\build\client_server\cadabra-server.vcxproj" (default target) (7) ->
c:\users\bigfo\workspace\dev\cadabra2\libs\whereami\whereami.c(49): warning C4005: 'WIN32_LEAN_AND_MEAN': macro redefinition [C:\Users\bigfo\Workspace\dev\cadabra2\build
\client_server\cadabra-server.vcxproj]
"C:\Users\bigfo\Workspace\dev\cadabra2\build\install.vcxproj" (default target) (1) ->
"C:\Users\bigfo\Workspace\dev\cadabra2\build\ALL_BUILD.vcxproj" (default target) (3) ->
"C:\Users\bigfo\Workspace\dev\cadabra2\build\core\cadabra2.vcxproj" (default target) (8) ->
c:\users\bigfo\workspace\dev\vcpkg\installed\x64-windows\include\pcrecpp.h(701): warning C4251: 'pcrecpp::RE::pattern_': class 'std::basic_string<char,std::char_traits<c
har>,std::allocator<char>>' needs to have dll-interface to be used by clients of class 'pcrecpp::RE' (compiling source file C:\Users\bigfo\Workspace\dev\cadabra2\core\Stor
age.cc) [C:\Users\bigfo\Workspace\dev\cadabra2\build\core\cadabra2.vcxproj]
"C:\Users\bigfo\Workspace\dev\cadabra2\build\install.vcxproj" (default target) (1) ->
"C:\Users\bigfo\Workspace\dev\cadabra2\build\ALL_BUILD.vcxproj" (default target) (3) ->
"C:\Users\bigfo\Workspace\dev\cadabra2\build\core\cadabra2.vcxproj" (default target) (8) ->
(Link target) ->
LINK : warning LNK4075: ignoring '/INCREMENTAL' due to '/LTCG' specification [C:\Users\bigfo\Workspace\dev\cadabra2\build\core\cadabra2.vcxproj]
"C:\Users\bigfo\Workspace\dev\cadabra2\build\install.vcxproj" (default target) (1) ->
"C:\Users\bigfo\Workspace\dev\cadabra2\build\ALL_BUILD.vcxproj" (default target) (3) ->
"C:\Users\bigfo\Workspace\dev\cadabra2\build\frontend\gtkmm\cadabra2-gtk.vcxproj" (default target) (9) ->
"C:\Users\bigfo\Workspace\dev\cadabra2\build\client_server\cadabra_client.vcxproj" (default target) (10) ->
(ClCompile target) ->
c:\users\bigfo\workspace\dev\cadabra2\libs\whereami\whereami.c(49): warning C4005: 'WIN32_LEAN_AND_MEAN': macro redefinition [C:\Users\bigfo\Workspace\dev\cadabra2\build
\client_server\cadabra_client.vcxproj]
"C:\Users\bigfo\Workspace\dev\cadabra2\build\install.vcxproj" (default target) (1) ->
"C:\Users\bigfo\Workspace\dev\cadabra2\build\ALL_BUILD.vcxproj" (default target) (3) ->
"C:\Users\bigfo\Workspace\dev\cadabra2\build\frontend\gtkmm\cadabra2-gtk.vcxproj" (default target) (9) ->
c:\users\bigfo\workspace\dev\cadabra2\frontend\gtkmm\notebookwindow.cc(1795): warning C4805: '==': unsafe mix of type 'bool' and type 'int' in operation [C:\Users\bigfo\
Workspace\dev\cadabra2\build\frontend\gtkmm\cadabra2-gtk.vcxproj]
c:\users\bigfo\workspace\dev\cadabra2\frontend\common\lodepng.cc(3411): warning C4334: '<<': result of 32-bit shift implicitly converted to 64 bits (was 64-bit shift int
ended?) [C:\Users\bigfo\Workspace\dev\cadabra2\build\frontend\gtkmm\cadabra2-gtk.vcxproj]
7 Warning(s)
0 Error(s)
Time Elapsed 00:03:44.17
Sorry, that's a bit too much for my restricted spare time. If you know how to fix it then a patch will be gratefully accepted, but otherwise I think this will just have to stay as it is.
Cadabra2 command
evaluate
crashed on segmentation fault if acomplete
command was used for calculation:Example:
The problem is in dereference a null pointer of tree node of
rhs
part the expression incore/algorithms/substitute.cc
.Probably this is the cause of this error:
Occurred for printing a result of
complete
command:Tested on last windows build from commit: https://github.com/kpeeters/cadabra2/commit/5533cd5bcce492fbc5b9fafc551b08ee5aa19136
My version of Anaconda:
and the
sympy
package: