Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Taichi 0.6.4 not working in blender #54

Closed
PavelBlend opened this issue May 14, 2020 · 13 comments
Closed

Taichi 0.6.4 not working in blender #54

PavelBlend opened this issue May 14, 2020 · 13 comments
Labels
blender bug Something isn't working

Comments

@PavelBlend
Copy link
Collaborator

I updated taichi in blender and blender started to throw an error:

[Taichi] mode=release
[Taichi] version 0.6.4, supported archs: [cpu, opengl], commit 562e1f11, python 3.7.4
[E 05/14/20 10:13:27.773] 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;255m0x7ffe824465d1: �[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;255m0x7ffe822b6e8a: �[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;255m0x7ffe822be26e: �[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;255m0x7ffed163c043: �[0m�[38;2;255;000;000mseh_filter_exe�[0m�[38;2;255;000;255m in ucrtbase.dll
�[0m�[38;2;255;000;255m0x7ff644f250b2: �[0m�[38;2;255;000;000mFT_Stream_OpenLZW�[0m�[38;2;255;000;255m in blender.exe
�[0m�[38;2;255;000;255m0x7ffebd9bb8f0: �[0m�[38;2;255;000;000m_C_specific_handler�[0m�[38;2;255;000;255m in VCRUNTIME140.dll
�[0m�[38;2;255;000;255m0x7ffed42611ff: �[0m�[38;2;255;000;000m_chkstk�[0m�[38;2;255;000;255m in ntdll.dll
�[0m�[38;2;255;000;255m0x7ffed422a289: �[0m�[38;2;255;000;000mRtlRaiseException�[0m�[38;2;255;000;255m in ntdll.dll
�[0m�[38;2;255;000;255m0x7ffed425fe6e: �[0m�[38;2;255;000;000mKiUserExceptionDispatcher�[0m�[38;2;255;000;255m in ntdll.dll
�[0m�[38;2;255;000;255m0x7ff6440c3045: �[0m�[38;2;255;000;000mPyInit_Main�[0m�[38;2;255;000;255m in blender.exe
�[0m�[38;2;255;000;255m0x7ff642457986: �[0m�[38;2;255;000;000mxmlLinkGetData�[0m�[38;2;255;000;255m in blender.exe
�[0m�[38;2;255;000;255m0x7ff642459504: �[0m�[38;2;255;000;000mxmlLinkGetData�[0m�[38;2;255;000;255m in blender.exe
�[0m�[38;2;255;000;255m0x7ff642458c7f: �[0m�[38;2;255;000;000mxmlLinkGetData�[0m�[38;2;255;000;255m in blender.exe
�[0m�[38;2;255;000;255m0x7ff6423f8d88: �[0m�[38;2;255;000;000mxmlLinkGetData�[0m�[38;2;255;000;255m in blender.exe
�[0m�[38;2;255;000;255m0x7ff64245723b: �[0m�[38;2;255;000;000mxmlLinkGetData�[0m�[38;2;255;000;255m in blender.exe
�[0m�[38;2;255;000;255m0x7ff64218c803: �[0m�[38;2;255;000;000mxmlLinkGetData�[0m�[38;2;255;000;255m in blender.exe
�[0m�[38;2;255;000;255m0x7ff64218b14d: �[0m�[38;2;255;000;000mxmlLinkGetData�[0m�[38;2;255;000;255m in blender.exe
�[0m�[38;2;255;000;255m0x7ff641ec5a09: �[0m�[38;2;255;000;000mxmlFileMatch�[0m�[38;2;255;000;255m in blender.exe
�[0m�[38;2;255;000;255m0x7ff641ec554a: �[0m�[38;2;255;000;000mxmlFileMatch�[0m�[38;2;255;000;255m in blender.exe
�[0m�[38;2;255;000;255m0x7ff641ec51a0: �[0m�[38;2;255;000;000mxmlFileMatch�[0m�[38;2;255;000;255m in blender.exe
�[0m�[38;2;255;000;255m0x7ff641ea2420: �[0m�[38;2;255;000;000mxmlFileMatch�[0m�[38;2;255;000;255m in blender.exe
�[0m�[38;2;255;000;255m0x7ff641ccb6b9: �[0m�[38;2;255;000;000mUnknown Function�[0m�[38;2;255;000;255m in blender.exe
�[0m�[38;2;255;000;255m0x7ff64468f5a4: �[0m�[38;2;255;000;000mFT_Stream_OpenLZW�[0m�[38;2;255;000;255m in blender.exe
�[0m�[38;2;255;000;255m0x7ffed3fa7bd4: �[0m�[38;2;255;000;000mBaseThreadInitThunk�[0m�[38;2;255;000;255m in KERNEL32.DLL
�[0m�[38;2;255;000;255m0x7ffed422ced1: �[0m�[38;2;255;000;000mRtlUserThreadStart�[0m�[38;2;255;000;255m in ntdll.dll
�[0m
@PavelBlend PavelBlend added bug Something isn't working blender labels May 14, 2020
@yuanming-hu
Copy link
Member

Thanks for reporting this! I'll take a look later today.

@PavelBlend
Copy link
Collaborator Author

I’ll add: this error is reproduced in windows 10.

@yuanming-hu
Copy link
Member

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.

@yuanming-hu
Copy link
Member

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.

@archibate
Copy link
Contributor

v0.5.14 works but v0.5.15 doesn't

May related to recent added OpenGL? Try disable that?

@yuanming-hu
Copy link
Member

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...)

@EaryChow
Copy link

EaryChow commented Jun 15, 2020

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.

It worked after you turn elements on and off

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?

image

@PavelBlend
Copy link
Collaborator Author

Hello, @yuanming-hu

I checked this commit: 4c8dad1
I managed to run a simulation on this commit.
I managed to bake an unbounded simulation:

https://gfycat.com/boldvengefulitalianbrownbear

@yuanming-hu
Copy link
Member

@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?

@PavelBlend
Copy link
Collaborator Author

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

@EaryChow
Copy link

EaryChow commented Jun 18, 2020

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.

@PavelBlend
Copy link
Collaborator Author

@yuanming-hu I installed taichi 0.6.16 and it seems the blender started to start. It seems that this problem can be closed.

@yuanming-hu
Copy link
Member

Cool!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
blender bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants