Register to post in forums, or Log in to your existing account
 

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » CMUD Beta Forum
Tech
GURU


Joined: 18 Oct 2000
Posts: 2733
Location: Atlanta, USA

PostPosted: Tue Apr 10, 2007 10:43 pm   

[1.26] Problems uploading a package
 
I am having trouble uploading my package to the package library. There was always some weird XML download error with it. On the chance that it was my source package was corrupted it, I recreated it and then updated it. When I tried to pull it down though I got the same errors.

This is a really basic package (Just 5 windows and some #CAPTURE triggers) so I figured that the server version must be bad. I decided to uninstall it locally and then delete it from the library. When I go back to my package though, it's listed as being installed in the Package Library even though there is no reference to in the Package Library or the Packages folder (I deleted those). When I do a 'View in Package Library' on the Package Properties tab it tries to find it, reports that it can't be found then throw a CMUD error.

I get desperate and things go from bad to worse. I backed up and then deleted the pkgcache.db file (hoping that CMUD would recreate the file when I do a sync.) CMUD attempts to do this, but it's not happy about it at all. It throws several errors while attempting to update. It eventually creates but it seems to be hosed. Filters file fail miserably and point to things other than you select. A reinstall (NOT a clean one) doesn't seem to help any.

All the while my package still lists itself as being in the package library.

The only other odd thing I can think of is that the my NEW package (i.e. the one I recreated) had the same name had the same file name as the one in the Package Library but it was stored in a different folder.

Any ideas?? I'm completely stumped by this one.
_________________
Asati di tempari!
Reply with quote
Zugg
MASTER


Joined: 25 Sep 2000
Posts: 23379
Location: Colorado, USA

PostPosted: Wed Apr 11, 2007 1:06 am   
 
Definitely sounds like a problem. It's possible that some corrupted data has gotten uploaded into the package library that is preventing the pkgcache.db from being reloaded properly. I'll try deleting the file and doing an update here to see if I can track down the problem.

What is the name of the package in the library that shouldn't be there?

Normally, if the package library is showing something as "installed", there is a command called "Synchronize installed packages" in the File menu that will resync the installed flags based upon the packages found in your Packages folder. These flags are cached in the pkbcache.db cache, so if you delete a file from the Packages folder, it might not get noticed by the package library until you resync it.

Edited: It definitely looks like there are some problems with the package library. I did an update and didn't get errors, but I did get a bunch of blank packages, and also some packages without the Author field set. So something has definitely gotten messed up in one of the past couple of versions. I'll look into this this week and see if I can get it fixed and cleaned up.
Reply with quote
Tech
GURU


Joined: 18 Oct 2000
Posts: 2733
Location: Atlanta, USA

PostPosted: Wed Apr 11, 2007 4:40 am   
 
Just a clarification... it was deleted from the package library and was actually no longer showing up in my package library, however when I go to the edit properties of the package itself, it was list as being installed in the package library.
_________________
Asati di tempari!
Reply with quote
Zugg
MASTER


Joined: 25 Sep 2000
Posts: 23379
Location: Colorado, USA

PostPosted: Wed Apr 11, 2007 5:33 pm   
 
Ahh, OK, now I see what you are talking about. Yes, the value being used to show the installed status in the package properties isn't getting cleared by the Delete routine. So that's a new bug. But I'll still try to figure out why the updates for the package library aren't coming in correctly.
Reply with quote
Zugg
MASTER


Joined: 25 Sep 2000
Posts: 23379
Location: Colorado, USA

PostPosted: Thu Apr 12, 2007 9:37 pm   
 
Well, the partially good news is that I don't see anything in the package library on the server from you. So none of your attempts made it to the server. I fixed some bugs regarding recreating the pkgcache.db file and also improved how it handles the updates so that it keeps track of the last update time better. Before it was using a value in the INI file, which could easily get out of sync with the actual database file. I made the same kind of improvement to the help database a while ago, so I've added this same change to the package library so that the timestamp of the last update is stored in the database file itself instead of the ini file.

This doesn't help much with the actual errors you were getting when you tried uploading the file. I'd need to see the exact package you were trying to upload to see if I can reproduce the XML error. Is it one of the packages you have sent me already?
Reply with quote
Tech
GURU


Joined: 18 Oct 2000
Posts: 2733
Location: Atlanta, USA

PostPosted: Thu Apr 12, 2007 9:55 pm   
 
I already sent you those files as well as my pkgcache.db in an email a few days ago, and referenced this forum post.

If I understand your edit correctly though, should I just be able to updated that lastupdate timestamp and then it will be automatically detected that my package is not in the package library, or will I have to wait for the next version to get a resolution?

[Edit]

I understand how the recreate of the pkgcache.db should now be better, but I don't quite get why the package itself still thinks it is installed. I poked around the pkg itself and didn't see anything that was an obvious indicator for this.
_________________
Asati di tempari!
Reply with quote
Zugg
MASTER


Joined: 25 Sep 2000
Posts: 23379
Location: Colorado, USA

PostPosted: Fri Apr 13, 2007 5:12 pm   
 
In the actual *.PKG file, look in the "desc" table and you will see a field named "PkgId". This is a pointer into the ID field of your PkgCache database. If this PkgID field is not -1 then the 1.26 version of CMUD shows the package as installed. The bug is that this field in the *.PKG file is not cleared when a package is deleted from the library PkgCache.

I tested this more in v1.27 and it all seems fixed now. When I first load your SBWindows package and go to the Package Properties, it still says that it is loaded in the library, and the button is labeled "View in Library". Of course, it's not really installed in my library...it's just the PkgID field in the *.PKG file that is set wrong.

But in 1.27, when I click the View in Library button, it detects that the package isn't in the library, and gives me a message "Cannot find package". And then, magically, the package properties screen has changed the "View" button to "Add to library". When I click the Add to Library button, the package gets added to the library. And when I use the Upload package, it seems to upload it to the server without any error. Then, when I use the "Delete from Server" button, the package is deleted from the server and from the local package library. And now the package properties no longer shows the package as installed.

So, the entire add, upload, delete cycle has now been tested with your package and seems to work fine in 1.27. But I'll let you test it again yourself when you get the new version (hopefully later tonight).
Reply with quote
Tech
GURU


Joined: 18 Oct 2000
Posts: 2733
Location: Atlanta, USA

PostPosted: Fri Apr 13, 2007 5:29 pm   
 
That is great news Zugg!! (I hope you don't mind if I edit my package manually and attempt to correct the problem myself.) To at least see why the upload keeps failing. And hopefully we get 1.27 tonight. It promises to be a great release.
_________________
Asati di tempari!
Reply with quote
Tech
GURU


Joined: 18 Oct 2000
Posts: 2733
Location: Atlanta, USA

PostPosted: Sat Apr 14, 2007 8:24 am   
 
I've played around with this some more and I'm having the same issue with 1.27. It seems that only part of the data in the file is being uploaded, so as a result only a portion of it is being downloaded and throwing an error. I'm not sure why it's not properly uploading though? I'm 95% sure the package isn't corrupt but I'm going to try a complete different package to see if that helps. I'll also try to recreate it once more.
_________________
Asati di tempari!
Reply with quote
Tech
GURU


Joined: 18 Oct 2000
Posts: 2733
Location: Atlanta, USA

PostPosted: Sat Apr 14, 2007 4:40 pm   
 
Ok, I've bee doing more testing with this and the problem seems to arise when I upload a package with a Window defined in it.

To test this, I create a new package with just a module and a test alias. I uploaded this to the server and then tried to download it again, and this all worked fine.

I then added a Window to this package, uploaded it, and when I tried to download it again, I got the error.

For this particular package it says the error occurs at line 45, which when I look at the exported XML is where the window definition starts (if you discount the XML header). I didn't see anything obviously wrong with that, but I don't know if I fully understand the underlying DB either. Here's the exported XML.

Code:
<?xml version="1.0" encoding="UTF-8" ?>
<cmud>
<module name="BasicTest">
  <record id="4194304">
    <id>4194304</id>
    <kind>0</kind>
    <parent>-1</parent>
    <pkgid>4194304</pkgid>
    <enabled>-1</enabled>
    <idname>BasicTest</idname>
    <options/>
    <userval>{CA2B8D38-D1AC-434B-BE49-305A0F0EBC14}</userval>
    <val/>
    <comment/>
    <name>{*}</name>
    <subkind>0</subkind>
    <valkind/>
    <opt>320</opt>
    <owner>-1</owner>
    <userint/>
    <priority/>
    <flag>128</flag>
    <state>0</state>
  </record>
  <record id="4194305">
    <id>4194305</id>
    <kind>2</kind>
    <parent>4194304</parent>
    <pkgid>4194304</pkgid>
    <enabled>-1</enabled>
    <idname>test1</idname>
    <options><![CDATA[<opt><ArgList></ArgList></opt>]]></options>
    <userval/>
    <val>#echo test1</val>
    <comment/>
    <name>{*}</name>
    <subkind>0</subkind>
    <valkind>0</valkind>
    <opt>0</opt>
    <owner>4194304</owner>
    <userint/>
    <priority>10</priority>
    <flag/>
    <state>0</state>
  </record>
</module>
<module name="Hello">
  <record id="4194306">
    <id>4194306</id>
    <kind>0</kind>
    <parent>-1</parent>
    <pkgid>4194306</pkgid>
    <enabled>-1</enabled>
    <idname>Hello</idname>
    <options><![CDATA[<opt><DockAlign>1</DockAlign><DockWith>0</DockWith></opt>]]></options>
    <userval>{3CD46907-9930-4A83-A0CC-873EC4AA07ED}</userval>
    <val/>
    <comment/>
    <name>{*}</name>
    <subkind>0</subkind>
    <valkind/>
    <opt>0</opt>
    <owner>-1</owner>
    <userint/>
    <priority/>
    <flag/>
    <state>0</state>
  </record>
</module>
</cmud>
_________________
Asati di tempari!
Reply with quote
Zugg
MASTER


Joined: 25 Sep 2000
Posts: 23379
Location: Colorado, USA

PostPosted: Tue Apr 17, 2007 6:09 pm   
 
Hmm, weird. Not sure why I was able to upload your package here. I'll try the XML that you posted and see what I can find.
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » CMUD Beta Forum All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

© 2009 Zugg Software. Hosted by Wolfpaw.net