'Exception' "MDI Window creation failed!" on star

If reporting a bug with the Zeus IDE please post the details here. Please do not post questions here.
Post Reply
David Morris
Posts: 33
Joined: Tue Jun 21, 2005 4:07 am
Location: Perth, Western Australia
Contact:

'Exception' "MDI Window creation failed!" on star

Post by David Morris » Tue Jun 15, 2010 2:44 am

This may be related to
http://www.zeusedit.com/forum/viewtopic.php?t=3612

I also heavily use the command line (which I gather is currently broken), so I imagine it is related to that.

Since I've cleaned out the default ini file as much as possible, and I'm still getting these, I'm posting this just in case it is not related.

On starting Zeus 3.97c on Win2K (Yes I know) I get 8 "Exception", "MDI Window creation failed!" messages, before Zeus starts. It appears to run normally after that.

Also, the links to older versions on the web site, specifically the last 3.96 appear to be broken.

(Keen to see Zeus 3.97d with the command line working).

regards DM
Last edited by David Morris on Thu Jun 17, 2010 1:49 am, edited 2 times in total.

jussij
Site Admin
Posts: 2449
Joined: Fri Aug 13, 2004 5:10 pm

Post by jussij » Tue Jun 15, 2010 3:02 am

I also heavily use the command line
What was the command line use using in this instance :?:

What happens if you start Zeus without any command line options, Do you still see the exception dialog :?:

While it is true there are one or two issues with certain command line options that broke when Zeus was changed to support Vista, I not really sure if this issue is not related :?

The fact that you get the "Exception", "MDI Window creation failed!" message indicates something more serious has gone wrong.

But I have been running the 3.97c on Windows XP for many months now and have never seen this issue and this is the first time it has been reported.

So I suspect this is probably some sort of configuration issue or possibly an issue with Zeus and the version of Windows you are running :?

To eliminate the first possibility I would rename your current install, run a full 3.97c installer and see if this fresh install has the same issue.

To eliminate the second possibility, if possible try running the 3.97c installer on a second machine and see if the issue persists.

Cheers Jussi

David Morris
Posts: 33
Joined: Tue Jun 21, 2005 4:07 am
Location: Perth, Western Australia
Contact:

Post by David Morris » Thu Jun 17, 2010 2:29 am

jussij wrote: What was the command line use using in this instance :?:
"C:\Program Files\Zeus397\zeus.exe" -s -uC:\Work\Montel\Zeus -iC:\Work\Montel\Zeus\zeus32_397.ini -wC:\Work\Montel\MonTel32.zwi
jussij wrote: What happens if you start Zeus without any command line options, Do you still see the exception dialog :?:
Yes. (And even when I delete the workspace reference from the default ZEUS.INI file).
jussij wrote: So I suspect this is probably some sort of configuration issue or possibly an issue with Zeus and the version of Windows you are running :?
Perhaps. I'm running Win2K. It is due for a replacement. But I may need to use it (off line after July 13).
jussij wrote: To eliminate the first possibility I would rename your current install, run a full 3.97c installer and see if this fresh install has the same issue.
Renamed existing folder to 'zeus397xx'. Downloaded full installed and installed to 'zeus397'.

First run got:

---------------------------
Exception
---------------------------
none failed!
---------------------------

Then these

---------------------------
Exception
---------------------------
xWindow create failed!
---------------------------


---------------------------
Exception
---------------------------
Unexpected sub-classing error! The window handle is not valid.


---------------------------
Exception
---------------------------
xWindow create failed!

et al for a while... then

---------------------------
Exception
---------------------------
xToolBar create failed!


---------------------------
Exception
---------------------------
Window creation failed
---------------------------

A few times, then

---------------------------
Exception
---------------------------
xRebar create failed!
---------------------------

Exception
---------------------------
Window creation failed
---------------------------

