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

2024.12 and Nightly crashing on layout center group select/right click #4633

Closed
derwin12 opened this issue Jun 25, 2024 · 16 comments
Closed

Comments

@derwin12
Copy link
Collaborator

derwin12 commented Jun 25, 2024

Shown last night to Scott ..
xLightsProblemCrash.zip

Open layout, Click on Wreath Rings .. on the layout screen right click and "Set Center Offset Here" .. do it like 3 times in various places.
Now click on subs and then right click and "Set Center Offset Here". Repeat once more and crash.

Walking from an exception.
[01]	ADDR:0x00007ff784787a85	HMODULE:0x00007ff783fd0000	00000000007b7a40	LayoutPanel.obj	?ModelsSelectedCount@LayoutPanel@@IEBAHXZ@562685 
[02]	ADDR:0x00007ff78477aecc	HMODULE:0x00007ff783fd0000	00000000007aad80	LayoutPanel.obj	?OnPreviewRightDown@LayoutPanel@@QEAAXAEAVwxMouseEvent@@@Z@555ACC 
@AzGilrock
Copy link
Collaborator

AzGilrock commented Jun 25, 2024 via email

@AzGilrock
Copy link
Collaborator

AzGilrock commented Jun 25, 2024 via email

@derwin12
Copy link
Collaborator Author

And what someone should really look at is why is the program doing a RecalcStartChannels that many times in 5 seconds and all the [ERROR| Really strange.... comments in the log.

And that might be the trigger .. stuff is going on in parallel that needs some sort of block to stop it from happening.

@cybercop23
Copy link
Collaborator

I know right.. we really need to dig into the recalc. Shouldn't be doing it so much, but I guess it was always just rest to add doasap work and let it ride.

@AzGilrock
Copy link
Collaborator

AzGilrock commented Jun 25, 2024 via email

@derwin12
Copy link
Collaborator Author

all the [ERROR| Really strange.... comments in the log.
I believe there is one for each of the submodels in the group. So it is flagging/erroring the group containing a submodel rather than an actual model.

@derwin12
Copy link
Collaborator Author

Doing some debugging .. this might not help anyone :-)
If I click on the wreaths and right click .. it correctly says .. hey no models here .. just 10 submodels.
When I right click again .. it (apparently) doesnt know what is selected, perhaps because of the reload/recalc. Anyways.. not with sees all of the models in the preview - not just the wreath that was selected.
ie. It now thinks all the models are selected in the preview window not just the single item/wreath.

@derwin12
Copy link
Collaborator Author

This guy ... scary..
It is messing up the model chosen etc .. when the group is all submodels.

xlights->GetOutputModelManager()->AddASAPWork(OutputModelManager::WORK_RELOAD_ALLMODELS, "LayoutPanel::OnModelsPopup::ID_SET_CENTER_OFFSET", nullptr, nullptr, GetSelectedModelName());

@AzGilrock
Copy link
Collaborator

AzGilrock commented Jun 25, 2024 via email

@computergeek1507
Copy link
Member

Is it broken in .11 and what happens if you revert Daryl's center point changes?

@derwin12
Copy link
Collaborator Author

That code is indeed required .. or it doesnt update the x & y positions.
The code that is causing it .. is this one that I flagged a while back. It adds submodels to the models list. It causes a bunch of assert exceptions. It seems to be fine without the push, ie just ignore submodels when building the list of models.
Thoughts on this - do I push the pr to do some more testing? (Line 1521 layoutPanel.cpp)
This was likely there for a long time but really only shows a problem with groups of entirely just submodels.

                        if (m->DisplayAs == "SubModel") {
                            if (mark_selected) {
                              //  prev_models.push_back(m);  // setting this causes exception when prev_models render finds a submodel
                            }
                        }

derwin12 added a commit to derwin12/xLights that referenced this issue Jun 25, 2024
@derwin12
Copy link
Collaborator Author

Also that code makes it go here..
image

@blun23
Copy link

blun23 commented Jun 26, 2024

Was this code added because you couldn't click on a group with only submodels in it and set center point? That was fixed a month or so back. If you clicked on a group of models or a group that had both submodels and models in it, you could right click and set center point. I don't know all the code stuff (yet, we will see if I get bored and deep dive), but there has to be something along those lines.

@derwin12
Copy link
Collaborator Author

derwin12 commented Jun 26, 2024

No, this was here years ago. The center point just focused and highlighted this crash during testing and revealed the bug. ie Groups of submodels. Seems it was always there it perhaps was just masked by things like the above. Not 100% certain though .. just a novice's view.

@AzGilrock
Copy link
Collaborator

AzGilrock commented Jun 26, 2024 via email

@AzGilrock
Copy link
Collaborator

AzGilrock commented Jun 26, 2024 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants