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

BUG: hang when creating a bake job #46

Closed
2 tasks done
ApeOnFire opened this issue Sep 26, 2023 · 12 comments · Fixed by #62
Closed
2 tasks done

BUG: hang when creating a bake job #46

ApeOnFire opened this issue Sep 26, 2023 · 12 comments · Fixed by #62
Assignees
Labels
bug your old lawnmower broke down solved How could you? GPT helped?

Comments

@ApeOnFire
Copy link

ApeOnFire commented Sep 26, 2023

This bug report is:

  • not a duplicate
  • fixed

Describe the bug
Creating a bake job with more than two objects in it causes Blender to hang.

To Reproduce
Steps to reproduce the behavior:

  1. Add a material to the default cube
  2. Duplicate it twice and add all three cubes to the BakeMaster object list.
  3. Switch on Name Matching
  4. Press the Create Bake Job Group button
  5. Add the cubes as low or high poly (doesn't matter)
  6. Blender hangs permanently.

Expected behavior
The cubes should be added to a container for further config.

Desktop (please complete the following information):

  • OS: MacOS
  • OS Version: 13.3.1 (Ventura)
  • Blender Version: 3.6.0
  • BakeMaster Version: 2.5.2
@ApeOnFire ApeOnFire added the bug your old lawnmower broke down label Sep 26, 2023
@KirilStrezikozin
Copy link
Owner

@ApeOnFire, can't reproduce on Linux and Windows, cubes are added to the bake job group as expected.
Have you tried restarting blender, disabling/reenabling BakeMaster addon?

Also, can you please open the blender console before adding cubes to BakeMaster, and monitor any debug info that appears there at the moment of adding a bake job group? Then send a screenshot of them here if any does appear.

image

@KirilStrezikozin KirilStrezikozin added can't repro how on earth did this happen? waiting on comment Can't move on until you confirm it labels Sep 27, 2023
@ApeOnFire
Copy link
Author

@KirilStrezikozin nothing is printed to the console unfortunately.

It is 100% reproducible though. I've restarted blender and the machine multiple times now, reinstalled the BakeMaster add-on and disabled all other community add-ons.

I can test it on another mac later today - I'll report back.

@ApeOnFire
Copy link
Author

ApeOnFire commented Sep 27, 2023

@KirilStrezikozin tested on another mac and got the same behaviour in v3.6.4.

Interestingly though, the machine still had v3.5.1 on it so I tried that too. This time it crashed blender instantly instead of hanging. The only line printed to the console though was:

[1] 54776 segmentation fault /Applications/Blender.app/Contents/MacOS/Blender

Not a lot of help I guess… sorry I can't provide more info. I'm happy to try other things or test potential fixes for you though - just let me know.

@KirilStrezikozin KirilStrezikozin added in progress All night I stay not sleeping because I'm thinking about this and removed waiting on comment Can't move on until you confirm it can't repro how on earth did this happen? labels Sep 27, 2023
@KirilStrezikozin
Copy link
Owner

Thanks for your effort. Regarding some testing, how would it be more comfortable for you?:

  1. having a local git repo cloned and enabled as an addon
  2. replacing one of the addon's files with an updated one I'll send

@ApeOnFire
Copy link
Author

No worries. Option two would be preferable 👍

@KirilStrezikozin
Copy link
Owner

ok, I can't certainly say what exactly causes this bug, because the segmentation fault (like the one you've caught in the v3.5.1 version of Blender) is not particularly connected with BakeMaster itself. Instead, some action it produces freezes blender or causes it to crash.

The first thing we'll do until I find a Mac for me is to try to pinpoint the bug's location.

  1. For this, open BakeMaster in blender addon preferences, and navigate to the path on your system where it's stored:
    image

  2. Open that folder and look for a file named operators.py. Replace it with the operators.py file you'll get after extracting this zip archive.

  3. Now, restart (or open) Blender and try to make a bake job group.

  4. Notice that the dialog menu has the following property:
    image
    Execute Create Bake Job Group operator 4 times with this property set to the next value each round.

  5. Report back here which numbers caused blender to hang/crash.

@KirilStrezikozin KirilStrezikozin added the waiting on comment Can't move on until you confirm it label Sep 27, 2023
@ApeOnFire
Copy link
Author

ApeOnFire commented Sep 28, 2023

After running through loads of scenarios I've pinned it down a bit more closely.

  • If execute_way_num is 0, 1 or 2 it never hangs. It only hangs on 3.
  • It never hangs with < 3 objects added to BM.
  • It only hangs when exactly 3 or 4 objects have been added (and execute_way_num = 3). And it doesn't matter how many objects are selected to add to the job. It's about how many have been added to BM.
  • So, it doesn't hang when the BM object count >= 5.
  • Then additionally, if you add >= 5 objects then create a bake job, the bug disappears. You can now clear the object list, add 3 or 4 objects and successfully create a job.

This took a while to figure out but hopefully it's useful and might point you in the right direction?

@KirilStrezikozin KirilStrezikozin removed the waiting on comment Can't move on until you confirm it label Sep 28, 2023
@KirilStrezikozin
Copy link
Owner

Thanks. Yes, this will definitely help. The behavior is very very strange to me though. I'll try to think about what I can do here and get back to you with another file to test.

@ApeOnFire
Copy link
Author

Ok great. There's no hurry from me as I can work around it now. But happy to run more tests as needed.

@KirilStrezikozin
Copy link
Owner

@ApeOnFire, test out this one: operators.zip

@KirilStrezikozin KirilStrezikozin added the waiting on comment Can't move on until you confirm it label Oct 6, 2023
@ApeOnFire
Copy link
Author

@KirilStrezikozin it still hangs unfortunately.

I also found another scenario the other day where it hangs:

  1. Add just two objects to BM
  2. Create a bake job by adding one object as LP and the other as HP.

Hangs when you click ok.

This also happens if you use the auto matching:

  1. Name two objects using the "_low" suffix for one and "_high" for the other.
  2. Add them to BM.
  3. Toggle name matching to On.

Hangs when you press the button.

I haven't added a new bug as I'm guessing the root cause is the same.

@KirilStrezikozin KirilStrezikozin removed the waiting on comment Can't move on until you confirm it label Oct 9, 2023
@KirilStrezikozin KirilStrezikozin added this to the BakeMaster 2.6.0 milestone Nov 16, 2023
@KirilStrezikozin
Copy link
Owner

KirilStrezikozin commented Nov 17, 2023

@ApeOnFire, hi. Please test this new one: operators.zip. That's for the Bake Job Group. Same procedure: replacing operators.py.

@KirilStrezikozin KirilStrezikozin added the waiting on comment Can't move on until you confirm it label Nov 17, 2023
@KirilStrezikozin KirilStrezikozin removed the in progress All night I stay not sleeping because I'm thinking about this label Dec 30, 2023
KirilStrezikozin added a commit that referenced this issue Jan 19, 2024
@KirilStrezikozin KirilStrezikozin added the in progress All night I stay not sleeping because I'm thinking about this label Jan 19, 2024
KirilStrezikozin added a commit that referenced this issue Jan 19, 2024
Merge pull request #62 from KirilStrezikozin/dev-2.6.0_issue46
@KirilStrezikozin KirilStrezikozin added solved How could you? GPT helped? close on release done here, but let's wait for the release and removed in progress All night I stay not sleeping because I'm thinking about this waiting on comment Can't move on until you confirm it labels Jan 19, 2024
@KirilStrezikozin KirilStrezikozin removed the close on release done here, but let's wait for the release label Feb 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug your old lawnmower broke down solved How could you? GPT helped?
Projects
None yet
2 participants