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

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » CMUD General Discussion
Vijilante
SubAdmin


Joined: 18 Nov 2001
Posts: 5182

PostPosted: Mon Sep 01, 2008 3:59 pm   

[2.36] COM problems
 
I will be writing this as a go with testing it. There is likely to be quite a few edits. Basically continue the application with each problem.

1. Launch CMud
2. Close Sessions Window (ESC)
3. Enter at the command line
Code:
#VAR a {%comcreate("CMud.Application")}
#VAR b {@a.CurrentSession}
#ALIAS x {#SHOW @b.WindowName}
#SHOW %session.NumAliases
#SHOW @a.InvalidProperty
#SHOW @b.WindowName
#SHOW %comget(a,"InvalidProperty")
#SHOW %comget(b,"WindowName")
#SHOW @a.CurrentSession.WindowName
#SHOW %session.AliasNum(0)
#SHOW %session.AliasNum(0).Value
Ok, I skipped most of the editting and am hitting all the highlights so far. What I have here basically just sets things up, then gets into the #SHOW's. I will take them one at a time.

%sessaion.NumAliases, properly displays 1
@a.InvalidProperty displays a dialog about an invalid property completely as expected
@b.WindowName displays an error parsing dialog with an exception address, this is bad and it looks like b is not properly assigned.
%comget(a,"InvalidProperty") goes into the exception handler as a crash instead of using the invalid property dialog, again not good
%comget(b,"WindowName") same error location as @b.WindowName, but this time it is in a crash dump form thanks to %comget
@a.CurrentSession.WindowName exact same as @b.WindowName the underlying COM object appears to have become damaged
%session.AliasNum(0) displays 'x' which is the value of the Name property and Name is the default field
%session.AliasNum(0).Value displays 'x.Value' this indicates that "%session.AliasNum(0)" completeted its evaluation resulting in "x" and then ".Value" was concatenated. This is the one that is causing all COM usages in my toolbox to be broken.
_________________
The only good questions are the ones we have never answered before.
Search the Forums
Reply with quote
Vijilante
SubAdmin


Joined: 18 Nov 2001
Posts: 5182

PostPosted: Mon Sep 01, 2008 4:18 pm   
 
Alright the "@a.InvalidProperty" error does not display when combined in the same command line with the "@b.WindowName". Each error does occur, but the display doesn't happen for it.
_________________
The only good questions are the ones we have never answered before.
Search the Forums
Reply with quote
Anaristos
Sorcerer


Joined: 17 Jul 2007
Posts: 821
Location: California

PostPosted: Tue Sep 02, 2008 10:23 am   
 
I suggest you go into the Settings Editor and set the COM objects to default to a null value. Somehow CMUD thinks that the object stays initialized across quits. I mentioned this before when I posted that the <COMObject> "value" was being treated as a reference and was told that it was just a place holder and not the actual value. This I already knew, but CMUD doesn't seem to know it. If the variable defaults to null across loads, it will work properly. If you save without the default, the "placeholder" will be stored by the save routine and it will become the value. An indication of this is that I force my com objects to com type, but they will be reloaded as AutoType if I don't default them to null.
_________________
Sic itur ad astra.
Reply with quote
Zugg
MASTER


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

PostPosted: Tue Sep 02, 2008 5:20 pm   
 
I believe Vijilante was doing this in a blank session and was not loading any previous package values.

I've confirmed all of the errors posted above and have added them to my bug list. Feel free to add or edit this post since I'll refer directly to it when I get around to fixing these bugs. Probably won't happen in the next version though (trying to stay focused on the mapper right now).
Reply with quote
Zugg
MASTER


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

PostPosted: Wed Dec 10, 2008 7:26 pm   
 
OK, I have most of these fixed for the next beta version. Turns out that the entire CMUD.Application object was screwed up. At some point, Delphi had gotten confused and overwritten my code with a bunch of blank methods. I was able to recover this from a backup of zMUD sources. But basically, any %cmud or CMUD.Application call in any previous version of CMUD would not work.

The %session object was ok, and the issue with %session.AliasNum(0).Value was the same as a bug I just fixed in the mapper COM API where CMUD wasn't handling COM references with parenthesis followed by a property. So this is now fixed too.

I didn't fix the issues with the "invalid property" error messages. Error handling within COM is very tricky because it's running in a thread. So it's sometimes hard to trickle an error message up to the top error handler in the main thread. These are still on the bug list, but currently have a low priority since the difference between the parsing error message and the crash dump error message isn't that important since both display the proper invalid properly message.
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » CMUD General Discussion 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