I'll put together the test case and try to send it through later this evening. I don't believe PySide exposes QStrings at all. You only interact with Python strings, but it may be their code behind the scenes that is causing the crash when dealing with Python strings to QStrings.
Thanks! -tony On Wed, Oct 24, 2012 at 5:08 PM, Tim Crowson <[email protected] > wrote: > I know Eric T. has mentioned this before, and I can confirm: Softimage > will crash to desktop if you try to run standard python string methods on a > QString. In some cases, you can use the QString equivalent, for example '* > endswith*' (Python) vs '*endsWith*' (Qt), but in other cases you may just > have to wrap it all in a str(). > -Tim C. > > > > On 10/24/2012 12:42 PM, Steven Caron wrote: > > hey tony > > when i was at blur we had a different Qt implementation and it had issues > crashing hard. one of the issues which would bite us regularly was how > strings were handled between python and Qt. maybe this is the same case? i > forget exactly but i think python doesn't like the QString. i know pyqt has > addressed this but maybe pyside hasn't? > > please send some test code and log it on the issues section of the github > page, i can run it on at least two machines. > steven > > On Tue, Oct 23, 2012 at 7:11 AM, Tony Barbieri <[email protected]> wrote: > >> Hello Everyone...Again :). >> >> Have any of you experienced hard crashes to desktop when working with >> Qt in Soft? We were doing some layout creation inside separate functions, >> running a loop over a list of those function pointers and returning the >> resulting layout directly to an addLayout call. I know this isn't standard >> practice, but in this case we were building quite a few separate isolated >> layouts and adding them to a master layout. If an exception was raised >> inside one of these layout generating functions Soft would immediately show >> the desktop. Removing this loop, doing the function >> calls separately, adding the result to a variable first and then using >> addLayout seems to allow proper exception catching without hard crashing >> Soft. >> >> Running this same code in Maya does not cause the hard crash. Has >> anyone else seen any instances of instability using Qt in Soft? It makes >> me really nervous that a UI could potentially show the desktop and cause a >> user to lose work. We are using PySide, but I am curious if PyQt has the >> same problem. I can send some test code if anyone has time to test with >> their setups. >> >> Thanks! >> >> -tony >> >> >> On Tue, Oct 16, 2012 at 3:14 PM, Tony Barbieri <[email protected]>wrote: >> >>> Yea I agree. Ok, well if/when we end up making one, we'll pass it >>> along. >>> >>> Thanks! >>> >>> -tony >>> >>> >>> On Tue, Oct 16, 2012 at 2:59 PM, Steven Caron <[email protected]> wrote: >>> >>>> no, we haven't made one... if anyone makes one that is more in line >>>> with softimage's i will add it. simply including the .css file for users to >>>> load into their gui, i wouldn't want to hardcode it because some people >>>> might want their application to display consistently across standalone, >>>> maya, and softimage. >>>> >>>> s >>>> >>>> >>>> On Tue, Oct 16, 2012 at 11:48 AM, Tony Barbieri <[email protected]>wrote: >>>> >>>>> Cool, I'll just remove it. >>>>> >>>>> On another note, do you guys have a nicer Qt stylesheet that gives >>>>> the UI a more Softimage look and feel? The default QApplication style >>>>> is...bright. >>>>> >>>>> Thanks again! >>>>> >>>>> -tony >>>>> >>>>> >>>>> On Tue, Oct 16, 2012 at 2:07 PM, Steven Caron <[email protected]>wrote: >>>>> >>>>>> ya, children() method of a QObject returns a QList which has the at() >>>>>> method and the index operator. >>>>>> >>>>>> as jo said, this plugin was incomplete, i think it is actually safe >>>>>> to remove the listener code as you did first. as long as the python code >>>>>> for sending key events doesn't become a performance bottleneck i dont see >>>>>> the need to port this to cpp. >>>>>> >>>>>> s >>>>>> >>>>>> >>>>>> On Tue, Oct 16, 2012 at 10:54 AM, Tony Barbieri >>>>>> <[email protected]>wrote: >>>>>> >>>>>>> Hey Jo, >>>>>>> >>>>>>> Thanks for the welcome and reply! >>>>>>> >>>>>>> I totally understand. I'm not sure where the debug info is coming >>>>>>> from, but I did manage to *solve* it by changing one line in your demo >>>>>>> code. I noticed that in the VK_UP case statement you had put: >>>>>>> >>>>>>> QApplication::sendEvent(sianchor->children().at(i), &e); >>>>>>> >>>>>>> And in the VK_DOWN case statement you had: >>>>>>> >>>>>>> QApplication::sendEvent(sianchor->children()[i], &e); >>>>>>> >>>>>>> Changing the VK_UP statement to match the VK_DOWN statement does >>>>>>> make the debug info go away but I haven't tested to make sure that it is >>>>>>> even being called correctly anymore. No errors are thrown so I am >>>>>>> assuming >>>>>>> it is ok. I'm also not sure what the difference with using .at vs using >>>>>>> [n] is. >>>>>>> >>>>>>> I don't consider this solved, but it does make the print statement >>>>>>> go away for now. >>>>>>> >>>>>>> Thanks again for the reply and for sharing your technique! >>>>>>> >>>>>>> Best, >>>>>>> >>>>>>> -tony >>>>>>> >>>>>>> On Tue, Oct 16, 2012 at 1:34 PM, jo benayoun >>>>>>> <[email protected]>wrote: >>>>>>> >>>>>>>> hey Tony, >>>>>>>> welcome aboard. I did not find any explicit message that would >>>>>>>> match what you get (I quickly grep the source code, this would deserve >>>>>>>> much >>>>>>>> more investigations). >>>>>>>> As you're the first one to report this kind of problem, and as you >>>>>>>> have compiled pyside, Ive emitted the idea that it could be one of the >>>>>>>> qt >>>>>>>> source numerous debug messages because of a debug flag accidentally >>>>>>>> turned >>>>>>>> on for compilation. Even if I wish, I can't really help on that one, I >>>>>>>> miss time because of the job and my other commitments but feel free to >>>>>>>> use >>>>>>>> my email anytime ... >>>>>>>> For completeness, the code in cpp you can find in the plugin has >>>>>>>> been put there to show the way I did my personal qt integration when >>>>>>>> people >>>>>>>> were asking how ... Ive always warned and repeated about the fact that >>>>>>>> this >>>>>>>> is what it is, a demo code ... Ive been just too busy (or maybe lazy) >>>>>>>> to >>>>>>>> release the complete thing I guess. besides, I've not worked that much >>>>>>>> with pyside in softimage, mainly because when I wrote the code, pyside >>>>>>>> wasnt even in beta and studios are still committed to riverbank ... but >>>>>>>> considering the only major difference between pyqt and pyside is the >>>>>>>> vendor >>>>>>>> and the binding generator, this doesn't change anything on its usage >>>>>>>> with >>>>>>>> the plugin nor with the way I used to integrate qt into proprietary >>>>>>>> softwares ... >>>>>>>> -- jo >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> 2012/10/16 Tony Barbieri <[email protected]> >>>>>>>> >>>>>>>>> Hey Steven, >>>>>>>>> >>>>>>>>> I just joined the list this morning so I could join in the >>>>>>>>> conversation. Do you happen to know if Jo found that in the actual Qt >>>>>>>>> source code or in PySide? >>>>>>>>> >>>>>>>>> I compiled both debug and release but compiled PySide against >>>>>>>>> the release .dlls. >>>>>>>>> >>>>>>>>> Thanks! >>>>>>>>> >>>>>>>>> -tony >>>>>>>>> >>>>>>>>> so, you guys are compiling it yourself... maybe with debug mode >>>>>>>>> on? jo just grep'd the qt code base and found debug message with >>>>>>>>> "caught" >>>>>>>>> in it >>>>>>>>> >>>>>>>>> >>>>>>>>> On Mon, Oct 15, 2012 at 4:54 PM, Steven Caron <[email protected]> >>>>>>>>> wrote: >>>>>>>>> >>>>>>>>>> oh nice! >>>>>>>>>> >>>>>>>>>> >>>>>>>>>> On Mon, Oct 15, 2012 at 4:46 PM, Bradley Gabe <[email protected] >>>>>>>>>> > wrote: >>>>>>>>>> >>>>>>>>>>> Tony said he didn't have to do any "work" to get PySide going. >>>>>>>>>>> He just compiled the latest version... >>>>>>>>>> >>>>>>>>>> >>>>>>>>> -- >>>>>>>>> -tony >>>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>> >>>>>>> >>>>>>> -- >>>>>>> -tony >>>>>>> >>>>>> >>>>>> >>>>> >>>>> >>>>> -- >>>>> -tony >>>>> >>>> >>>> >>> >>> >>> -- >>> -tony >>> >> >> >> >> -- >> -tony >> > > > -- > > -- -tony