And finally it popped up. But seems to work. It is almost as if these error messages are spurious. (Sometimes easy to confuse TRUE for NOT FALSE.)

BTW I've avoided .Net on this machine (though it may have sneaked on). I gather that you have used MFC in the past. Has this changed?

I'm thinking that Zeus in not compatible with Win2K anymore. :cry:

(I have another machine, and will try it out on that later - but I would assume from what you have said, that it will work.)

Does 3.96 (which worked at least in the early versions) have the checkboxes to turn off the buttons/tabs in the side bar?

And, if so, can you make the link to the last version of 3.96(s?) available again. The link seems broken.

regards DM

Late edit: It seems that I've reinstalled Win2K since I last tested 3.96. I now have error messages about a missing msvcr80.dll .

I'm returning to 3.95z for the time being, since it does work well for me.

jussij
Site Admin
Posts: 2449
Joined: Fri Aug 13, 2004 5:10 pm

Post by jussij » Thu Jun 17, 2010 5:13 am

Hi David,

All these exceptions that you are seeing indicates that something is seriously going wrong :(

For example the 'xToolBar create failed!' message should mean you don't have a toolbar :!:
BTW I've avoided .Net on this machine (though it may have sneaked on).

Zeus does not use any .Net so that will not be the issue.
I gather that you have used MFC in the past. Has this changed?

There is no MFC in Zeus. It is coded in straight Win32 ;)
I'm thinking that Zeus in not compatible with Win2K anymore.

I suspect this is the case. Unfortunately I don't have a Win2K machine to test this on :(

The problem might be related to the fact that the Zeus build move off the older VS2005 compiler on to the newer VS2008 compiler and this has probably created these issues.

I am guessing the SDK header files that come with these compilers are different between the two versions of VS.

But having said, what is really strange is I just tried running Zeus 3.97c on a very old Windows NT machine (i.e. vintage 1995-96) and it ran just fine :?
Does 3.96 (which worked at least in the early versions) have the checkboxes to turn off the buttons/tabs in the side bar?

On the View menu there are some options to show/hide parts of Zeus.

For example if you hide the toolbar the 'xToolBar create failed!' message should disappear.
And, if so, can you make the link to the last version of 3.96(s?) available again. The link seems broken.

I'll see if I can find it.

But I am not sure it is going to fix these issues. That version came out in Feb 2009 and I am pretty sure it was also compiled with VS 2008 compiler.
I now have error messages about a missing msvcr80.dll
This is also very strange :?

The msvcr80.dll file is part of the Microsoft C Runtime and the Zeus installer actually runs the Microsoft C Runtime to install this file.

The status bar that happens at the start of the Zeus install is the Microsoft C Runtime installer running.

Cheers Jussi[/i]

jussij
Site Admin
Posts: 2449
Joined: Fri Aug 13, 2004 5:10 pm

Post by jussij » Fri Jun 18, 2010 12:59 am

I did some more thinking about this issue.

I really am at a bit of a loss as to why the program is not running correctly, but I do have another theory.

The Rebar and Toolbar are all common controls and come out of the Microsoft Common Controls dll.

Now you said that the machine was recently re-installed. This could mean the machine is using a very old version of this Microsoft Common Controls dll and this might be causing the problem :?

The Microsoft Common Controls dll is one of those weird Windows dlls that is stealth upgraded.

It generally gets upgrade by service packs or whenever Internet Explorer is installed.

But I did find this download link:

http://www.microsoft.com/downloads/deta ... af0d8d4a1e

It is only for version: 5.80.2614.3600 so I am not sure if it would help but it might :?:

The version that Zeus is expecting is version 6.0.0.0

Cheers Jussi

David Morris
Posts: 33
Joined: Tue Jun 21, 2005 4:07 am
Location: Perth, Western Australia
Contact:

Post by David Morris » Fri Jun 18, 2010 2:42 am

jussij wrote:I did some more thinking about this issue.

