PrpShop: Deleting an object crashes

Announcements and discussion regarding any projects related to Cyan Worlds' Plasma Engine including (but not limited to) CyanWorlds.com Engine, Drizzle, OfflineKI, PyPRP, and libHSPlasma.

Re: PrpShop: Deleting an object crashes

Postby diafero » Fri Jan 30, 2009 1:54 pm

After you last commit, I opened and saved the problematic file again, and after opening again, the empty category is gone. Did I understand it correctly that it now removed all references to the removed objects? But the objects which contain these references are still there?
I prefer e-mails to "diafero arcor de" (after adding the at and the dot) over PMs.

"Many people's horizon is a circle with a radius of zero. They call it their point of view."

Deep Island Shard | Offline KI
diafero
Deep Island Admin
 
Posts: 2966
Joined: Mon May 05, 2008 5:50 am
Location: Germany

Re: PrpShop: Deleting an object crashes

Postby Zrax » Fri Jan 30, 2009 3:14 pm

The current revision won't write the invalid key to the keyring any more, but that doesn't mean that the references to the key are gone. You can currently look in the PrpShop.log file to see if there are any keys that are being referenced that don't exist (but it won't show you where they're referenced from, since that's quite a bit more complex to do).
User avatar
Zrax
 
Posts: 206
Joined: Fri Sep 28, 2007 5:19 pm
Location: Waist-deep in a conecano

Re: PrpShop: Deleting an object crashes

Postby diafero » Sat Jan 31, 2009 3:47 am

Ok, so obviously some references are left, I get a message about two "erroneous keys". However, I first had to revert commit 290 of libPlasma ("PyPlasmified plInterfaceInfoModifier") - with it applied, PrpShop crashes while opening the file.

EDIT: Using prcdc, I found the two remaining references (they were in the SceneNode) and removed them, now I no longer get an error. libnPlasma r260 still causes PrpShop to crash while opening it though.

EDIT 2: I had to do "make clean && make" in PlasmaShop, now PrpShop no longer crashes (obviously it did not detect the API change so it didn't recompile - just "make" did nothing).
That warning is really useful, thanks a lot! Would it be possible to add some way of getting to it using the GUI? It could even be some general debug console which shows the log file, or at least some hint like "there is an error in the log file, go and check it".
I prefer e-mails to "diafero arcor de" (after adding the at and the dot) over PMs.

"Many people's horizon is a circle with a radius of zero. They call it their point of view."

Deep Island Shard | Offline KI
diafero
Deep Island Admin
 
Posts: 2966
Joined: Mon May 05, 2008 5:50 am
Location: Germany

Re: PrpShop: Deleting an object crashes

Postby Zrax » Sat Jan 31, 2009 1:42 pm

1) What you're seeing here is that some of libPlasma's header's have changed between builds; PrpShop will need to be re-linked when this happens, or it will cause the crashes you see. Sometimes I also make changes that will require libPlasma to be mostly rebuilt, but unfortunately I'm too lazy to get all of the header dependancy sorted out on the Linux and OSX makefiles, so doing a make clean when things break is usually the easiest way to fix that ^_^. The Windows project files will (usually) automatically rebuild dependancies though, so it's less of a worry.

