Closed PavelBlend closed 4 years ago
Thanks for reporting this! I'll take a look later today.
I’ll add: this error is reproduced in windows 10.
I took a look at this on Windows and it works well without Blender. I guess debugging this together with Blender is challenging, so I'm afraid that I won't have enough time recently to fix this. I will be occupied at work before May 23, but I'll take a look after that. Meanwhile, if someone else is interested in fixing this, please go ahead.
Update: this is really hard to debug. After some painful manual testing, I confirm that v0.5.14 works but v0.5.15 doesn't. So it must be caused by some commit between two releases.
v0.5.14 works but v0.5.15 doesn't
May related to recent added OpenGL? Try disable that?
I'm not entirely sure if that's related to OpenGL (GLAD etc). A more precise binary search is needed to figure out exactly which commit leads to this behavior. Note that the error happens when we load the taichi_core.dll
so there's no way to disable that at runtime (building without OpenGL sounds like a meaningful thing to try...)
I just found out a very interesting thing. If you have the Elements addon enabled all the time, you will have Blender crashing upon opening everytime. I tried to install taichi version 0.5.14 since @yuanming-hu said it works. After I opened Blender, I turned the Elements addon off. Then I closed Blender and I installed the latest taichi version again, then run Blender, and this time Blender opened successfully. After that, I went to the "Scripting" workspace and type "import taichi as ti" in the concole and Blender crashed again. Then I opended Blender again, this time I enabled Elements first, and turned it off right after turning it on. Then I went to the "Scripting" workspace, and type "import taichi as ti" in the concole again, this time, it did not crash, it worked. Then I wrote some testing lines (see the screenshot below), they worked. This is very interesting and I think this might help you guys in figuring out the problems so I wrote this post here.
P.S. When I tested the "@ti.kernel" functions, it did not work. The screenshot of it is down below. It says"OSError: could not get source code". This is probably unrelated but is there any reason for this?
Hello, @yuanming-hu
I checked this commit: 4c8dad198dae1402d7baa7eceebef29463654885 I managed to run a simulation on this commit. I managed to bake an unbounded simulation:
@EaryChow Thanks for the info. OSError: could not get source code
is a known issue: Taichi just doesn't work in Python IDLE (but works in IPython).
@PavelBlend that looks really cool! Does that mean you can run Taichi in blender now?
I don't know why, but blender stopped running again. How I managed to launch it last time, I did not understand. This happened by accident. I managed to do an unbounded simulation and even ran blender several times. But now I see this error:
[Taichi] mode=release
[Taichi] version 0.6.10, supported archs: [cpu, opengl], commit 1402c4e5, python 3.7.4
[E 06/18/20 07:49:00.591] Received signal 11 (SIGSEGV)
[38;2;255;000;255m***********************************
[0m[38;2;255;000;255m* Taichi Compiler Stack Traceback *
[0m[38;2;255;000;255m***********************************
[0m[38;2;255;000;255m0x7ff9d31d0b11: [0m[38;2;255;000;000mtaichi::create_instance<taichi::Benchmark>[0m[38;2;255;000;255m in taichi_core.pyd
[0m[38;2;255;000;255m0x7ff9d329b4aa: [0m[38;2;255;000;000mtaichi::create_instance<taichi::Benchmark>[0m[38;2;255;000;255m in taichi_core.pyd
[0m[38;2;255;000;255m0x7ff9d32a288e: [0m[38;2;255;000;000mtaichi::create_instance<taichi::Benchmark>[0m[38;2;255;000;255m in taichi_core.pyd
[0m[38;2;255;000;255m0x7ffa2695c043: [0m[38;2;255;000;000mseh_filter_exe[0m[38;2;255;000;255m in ucrtbase.dll
[0m[38;2;255;000;255m0x7ff62433f9e2: [0m[38;2;255;000;000mPyInit_aud[0m[38;2;255;000;255m in blender.exe
[0m[38;2;255;000;255m0x7ff9efe0b8f0: [0m[38;2;255;000;000m_C_specific_handler[0m[38;2;255;000;255m in VCRUNTIME140.dll
[0m[38;2;255;000;255m0x7ffa289e11ff: [0m[38;2;255;000;000m_chkstk[0m[38;2;255;000;255m in ntdll.dll
[0m[38;2;255;000;255m0x7ffa289aa289: [0m[38;2;255;000;000mRtlRaiseException[0m[38;2;255;000;255m in ntdll.dll
[0m[38;2;255;000;255m0x7ffa289dfe6e: [0m[38;2;255;000;000mKiUserExceptionDispatcher[0m[38;2;255;000;255m in ntdll.dll
[0m[38;2;255;000;255m0x7ff623496752: [0m[38;2;255;000;000mPyInit_manta_main[0m[38;2;255;000;255m in blender.exe
[0m[38;2;255;000;255m0x7ff621717ff6: [0m[38;2;255;000;000mUnknown Function[0m[38;2;255;000;255m in blender.exe
[0m[38;2;255;000;255m0x7ff62171c0b5: [0m[38;2;255;000;000mUnknown Function[0m[38;2;255;000;255m in blender.exe
[0m[38;2;255;000;255m0x7ff62170d454: [0m[38;2;255;000;000mUnknown Function[0m[38;2;255;000;255m in blender.exe
[0m[38;2;255;000;255m0x7ff6216b89f8: [0m[38;2;255;000;000mUnknown Function[0m[38;2;255;000;255m in blender.exe
[0m[38;2;255;000;255m0x7ff62170b67b: [0m[38;2;255;000;000mUnknown Function[0m[38;2;255;000;255m in blender.exe
[0m[38;2;255;000;255m0x7ff6214343f3: [0m[38;2;255;000;000mUnknown Function[0m[38;2;255;000;255m in blender.exe
[0m[38;2;255;000;255m0x7ff621432d3a: [0m[38;2;255;000;000mUnknown Function[0m[38;2;255;000;255m in blender.exe
[0m[38;2;255;000;255m0x7ff62116196e: [0m[38;2;255;000;000mUnknown Function[0m[38;2;255;000;255m in blender.exe
[0m[38;2;255;000;255m0x7ff62116147a: [0m[38;2;255;000;000mUnknown Function[0m[38;2;255;000;255m in blender.exe
[0m[38;2;255;000;255m0x7ff621160ff3: [0m[38;2;255;000;000mUnknown Function[0m[38;2;255;000;255m in blender.exe
[0m[38;2;255;000;255m0x7ff62113e4d0: [0m[38;2;255;000;000mUnknown Function[0m[38;2;255;000;255m in blender.exe
[0m[38;2;255;000;255m0x7ff620eb2269: [0m[38;2;255;000;000mUnknown Function[0m[38;2;255;000;255m in blender.exe
[0m[38;2;255;000;255m0x7ff623a6af74: [0m[38;2;255;000;000mPyInit_aud[0m[38;2;255;000;255m in blender.exe
[0m[38;2;255;000;255m0x7ffa27b07bd4: [0m[38;2;255;000;000mBaseThreadInitThunk[0m[38;2;255;000;255m in KERNEL32.DLL
[0m[38;2;255;000;255m0x7ffa289aced1: [0m[38;2;255;000;000mRtlUserThreadStart[0m[38;2;255;000;255m in ntdll.dll
[0m[38;2;255;165;000m
Internal Error occurred, check this page for possible solutions:
https://taichi.readthedocs.io/en/stable/install.html#troubleshooting
[0m
This is no accident @PavelBlend , I can bake the same simulation as well. Like what I said, you need to make sure "Elements" is turned off when you are trying to launch blender.exe, and you can turn it on after lauching blender, also you need to remember to turn it off before you close blender as well.
If you already have "Elements" turned on and you cannot get blender to launch, I have also mentioned how I managed to get a work around as well. Install taichi 0.5.14 via pip, then launch blender, turn off "Elements" and save preferences, close blender. Then install taichi 0.6.10 back again.
@yuanming-hu I installed taichi 0.6.16 and it seems the blender started to start. It seems that this problem can be closed.
Cool!
I updated taichi in blender and blender started to throw an error: