Accessed None trying to read Property at SlotAsCanvasSlots SetPosition?

Hi there…

I´m working on some own generic Widgets, like a Slider/Progress Bar.
It is working like a charm, wehn having a maximum count of 2 Parents above it. When getting into the 3rd Layer of Parents, i get a bunch of “Accessed None trying to read Property” Errors, based on the SlotAsCanvasSlot Function SetPosition, everytime i move the Thumb to change Values…

Sow, here is the Code:

this constellation is working:
Working.jpg

This one not:
NotWorking.jpg

And it throws out this Error a few hundret times:

the Number at ReturnValue changes from 7,9 to 10… don´t know what this is depending on.

The Tick Event is for performing a Drag/Drop on Line and Sets the Position of the Thumb, depending on the mouse local-Widget position.
I´ve no clue, why it works, when theres only 1 or 2 Parents, but not after the 3rd one…
The Thumb and Canvas Slot is valid (cause i check them).

The SetValue Function is called, even there are errors… But everytime i close the Testplay (STOP Game), the Message Log explodes of those Errors…

Any ideas?

The *BDCUI_SlideProgress *is a child of a vertical box, not the canvas - so a canvas slot for it does not exist. Are you sure you’re not doing Self->As Canvas Slot anywhere?

edit: here maybe:

Capture.PNG

The Self->SlotAsCanvasSlot is to calculate the local Position of the Mouse inside the Widget and isn‘t part of the thumb button :confused:

The error explicit says, that the cancasSlot-> SetPosition of the Thumb is the Problem. By clicking on the error, it highlights the market setPosition.

If you do Self->SlotAsCanvasSlot, you’re assuming that the *BDCUI_SlideProgress *is a child of the canvas, which is not true. When you say:

that would pretty much confirm it as the widget is re-parented here. I’m not saying that I understand the setup but that’s what the error you posted is saying. The Set Position is trying to access non-existent data - the canvas slot that is not there.

But the SetPosition sets the position of the thumb, which is set inside a canvas, which is set inside a border…

means:
UserWidgetSlider
CanvasPanel
>SizeBox
>>CanvasPanel
>>>Image
>>>Image
>>>Image
>>>Thumb

i‘m confused…
i never do a self->SlotAsCanvasSlot->SetPosition

only Thumb->SlotAsCanvasSlot-SetPosition

Thanks for confirming, can you tell what is the bit in the bottom left? The one I highlighted as it *seems *you’re doing what I was suspecting. I might, of course, be wrong. It’s kind of hard to read with all straight wires.

It may not be about Set Position per se, just doing self->SlotAsCanvasSlot will produce errors here. Perhaps you access it in order to calculate something else, the errors will only manifest once the actual evaluation takes place - an execution input calls for it.

But do tell if you’re absolutely sure that you’re not trying to access *BDCUI_SlideProgress *as canvas slot anywhere.

Seems like an issue with the ‘thumb’ variable as that is the one connected to the set position node and for which you call ‘slot as canvas slot’. Can you post the code that works to blueprintue.com along with the above code so we can more easily see the nodes and how they connect in both scenarios?

Posting to blueprintue here: blueprintUE | PasteBin For Unreal Engine 4
(some Nodes seem not to be supported ^^’ )

The Bottom Left takes the mouse Position in the Viewport, takes the Widgets viewport position… and subtracts it from the mouse position.
This leads into a local, widget local, mouse position.

here´s the complete code with UMG Hierarchy:

Well, bottom left corner, as I said:


and:

image_164764.jpg

Your widget is not sitting in the canvas but you’re treating it as if it was.

i tried now to put it inside a canvas, instead of the vertical box. Same Error

You previously said it was working while in the canvas - your first post. So what changed?

I said, it works if there are 2 Canvases as parent…
Means:
canvas > canvas > widget

But:
canvas > canvas > canvas > widget
OR
canvas > canvas > box/button/grid…etc > widget

Are not working…

Trying to help but I can only go by the images you posted and by the error message itself. If you place the BDCUI_SlideProgress *directly *in a canvas, do you still get the same error message?

Hi, was it ever solved? and yeah i know its 2years old but its an unsolved post so…

I believe so. OP never responded.

If you want a canvas slot, your widget has to be directly parented to a canvas panel. Originally the wdget was in a vertical box instead.