2) I'm working on a key reference tracer script in Python (PyPlasma) which should help find those lingering key references. Unfortunately, there are still a lot of classes not exposed to PyPlasma, but so far it's working pretty well... For example, on the file you sent me, tracing the (deleted) audio interface produces this dependancy tree so far:
Code: Select all
$ ./tracekey.py DescentMystV_District_dsntFootRgns.prp plAudioInterface MusicEmitter
MusicEmitter [plAudioInterface]
    Region.004_SndRgn [plResponderModifier]
        Region.004 [plSceneObject]
            DescentMystV_District_FootRgns [plSceneNode]
                CaveStep05.001 [plSceneObject]
                    CaveStep05.001 [plCoordinateInterface]
                    CaveStep05.001 [plSimulationInterface]
                CaveStep05coll [plSceneObject]
                    CaveStep05coll [plSimulationInterface]
                Cylinder [plSceneObject]
                    Cylinder [plCoordinateInterface]
                    Cylinder [plSimulationInterface]
                Cylinder.001 [plSceneObject]
                    Cylinder.001 [plCoordinateInterface]
                    Cylinder.001 [plSimulationInterface]
                DesertRockSmall05coll [plSceneObject]
                    DesertRockSmall05coll [plSimulationInterface]
                DesertRockSmall07coll [plSceneObject]
                    DesertRockSmall07coll [plSimulationInterface]
                DesertRockSmall08coll [plSceneObject]
                    DesertRockSmall08coll [plSimulationInterface]
                DesertRockSmall09coll [plSceneObject]
                    DesertRockSmall09coll [plSimulationInterface]
                DesertRockSmall10coll [plSceneObject]
                    DesertRockSmall10coll [plSimulationInterface]
                DesertRockSmall12.001 [plSceneObject]
                    DesertRockSmall12.001 [plSimulationInterface]
                DesertRockSmall13coll [plSceneObject]
                    DesertRockSmall13coll [plSimulationInterface]
                DesertRockSmall14coll [plSceneObject]
                    DesertRockSmall14coll [plSimulationInterface]
                DesertRockSmall18coll [plSceneObject]
                    DesertRockSmall18coll [plSimulationInterface]
                DesertRockSmall19coll [plSceneObject]
                    DesertRockSmall19coll [plSimulationInterface]
                DesertRockSmall22coll [plSceneObject]
                    DesertRockSmall22coll [plSimulationInterface]
                EntrFtStp [plSceneObject]
                    EntrFtStp [plCoordinateInterface]
                    EntrFtStp [plSimulationInterface]
                FootStepRgn [plSceneObject]
                    FootStepRgn [plCoordinateInterface]
                    FootStepRgn [plSimulationInterface]
                FootStepRgn.001 [plSceneObject]
                    FootStepRgn.001 [plCoordinateInterface]
                    FootStepRgn.001 [plSimulationInterface]
                FootStepRgn.002 [plSceneObject]
                    FootStepRgn.002 [plCoordinateInterface]
                    FootStepRgn.002 [plSimulationInterface]
                FootStepRgn.003 [plSceneObject]
                    FootStepRgn.003 [plCoordinateInterface]
                    FootStepRgn.003 [plSimulationInterface]
                FootStepRgn.004 [plSceneObject]
                    FootStepRgn.004 [plCoordinateInterface]
                    FootStepRgn.004 [plSimulationInterface]
                FootStepRgn.005 [plSceneObject]
                    FootStepRgn.005 [plCoordinateInterface]
                    FootStepRgn.005 [plSimulationInterface]
                FootStepRgn.006 [plSceneObject]
                    FootStepRgn.006 [plCoordinateInterface]
                    FootStepRgn.006 [plSimulationInterface]
                FootStepRgn.007 [plSceneObject]
                    FootStepRgn.007 [plCoordinateInterface]
                    FootStepRgn.007 [plSimulationInterface]
                FootStepRgn.008 [plSceneObject]
                    FootStepRgn.008 [plCoordinateInterface]
                    FootStepRgn.008 [plSimulationInterface]
                FootStepRgn.009 [plSceneObject]
                    FootStepRgn.009 [plCoordinateInterface]
                    FootStepRgn.009 [plSimulationInterface]
                FootStepRgn.010 [plSceneObject]
                    FootStepRgn.010 [plCoordinateInterface]
                    FootStepRgn.010 [plSimulationInterface]
                FootStepRgn.011 [plSceneObject]
                    FootStepRgn.011 [plCoordinateInterface]
                    FootStepRgn.011 [plSimulationInterface]
                FootStepRgn.012 [plSceneObject]
                    FootStepRgn.012 [plCoordinateInterface]
                    FootStepRgn.012 [plSimulationInterface]
                FootStepRgn.013 [plSceneObject]
                    FootStepRgn.013 [plCoordinateInterface]
                    FootStepRgn.013 [plSimulationInterface]
                FootStepRgn.014 [plSceneObject]
                    FootStepRgn.014 [plCoordinateInterface]
                    FootStepRgn.014 [plSimulationInterface]
                FootStepRgn.015 [plSceneObject]
                    FootStepRgn.015 [plCoordinateInterface]
                    FootStepRgn.015 [plSimulationInterface]
                FootStepRgn.016 [plSceneObject]
                    FootStepRgn.016 [plCoordinateInterface]
                    FootStepRgn.016 [plSimulationInterface]
                FootStepRgn.017 [plSceneObject]
                    FootStepRgn.017 [plCoordinateInterface]
                    FootStepRgn.017 [plSimulationInterface]
                FootStepRgn.018 [plSceneObject]
                    FootStepRgn.018 [plCoordinateInterface]
                    FootStepRgn.018 [plSimulationInterface]
                FootStepRgn.019 [plSceneObject]
                    FootStepRgn.019 [plCoordinateInterface]
                    FootStepRgn.019 [plSimulationInterface]
                FootStepRgn.020 [plSceneObject]
                    FootStepRgn.020 [plCoordinateInterface]
                    FootStepRgn.020 [plSimulationInterface]
                Handle Collider [plSceneObject]
                    Handle Collider [plSimulationInterface]
                Handle Collider.001 [plSceneObject]
                    Handle Collider.001 [plSimulationInterface]
                Ladder [plSceneObject]
                    Ladder [plCoordinateInterface]
                    Ladder [plSimulationInterface]
                LwrTunlFtstp [plSceneObject]
                    LwrTunlFtstp [plCoordinateInterface]
                    LwrTunlFtstp [plSimulationInterface]
                LwrTunlFtstp.001 [plSceneObject]
                    LwrTunlFtstp.001 [plCoordinateInterface]
                    LwrTunlFtstp.001 [plSimulationInterface]
                LwrTunlFtstp.002 [plSceneObject]
                    LwrTunlFtstp.002 [plCoordinateInterface]
                    LwrTunlFtstp.002 [plSimulationInterface]
                RefGeo02.001 [plSceneObject]
                    RefGeo02.001 [plSimulationInterface]
                Region [plSceneObject]
                    Region [plSimulationInterface]
                Region.001 [plSceneObject]
                    Region.001 [plSimulationInterface]
                RestFtstp [plSceneObject]
                    RestFtstp [plCoordinateInterface]
                    RestFtstp [plSimulationInterface]
                Rock115coll [plSceneObject]
                    Rock115coll [plSimulationInterface]
                Rock118.001 [plSceneObject]
                    Rock118.001 [plSimulationInterface]
                Rock121.001 [plSceneObject]
                    Rock121.001 [plSimulationInterface]
                Rock129.001 [plSceneObject]
                    Rock129.001 [plSimulationInterface]
                Rock129.002 [plSceneObject]
                    Rock129.002 [plSimulationInterface]
                RungRgn [plSceneObject]
                    RungRgn [plCoordinateInterface]
                    RungRgn [plSimulationInterface]
                RungRgn.001 [plSceneObject]
                    RungRgn.001 [plCoordinateInterface]
                    RungRgn.001 [plSimulationInterface]
                RungRgn.002 [plSceneObject]
                    RungRgn.002 [plCoordinateInterface]
                    RungRgn.002 [plSimulationInterface]
                SfxRegSenDsnt-Stone [plSceneObject]
                    SfxRegSenDsnt-Stone [plCoordinateInterface]
                    SfxRegSenDsnt-Stone [plSimulationInterface]
                SfxRegSenFeet-Stone [plSceneObject]
                    SfxRegSenFeet-Stone [plCoordinateInterface]
                    SfxRegSenFeet-Stone [plSimulationInterface]
                ShaftFtstp [plSceneObject]
                    ShaftFtstp [plCoordinateInterface]
                    ShaftFtstp [plSimulationInterface]
                TunnelFtstp [plSceneObject]
                    TunnelFtstp [plCoordinateInterface]
                    TunnelFtstp [plSimulationInterface]
                TunnelFtstp.001 [plSceneObject]
                    TunnelFtstp.001 [plCoordinateInterface]
                    TunnelFtstp.001 [plSimulationInterface]
                TunnelFtstp.002 [plSceneObject]
                    TunnelFtstp.002 [plCoordinateInterface]
                    TunnelFtstp.002 [plSimulationInterface]
                TunnelFtstp.003 [plSceneObject]
                    TunnelFtstp.003 [plCoordinateInterface]
                    TunnelFtstp.003 [plSimulationInterface]
                TunnelFtstp.004 [plSceneObject]
                    TunnelFtstp.004 [plCoordinateInterface]
                    TunnelFtstp.004 [plSimulationInterface]
                UpperTunlFtstp [plSceneObject]
                    UpperTunlFtstp [plCoordinateInterface]
                    UpperTunlFtstp [plSimulationInterface]
                UpperTunlFtstp.001 [plSceneObject]
                    UpperTunlFtstp.001 [plCoordinateInterface]
                    UpperTunlFtstp.001 [plSimulationInterface]
                VolcanoFtstp [plSceneObject]
                    VolcanoFtstp [plCoordinateInterface]
                    VolcanoFtstp [plSimulationInterface]
                VolcanoFtstp.001 [plSceneObject]
                    VolcanoFtstp.001 [plCoordinateInterface]
                    VolcanoFtstp.001 [plSimulationInterface]
                VolcanoFtstp.002 [plSceneObject]
                    VolcanoFtstp.002 [plCoordinateInterface]
                    VolcanoFtstp.002 [plSimulationInterface]
                VolcanoFtstp.003 [plSceneObject]
                    VolcanoFtstp.003 [plCoordinateInterface]
                    VolcanoFtstp.003 [plSimulationInterface]
                VolcanoFtstp.004 [plSceneObject]
                    VolcanoFtstp.004 [plCoordinateInterface]
                    VolcanoFtstp.004 [plSimulationInterface]
                VolcanoFtstp.005 [plSceneObject]
                    VolcanoFtstp.005 [plCoordinateInterface]
                    VolcanoFtstp.005 [plSimulationInterface]
                WaterRgn [plSceneObject]
                    WaterRgn [plCoordinateInterface]
                    WaterRgn [plSimulationInterface]
                WaterRgn.002 [plSceneObject]
                    WaterRgn.002 [plCoordinateInterface]
                    WaterRgn.002 [plSimulationInterface]
            Region.004 [plCoordinateInterface]
            Region.004 [plSimulationInterface]
