Switch.framerfx icon indicating copy to clipboard operation
Switch.framerfx copied to clipboard

Adding a state to a component causes framerx crash

Open tannerhallman opened this issue 5 years ago • 5 comments

When I install this and link it to a component to set up the states, it causes framerx to crash.

framerx v 1.1.7 switch 1.14.0

screencast 2020-02-15 16-17-38

tannerhallman avatar Feb 15 '20 21:02 tannerhallman

Having similar issue. After Switch and Framer updates Losing state causes component references to get lost. Have to relink each state. If switch is duplicated. Error gets created causing crash, and lose sated references.

This component has been invaluable, hope a resolution can be found. Much appreciated in advance for any help.

Framerx v 50 Switch 1.14.0

ghost avatar Feb 28 '20 15:02 ghost

@tannerhallman Can you tell me a little bit more about what you're trying to achieve in your example? It looks like you're connecting the Switch from a component master to an instance of itself. What this will do is try to replicate the change in the master to its instance, so you have a Switch that's trying to render the component instance that contains it, so the switch will again try to render the instance, which will again try to render the Switch, and so on until Framer crashes. You're creating an infinite loop. I can add some guards against a similar situation, but maybe there's a way to help you achieve what you're trying to do without getting into this situation altogether.

@ddiomede-cipherloc from what you're describing, this seems like a different problem. There's still an open bug in Framer, where if the component loading budget is exhausted before Switch has had a chance to load, Framer will say that the component doesn't exist, and loose all component links. One way to know if you're hitting that bug is that under the Switch package, you'll no longer see the Switch component, just a SwitchToStateAction. There's no easy solution to that one, aside from ensuring that all components load as fast as possible, and that you don't have a ton of unused packages. You can also send me the project you're seeing this on, and I can take a deeper look.

tisho avatar Mar 24 '20 14:03 tisho

@tisho Thank you for your reply.

I think the issue I am having is reusing the state. If I have a button that I am using in multiple frames, it seems to have a conflict. I'd be happy to send over the file. It's a bit screwed up in my trying different things and slight frustrations.Is there an email address or twitter handle I can send a link to for you to download? I cannot share publicly.

diomededavid avatar Mar 24 '20 15:03 diomededavid

@tisho Thank you for your reply.

I think the issue I am having is reusing the state. If I have a button that I am using in multiple frames, it seems to have a conflict. I'd be happy to send over the file. It's a bit screwed up in my trying different things and slight frustrations.Is there an email address or twitter handle I can send a link to for you to download? I cannot share publicly.

The file would be great. You can email it to [email protected], [email protected], or DM me on Twitter @tisho.

tisho avatar Mar 24 '20 16:03 tisho