-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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
MismatchedDynamicOffsetCount error #134
Comments
Running the game might result in “thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: MismatchedDynamicOffsetCount { actual: 0, expected: 2 }'”. This is because of bevyengine/bevy#134
Worked a bit on the Text+SpriteSheetComponent crash. Declaring Text draw pipeline specialization with same dynamic bindings as for spritesheet and making the shared buffer that text uses dynamic, allow to draw Text+SpriteSheet, but this does not seem to be a real fix, just a workaround. Not sure what direction is the correct fix. In any case I think the full fix or update is beyond my current knowledge, so I'll let other look into it |
@Bobox214 out of interest what OS are you on? I take it from your description that this is reproducible on more than just macOS? |
I am on Linux, and I don’t think this OS specific. |
Auto-closed due to the issue references in #247. This isn't resolved yet. |
So I was able to "fix" the issue by creating another pipeline / render node / and component that mirrored a TextureAtlasSprite. It appears that once a pipeline is set with dynamic bindings, all components that are drawn on it must have dynamic bindings (@Bobox214's effort shows that as well). You can have a look here, master...insrcd:master (I also had to revert the changes from #135 because it was causing very strange redraw issues). Hope this information helps. Also, my main dev environment is Windows 10, so it does not appear to be a platform specific issue. |
…nces as get_or_assign_index will now always assign (bevyengine#247)
Did #247 fix this for you? |
I ran into this just now - so #247 doesn't fix it |
@insrcd What are the shortcomings you see in your patch that motivated you to describe it as a 'fix' rather than a fix. It doesn't seem unreasonable to me to have the text be a separate pipeline from sprite sheets. The two are different enough in terms of how they're generally going to be used (I'd imagine text would use NEAREST filter mode vs LINEAR for sprites, etc) |
@chrisburnor I don’t know enough about rendering to really know if what I did was correct or advisable. It was just the result of me deep diving i to the rendering pipeline code and finding the root cause. I’ll gladly throw it up as a PR if people with more experience believe it is an approach that works. It also undoes #247, and I wasn’t comfortable with undoing an accepted PR to get things to work for the specific thing I was doing. I have been using my fork in the game I’m developing g with no issues (including despawning components). |
Yea it does appear to still be an issue in 0.2.0+, I'll get a PR together. |
OS: macOS Catalina
bevy: master
rust: 1.45.2
To get familiar with bevy, I decided to try and mash together some examples, however spawning a
TextComponent
and aSpriteSheetComponents
causes the program to crash. The backtrace makes it difficult to understand what is going on.Output:
The text was updated successfully, but these errors were encountered: