Strange abort with function inside custom type

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Strange abort with function inside custom type

Cody Scott-2
I have a custom type and if there is a function created inside the custom type there is a SIGSEGV

https://gist.github.com/Siecje/ae3f033daca3cfb52d8060dde2a08b91

This is using PyQt5==5.8.1.1


_______________________________________________
PyQt mailing list    [hidden email]
https://www.riverbankcomputing.com/mailman/listinfo/pyqt
Reply | Threaded
Open this post in threaded view
|

Re: Strange abort with function inside custom type

Phil Thompson-5
On 21 Mar 2017, at 3:42 pm, Cody Scott <[hidden email]> wrote:
>
> I have a custom type and if there is a function created inside the custom type there is a SIGSEGV
>
> https://gist.github.com/Siecje/ae3f033daca3cfb52d8060dde2a08b91
>
> This is using PyQt5==5.8.1.1

This is a bug but I don't think it is fixable. Trying to integrate QML with (dynamic) Python is never going to work as well as with (static) C++. PyQt does it's best to fool QML into thinking it is talking to C++ but I think this is a step too far. The QML implementation just keeps too much information under the covers.

Generally I'd recommend keeping the QML to a minimum - just use it to implement the view and implement all model and controller code in Python.

Phil
_______________________________________________
PyQt mailing list    [hidden email]
https://www.riverbankcomputing.com/mailman/listinfo/pyqt
Reply | Threaded
Open this post in threaded view
|

Re: Strange abort with function inside custom type

Cody Scott-2
FWIW this was working in PyQt<5.8

The function is only used in QML.




On Tue, Mar 21, 2017 at 7:21 PM, Phil Thompson <[hidden email]> wrote:
On 21 Mar 2017, at 3:42 pm, Cody Scott <[hidden email]> wrote:
>
> I have a custom type and if there is a function created inside the custom type there is a SIGSEGV
>
> https://gist.github.com/Siecje/ae3f033daca3cfb52d8060dde2a08b91
>
> This is using PyQt5==5.8.1.1

This is a bug but I don't think it is fixable. Trying to integrate QML with (dynamic) Python is never going to work as well as with (static) C++. PyQt does it's best to fool QML into thinking it is talking to C++ but I think this is a step too far. The QML implementation just keeps too much information under the covers.

Generally I'd recommend keeping the QML to a minimum - just use it to implement the view and implement all model and controller code in Python.

Phil


_______________________________________________
PyQt mailing list    [hidden email]
https://www.riverbankcomputing.com/mailman/listinfo/pyqt
Reply | Threaded
Open this post in threaded view
|

Re: Strange abort with function inside custom type

Phil Thompson-5
On 22 Mar 2017, at 1:01 pm, Cody Scott <[hidden email]> wrote:
>
> FWIW this was working in PyQt<5.8
>
> The function is only used in QML.

The bug is caused by the fix for another bug you reported (related to properties) which itself was caused by changes in Qt v5.8.0.

I think it is more important that properties work than the ability to define JavaScript functions.

Phil

> On Tue, Mar 21, 2017 at 7:21 PM, Phil Thompson <[hidden email]> wrote:
> On 21 Mar 2017, at 3:42 pm, Cody Scott <[hidden email]> wrote:
> >
> > I have a custom type and if there is a function created inside the custom type there is a SIGSEGV
> >
> > https://gist.github.com/Siecje/ae3f033daca3cfb52d8060dde2a08b91
> >
> > This is using PyQt5==5.8.1.1
>
> This is a bug but I don't think it is fixable. Trying to integrate QML with (dynamic) Python is never going to work as well as with (static) C++. PyQt does it's best to fool QML into thinking it is talking to C++ but I think this is a step too far. The QML implementation just keeps too much information under the covers.
>
> Generally I'd recommend keeping the QML to a minimum - just use it to implement the view and implement all model and controller code in Python.
>
> Phil
>

_______________________________________________
PyQt mailing list    [hidden email]
https://www.riverbankcomputing.com/mailman/listinfo/pyqt
Reply | Threaded
Open this post in threaded view
|

Re: Strange abort with function inside custom type

Cody Scott-2
This works again in PyQt5==5.11.3 on Windows 10 with Python 3.7.0 64-bit.

On Wed, 22 Mar 2017 at 17:18, Phil Thompson <[hidden email]> wrote:
On 22 Mar 2017, at 1:01 pm, Cody Scott <[hidden email]> wrote:
>
> FWIW this was working in PyQt<5.8
>
> The function is only used in QML.

The bug is caused by the fix for another bug you reported (related to properties) which itself was caused by changes in Qt v5.8.0.

I think it is more important that properties work than the ability to define JavaScript functions.

Phil

> On Tue, Mar 21, 2017 at 7:21 PM, Phil Thompson <[hidden email]> wrote:
> On 21 Mar 2017, at 3:42 pm, Cody Scott <[hidden email]> wrote:
> >
> > I have a custom type and if there is a function created inside the custom type there is a SIGSEGV
> >
> > https://gist.github.com/Siecje/ae3f033daca3cfb52d8060dde2a08b91
> >
> > This is using PyQt5==5.8.1.1
>
> This is a bug but I don't think it is fixable. Trying to integrate QML with (dynamic) Python is never going to work as well as with (static) C++. PyQt does it's best to fool QML into thinking it is talking to C++ but I think this is a step too far. The QML implementation just keeps too much information under the covers.
>
> Generally I'd recommend keeping the QML to a minimum - just use it to implement the view and implement all model and controller code in Python.
>
> Phil
>


_______________________________________________
PyQt mailing list    [hidden email]
https://www.riverbankcomputing.com/mailman/listinfo/pyqt