User avatar
Zrax
 
Posts: 206
Joined: Fri Sep 28, 2007 5:19 pm
Location: Waist-deep in a conecano

Re: PrpShop: Deleting an object crashes

Postby diafero » Sun Feb 01, 2009 2:24 am

1) What you're seeing here is that some of libPlasma's header's have changed between builds; PrpShop will need to be re-linked when this happens, or it will cause the crashes you see. Sometimes I also make changes that will require libPlasma to be mostly rebuilt, but unfortunately I'm too lazy to get all of the header dependancy sorted out on the Linux and OSX makefiles, so doing a make clean when things break is usually the easiest way to fix that ^_^. The Windows project files will (usually) automatically rebuild dependancies though, so it's less of a worry.
Ok, that is about what I thought, too, but it took me a while to figure that out :D

2) I'm working on a key reference tracer script in Python (PyPlasma) which should help find those lingering key references. Unfortunately, there are still a lot of classes not exposed to PyPlasma, but so far it's working pretty well... For example, on the file you sent me, tracing the (deleted) audio interface produces this dependancy tree so far:
The output seems to confirm what I already feared - if you remove one object and everything it references to and is referenced by, you end up removing the whole prp file since the plSceneNode references each plSceneObject (and perhaps the other way round, too). Of course one could stop doing recursion when you hit a plSceneNode and just remove the reference to the plSceneObject you removed, but I'm not sure if hardcoding something like that is a good idea. I will test your script as soon as you think it can be released :)
I prefer e-mails to "diafero arcor de" (after adding the at and the dot) over PMs.

