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

Collection factories are broken in bundled builds #7434

Closed
dapetcu21 opened this issue Mar 2, 2023 · 21 comments · Fixed by #7437
Closed

Collection factories are broken in bundled builds #7434

dapetcu21 opened this issue Mar 2, 2023 · 21 comments · Fixed by #7437
Labels
bug Something is not working as expected

Comments

@dapetcu21
Copy link
Contributor

Describe the bug (REQUIRED)
1.4.3 broke collection factories for us. In bundled builds collectionfactory.create() returns an empty table and nothing gets spawned. When running from the editor this doesn’t happen.

To Reproduce (REQUIRED)
Steps to reproduce the behavior:
We don't have a minimal repro case, but our code looks like this:

  local instance = collectionfactory.create(self.factory_url, nil, nil, {
    [hash("character")] = {
      -- some stuff
    }
  })
  pprint(instance) -- Empty table

The collection factory is not loaded dynamically, nor does it have a dyamic prototype

Defold version (REQUIRED):

  • Version 1.4.3 (1.4.2 was fine)

Platforms (REQUIRED):

  • First noticed this on web, but then managed to repro on macOS too
@dapetcu21 dapetcu21 added the bug Something is not working as expected label Mar 2, 2023
@dapetcu21
Copy link
Contributor Author

Oh! Here's more info:

ERROR:GAMEOBJECT: Could not create script component, out of resources.
ERROR:GAMESYS: Sprite could not be created since the buffer is full (8). Increase the 'sprite.max_count' value in [game.project](defold://open?path=/game.project)
ERROR:GAMESYS: Sprite could not be created since the buffer is full (8). Increase the 'sprite.max_count' value in [game.project](defold://open?path=/game.project)
ERROR:GAMESYS: Sprite could not be created since the buffer is full (8). Increase the 'sprite.max_count' value in [game.project](defold://open?path=/game.project)
ERROR:GAMESYS: Label could not be created since the buffer is full (0). Increase the 'label.max_count' value in [game.project](defold://open?path=/game.project)

@AGulev
Copy link
Contributor

AGulev commented Mar 2, 2023

could you pls show how your setup looks like in the collection's outline?

If you use external cache when build with bob, could you pls try turn it off?

@dapetcu21
Copy link
Contributor Author

Not using any special flags for bob. Actually bundled straight from the editor:
Screenshot 2023-03-02 at 17 29 30

@AGulev
Copy link
Contributor

AGulev commented Mar 2, 2023

What is your game.project label.max_count and sprite.max_count ?

@dapetcu21
Copy link
Contributor Author

Definitely not 0 and 8. Lemme check.

[sprite]
max_count = 1024

[label]
max_count = 2048

@AGulev
Copy link
Contributor

AGulev commented Mar 2, 2023

it is definitely a bug with components counter which were fully reworked in 1.4.3 to avoid issues with cache system.
But I can't reproduce it on my side (

@AGulev
Copy link
Contributor

AGulev commented Mar 2, 2023

what do you use to spawn level1.collection? collectionproxy?

@dapetcu21
Copy link
Contributor Author

Yeah, collectionproxy. It's a monarch scene

@dapetcu21
Copy link
Contributor Author

Maybe it's because the collection factory is in characters.collection, which is dropped into level1.collection?

@AGulev
Copy link
Contributor

AGulev commented Mar 2, 2023

I made the same hierarchy and it works fine for me, it should be something else...
image

@AGulev
Copy link
Contributor

AGulev commented Mar 2, 2023

could you show me character.collection as well?

@dapetcu21
Copy link
Contributor Author

Screenshot 2023-03-02 at 18 09 46

@AGulev
Copy link
Contributor

AGulev commented Mar 2, 2023

still works for me (

@dapetcu21
Copy link
Contributor Author

Want me to give you the project?

@AGulev
Copy link
Contributor

AGulev commented Mar 2, 2023

That would be helpful, yes. Because for now I've no idea why it's happening (I understand where and don't understand why). You can share it with me privately here on github or using some other way

@dapetcu21
Copy link
Contributor Author

Yup. Give me a bit to remove some stuff so it's easy to test

@AGulev
Copy link
Contributor

AGulev commented Mar 2, 2023

Thank you!

@dapetcu21
Copy link
Contributor Author

Sent! https://github.com/critique-gaming/rethink-collections-bug It should boot you straight to the problem area. In the editor it should work fine (after skipping tutorial, it should show a character), but when bundled it soft-locks when the first char should be shown.

@AGulev
Copy link
Contributor

AGulev commented Mar 2, 2023

Great, thx! I'll take a look

@AGulev
Copy link
Contributor

AGulev commented Mar 2, 2023

Now I can repo it, thx!

@AGulev
Copy link
Contributor

AGulev commented Mar 2, 2023

@dapetcu21 Thanks to your example I found the issue. I'll prepare a PR tomorrow.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something is not working as expected
Projects
No open projects
Status: Done
Development

Successfully merging a pull request may close this issue.

2 participants