in 4.0 alpha, i cannot add bolts anymore... #104762

Closed
opened 2023-07-20 10:47:21 +02:00 by Christoph Duyster · 5 comments

System Information
Operating system: macOS-13.4.1-arm64-arm-64bit 64 Bits
Graphics card: Metal API Apple M1 Max 1.2

Blender Version
Broken: version: 4.0.0 Alpha, branch: main, commit date: 2023-07-13 22:52, hash: 474b492b3893
Worked: (newest version of Blender that worked as expected)

Addon Information
Name: BoltFactory (0, 4, 0)
Author: Aaron Keith

Short description of error
[Please fill out a short description of the error here]

Exact steps for others to reproduce the error
[Please describe the exact steps needed to reproduce the issue]
[Based on the default startup or an attached .blend file (as simple as possible)]

image

**System Information** Operating system: macOS-13.4.1-arm64-arm-64bit 64 Bits Graphics card: Metal API Apple M1 Max 1.2 **Blender Version** Broken: version: 4.0.0 Alpha, branch: main, commit date: 2023-07-13 22:52, hash: `474b492b3893` Worked: (newest version of Blender that worked as expected) **Addon Information** Name: BoltFactory (0, 4, 0) Author: Aaron Keith **Short description of error** [Please fill out a short description of the error here] **Exact steps for others to reproduce the error** [Please describe the exact steps needed to reproduce the issue] [Based on the default startup or an attached .blend file (as simple as possible)] ![image](/attachments/9e3a1613-7943-4c1e-aff2-642450e75adc)
145 KiB
Christoph Duyster added the
Type
Report
Priority
Normal
Status
Needs Triage
labels 2023-07-20 10:47:21 +02:00
Member

Can confirm, will check...

Can confirm, will check...
Philipp Oeser added
Status
Confirmed
and removed
Status
Needs Triage
labels 2023-07-20 11:03:48 +02:00
Member

This was caused by blender/blender@a280e8a68c, so it might actually a problem in blender itself (not the Addon).

The above commit enabled a check that was #ifdefed before (was marked "not strictly necessary" in blender/blender@30dcada24d)

So this might expose an error in the Addon code itself ("wrong data provided to polygons.foreach_set), but this seems to have never been a real problem afaict.

Will summon reviewers of blender/blender#109179 here (as well as the Addon author) to discuss...

CC @meermanr
CC @Baardaap
CC @brecht
CC @HooglyBoogly

Note: re-commenting the check makes both this report and blender/blender#107416 work :

diff --git a/source/blender/python/intern/bpy_rna.c b/source/blender/python/intern/bpy_rna.c
index da0a1dfeec9..d77d415c52b 100644
--- a/source/blender/python/intern/bpy_rna.c
+++ b/source/blender/python/intern/bpy_rna.c
@@ -5288,7 +5288,9 @@ static int foreach_parse_args(BPy_PropertyRNA *self,
                               bool *r_attr_signed)
 {
   int array_tot;
+#if 0
   int target_tot;
+#endif
 
   *r_size = *r_attr_tot = 0;
   *r_attr_signed = false;
@@ -5332,7 +5334,8 @@ static int foreach_parse_args(BPy_PropertyRNA *self,
       return -1;
     }
     *r_size = RNA_raw_type_sizeof(*r_raw_type);
-
+#if 0 /* Works fine, but not strictly needed. \
+       * we could allow RNA_property_collection_raw_* to do the checks */
     if ((*r_attr_tot) < 1) {
       *r_attr_tot = 1;
     }
@@ -5347,6 +5350,7 @@ static int foreach_parse_args(BPy_PropertyRNA *self,
                    target_tot);
       return -1;
     }
+#endif
   }
 
   /* Check 'r_attr_tot' otherwise we don't know if any values were set.
This was caused by blender/blender@a280e8a68c15ee3ec0978fb594b29d083fd2bcd6, so it _might_ actually a problem in blender itself (not the Addon). The above commit enabled a check that was #ifdefed before (was marked "not strictly necessary" in blender/blender@30dcada24d18) So this _might_ expose an error in the Addon code itself ("wrong data provided to `polygons.foreach_set`), but this seems to have never been a real problem afaict. Will summon reviewers of https://projects.blender.org/blender/blender/pulls/109179 here (as well as the Addon author) to discuss... CC @meermanr CC @Baardaap CC @brecht CC @HooglyBoogly Note: re-commenting the check makes both this report and https://projects.blender.org/blender/blender/issues/107416 work : ```diff diff --git a/source/blender/python/intern/bpy_rna.c b/source/blender/python/intern/bpy_rna.c index da0a1dfeec9..d77d415c52b 100644 --- a/source/blender/python/intern/bpy_rna.c +++ b/source/blender/python/intern/bpy_rna.c @@ -5288,7 +5288,9 @@ static int foreach_parse_args(BPy_PropertyRNA *self, bool *r_attr_signed) { int array_tot; +#if 0 int target_tot; +#endif *r_size = *r_attr_tot = 0; *r_attr_signed = false; @@ -5332,7 +5334,8 @@ static int foreach_parse_args(BPy_PropertyRNA *self, return -1; } *r_size = RNA_raw_type_sizeof(*r_raw_type); - +#if 0 /* Works fine, but not strictly needed. \ + * we could allow RNA_property_collection_raw_* to do the checks */ if ((*r_attr_tot) < 1) { *r_attr_tot = 1; } @@ -5347,6 +5350,7 @@ static int foreach_parse_args(BPy_PropertyRNA *self, target_tot); return -1; } +#endif } /* Check 'r_attr_tot' otherwise we don't know if any values were set. ```
Philipp Oeser added
Priority
High
Module
Add-ons (BF-Blender)
Interest
Modeling
and removed
Priority
Normal
labels 2023-07-20 12:57:42 +02:00

thank you for that fast info!!

thank you for that fast info!!

I'll see if I understand what's happening exactly. The 'not strictly necessary' is maybe not true anymore.

I'll see if I understand what's happening exactly. The 'not strictly necessary' is maybe not true anymore.

Since we have another report (blender/blender#111117) and this report is in the wrong repository. I'm closing it in favor of the other one.

Since we have another report (blender/blender#111117) and this report is in the wrong repository. I'm closing it in favor of the other one.
Blender Bot added
Status
Archived
and removed
Status
Confirmed
labels 2023-08-15 00:47:36 +02:00
Sign in to join this conversation.
No Milestone
No project
No Assignees
4 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: blender/blender-addons#104762
No description provided.