This happens due to using a null pointer, it can be caused by several situations:
calling status-go with invalid parameters
Calling status-go with a json that is missing a field somewhere can cause status-go to crash somewhere or throw an exception that is not being caught
listening for non existing events
If an event in which a corresponding emit
does not exist, it can cause this error
parsing json
when working with json, this error could be triggered for several reasons
if payload["contentType"].str == 2:
will crash because the value of contentType is 2
not "2"
value.str
instead of $value
(sometimes .getStr
)this happens due something missing in the QTObject, it's caused for when a proc is not marked as a slot, not being public, not part of a variant, missing the self attribute or not mapped in a qproperty if it is an accesor
TODO: add practical examples
this can happen due to a method being exposed to QT as a slot but using an object (like a model X) that is not a QtObject. possible solutions:
typically means types are missing for a method parameters
routine is likely not public or is being declared after the method calling it
This error happens when a Component
has multiple children, it must only contain one child, to fix it, put the component children inside a Item {}
Likely the function is missing a {.slot.}
pragma
If you are using an Input
QML prop, to get the current value use idName.TextField.text
instead of idName.text
a common scenario this error can happen is when trying to immediatly access something in status-go when the app starts before the node is ready. it can also happen due to 2 threads attempting to call & change something from status-go at the same time
Sometimes this can happen when using generics, it can be solved by either passing the parameters explicitily:
getSetting[string](self.status.settings, Setting.SigningPhrase)
or using typedesc param with :
like:
self.status.settings.getSetting[:string](Setting.SigningPhrase)
Typically this means the method has no return type and so result =
isn't necessary
This usually means a method that has no return type is being discarded
This tpyically means there is an import missing
There is likely a typo or the method is not public
Those look like
or
Those mean that you used anchors on an element that is manged by a Layout. Those are ColumnLayouts, StackLayouts, etc.
The first child of anything in a "Something"Layout will not have access to anchors (they will throw warnings).
First thing to ask yourself, do you really need a Layout? That's the easiest way to fix it. Unless you really need your block to be a row or a column that needs to go next/under another, use an Item or similar. Usually, you can still do the same effect anyway with anchors on the siblings
If you really need the Layout, then one way to fix is to set the first child of the Layout an Item
and then every other child inside the Item
. That way, all the children can use anchors. You can set
on the Item
to make it fill the whole parent so that nothing else needs to be changed.