"Many people's horizon is a circle with a radius of zero. They call it their point of view."

Deep Island Shard | Offline KI
diafero
Deep Island Admin
 
Posts: 2966
Joined: Mon May 05, 2008 5:50 am
Location: Germany

Re: PrpShop: Deleting an object crashes

Postby Zrax » Sun Feb 01, 2009 7:36 pm

It's generally better to remove the references within an object rather than amputating out half the PRP... ;)

In any case, I included the work I've done so far on the ref tracer script into revision 292... Like I say, it's still incomplete, but it looks through most of the major classes at least.
User avatar
Zrax
 
Posts: 206
Joined: Fri Sep 28, 2007 5:19 pm
Location: Waist-deep in a conecano

Re: PrpShop: Deleting an object crashes

Postby diafero » Mon Feb 02, 2009 2:11 am

Cool :)

Now, how do I have Python knowing PyPlasma? I get
Code: Select all
ImportError: No module named PyPlasma
I prefer e-mails to "diafero arcor de" (after adding the at and the dot) over PMs.

"Many people's horizon is a circle with a radius of zero. They call it their point of view."

Deep Island Shard | Offline KI
diafero
Deep Island Admin
 
Posts: 2966
Joined: Mon May 05, 2008 5:50 am
Location: Germany

Re: PrpShop: Deleting an object crashes