...
Now you said that the machine was recently re-installed. This could mean the machine is using a very old version of this Microsoft Common Controls dll and this might be causing the problem :?

http://www.microsoft.com/downloads/deta ... af0d8d4a1e

It is only for version: 5.80.2614.3600 so I am not sure if it would help but it might :?:

The version that Zeus is expecting is version 6.0.0.0
The link you have given here is pre Win2k!

In fact, MS don't allow you to redistribute common controls any longer. Version 6 is ONLY for XP, and brings in the new 'XP styles'. If you don't activate styles (AFAIKT Zues doesn't), then you should be able to use version 5.

Incidentally, mine is specifically 5.81.4968.2500, which (again AFAIKT) is the latest you can have for Win2K.

You can have Win32 code than enables XP (and WIn7) visual styles, but checks for the version of common controls before painting the relevant part of the screen, cf http://msdn.microsoft.com/en-us/library/ms997646.aspx. MonTel does exactly this, to have a modern look on new systems, while maintaining backwards compatibility.

At the risk of being a tad presumptuous, perhaps Zeus could test the CC version with IsComCtrl32_6_00_OrGreater() (as per following example) , and then just allow the features available for that version.

Eg:

Code: Select all



// this also works for DLLVERSIONINFO2
// as DLLVERSIONINFO is the first member or DLLVERSIONINFO2.
typedef struct _DllVersionInfo
    {
    DWORD   cbSize;
    DWORD   dwMajorVersion;
    DWORD   dwMinorVersion;
    DWORD   dwBuildNumber;
    DWORD   dwPlatformID;
    } DLLVERSIONINFO;


DWORD GetComctl32DllVersion(void)
    {
    static DWORD    ReviousResult = (DWORD) -1;

    if (ReviousResult != -1)
        {
        return(ReviousResult);
        }
    else
        {
        ReviousResult = GetDllVersion(TEXT("comctl32.dll"));
        return(ReviousResult);
        }
    }

// returns TRUE or FALSE (plus stores the result for speed).

int IsComCtrl32_6_00_OrGreater(void)
    {
    static int    ReviousResult = -1;

    if (ReviousResult != -1)
        {
        return(ReviousResult);
        }
    if (GetComctl32DllVersion() >= PACKVERSION(6, 00))
        {
        ReviousResult = TRUE;
        return(TRUE);
        }
    else
        {
        ReviousResult = FALSE;
        return(FALSE);
        }
    }
For an example of how this works, I have some home spun controls (yes, good old fashioned windows custom controls!) which will look different on Win2k, WinXP (classic or themed) and Win7.

http://www.netwiz.com.au/mtcontrolux.html

(Download and run showctrl.zip it contains a single and small exe).

Of course, probably not worth bothering with for Win2K now - but useful if you want to incorporate Win7 features, while maintaining WinXP compatibility.

regards DM

jussij
Site Admin
Posts: 2449
Joined: Fri Aug 13, 2004 5:10 pm

Post by jussij » Fri Jun 18, 2010 3:24 am

In fact, MS don't allow you to redistribute common controls any longer.
This is what I meant when I said the CC dll is sleath upgraded. Only Microsoft knows when and how this dll gets upgraded :)
In fact, MS don't allow you to redistribute common controls any longer. Version 6 is ONLY for XP, and brings in the new 'XP styles'. If you don't activate styles (AFAIKT Zeus doesn't), then you should be able to use version 5.
But Zeus does use XP Styles :!: Zeus is built with a manifest file which is one of the Windows requirement for XP Styles.
At the risk of being a tad presumptuous, perhaps Zeus could test the CC version with IsComCtrl32_6_00_OrGreater() (as per following example) , and then just allow the features available for that version.
Unfortunately I don't think it is quite as simple as this :?:

The CC structures that get compiled into Zeus come straight out of the SDK header files and these structures have been known to change with different versions of CC.

So if Zeus uses a later version of these structures and passes the structure to a earlier version of the CC dll it will fail with an invalid structure size error (which is what I think is happening right know).

To uses different versions of CC dll within the same application would mean that Zeus would have to define its own version of the CC structures for each version of the CC DLL being supported and not use the structures defined in the SDK.

That scenario is just too scary to even contemplate.

Cheers Jussi

David Morris
Posts: 33
Joined: Tue Jun 21, 2005 4:07 am
Location: Perth, Western Australia
Contact:

Post by David Morris » Fri Jun 18, 2010 6:14 am

But Zeus does use XP Styles :!: Zeus is built with a manifest file which is one of the Windows requirement for XP Styles.
Yes, I have that in the manifest as well. However, you can turn visual styles on and off with the API. You can set the manifest to 6.0.0.0, but still compile with say _WIN32_WINNT == 0x0500

Unfortunately I don't think it is quite as simple as this :?:
Well it is more or less. The problem with the SDK headers is to set the version to the lowest system you want it to work on. In my case 5 (for WINK2). Then some part are omitted, and the compile with break, so you need to add them back in, manually (which can be pretty minimal).

For example these to add some option to a list box and handle a windows message:

Code: Select all

#if(_WIN32_WINNT < 0x0501)
#define WM_THEMECHANGED                 0x031A

#define HDF_SORTUP              0x0400
#define HDF_SORTDOWN            0x0200

#endif /* _WIN32_WINNT >= 0x0501 */

So you can add these back in, and have if statements only to use them if the correct version (in this case of common controls) is found.

I'm having to draw with Visual styles in that example code I mentioned, so I need everything to look good in Win7, and still work on Win2k. There ends up being effectively two completely different WM_PAINT handlers, depending on the version found. But most things aren't like that.
The CC structures that get compiled into Zeus come straight out of the SDK header files and these structures have been known to change with different versions of CC.
They generally add to the end of the struct, since it would break backward compatibility. Often you have to pass in the version, or the size of the struct (typically in cbSize) . When I need to do this I use the version code as described above.
So if Zeus uses a later version of these structures and passes the structure to a earlier version of the CC dll it will fail with an invalid structure size error (which is what I think is happening right now).
Yes it would. That is why you would default to an earlier version, and add the special cases for the newer versions.

The same issues problem will arise as you go from from XP to the Win7 look and feel.
To uses different versions of CC dll within the same application would mean that Zeus would have to define its own version of the CC structures for each version of the CC DLL being supported and not use the structures defined in the SDK.
If you set WINVER to 0x0500 then the SDK headers will work fine with Win2K. Note the old ones won't / can't change. It is the new ones you need to look out for. But as long as you set the version/ sizeof (eg cbSize) correctly for the struct they will work safely.

Do you get lots of compiler errors if WINVER is 0x0500?

regards DM

jussij
Site Admin
Posts: 2449
Joined: Fri Aug 13, 2004 5:10 pm

Post by jussij » Mon Jun 21, 2010 12:17 am

And, if so, can you make the link to the last version of 3.96(s?) available again. The link seems broken.

The older 3.96s version can be found here: http://www.zeusedit.com/z300/ze32v396s.zip

Cheers Jussi

David Morris
Posts: 33
Joined: Tue Jun 21, 2005 4:07 am
Location: Perth, Western Australia
Contact:

Post by David Morris » Mon Jun 21, 2010 12:41 am

jussij wrote:
And, if so, can you make the link to the last version of 3.96(s?) available again. The link seems broken.

The older 3.96s version can be found here: http://www.zeusedit.com/z300/ze32v396s.zip
I get redirected to this page http://www.zeusedit.com/z300/redirect.html. I've gone back to 3.95z, which is working fine for me at the moment (after a bit of a clean up if the '.zpi' files.)

regards DM

Post Reply
kuchnie warszawa opinie

Who is online

Users browsing this forum: No registered users and 28 guests