Postby Lontahv » Mon Feb 02, 2009 2:39 am

Have the .py script in the same dir as PyPlasma.pyd.

Another way is to put PyPlasma.pyd in the global import dirs in your Python install. I know for a fact that it works if put in either /Lib or /DLLs (DLLs might be called something else under Linux ;) ).

If you're in a Python terminal you might be able to change the current running path to be in a dir with your PyPlasma.pyd.
Currently getting some ink on my hands over at the Guild Of Ink-Makers (PyPRP2).
User avatar
Lontahv
Councilor of Artistic Direction
 
Posts: 1331
Joined: Wed Oct 03, 2007 2:09 pm

Re: PrpShop: Deleting an object crashes

Postby diafero » Mon Feb 02, 2009 5:52 am

Thanks for the quick reply :)

Have the .py script in the same dir as PyPlasma.pyd.
I don't have such a file anywhere in my Plasma directory, all I got is a PyPlasma.so in the bin/ directory, and executing the Python script in there still gives me the same error. Renaming it doesn't help (I didn't expect it to, anyway :D ) . Do I have to specify some make arguments or something like that for it to be built?
I prefer e-mails to "diafero arcor de" (after adding the at and the dot) over PMs.

"Many people's horizon is a circle with a radius of zero. They call it their point of view."

Deep Island Shard | Offline KI
diafero
Deep Island Admin
 
Posts: 2966
Joined: Mon May 05, 2008 5:50 am
Location: Germany

Re: PrpShop: Deleting an object crashes

Postby Zrax » Mon Feb 02, 2009 10:38 am

Only the Windows version names the file .pyd -- it's called PyPlasma.so on Linux. Paradox kept bugging me about putting the file in a "standard" location, so running "sudo make install" should put it in your python libs dir, assuming the method I used is as universal as I hope it is :P. That will also ensure that libPlasma.so is in a location that PyPlasma can access it.
User avatar
Zrax
 
Posts: 206
Joined: Fri Sep 28, 2007 5:19 pm
Location: Waist-deep in a conecano

PreviousNext

Return to Plasma Development

Who is online

Users browsing this forum: No registered users and 0 guests

cron