Q.D.K. Library Interface problem

MaDbRiT
14 Jul 2005, 20:21
Hi Alex.

I'm having a problem with building a QDK interface for my new 'Stublib.qlb' library. This lib adds a lot of quite fully utilised tabbed panes to the edit object window and my copy of QDK Pro 3.53 crashes with the message:

"Run-time error '7' Out of memory."

When I click the 'edit object' button. After this you get the standard windows 'This program has performed an illegal operation - (details=QDK has caused an invalid page fault in module unknown) message and QDK quits.

Now initially I thought I had a syntax error somewhere in my !QDK - !end section, I've seen that cause this error before, but it doesn't seem to be that this time.

I went through 'commenting out' various property settings until the problem went away, then re-introduced them one by one until QDK 'broke'. Initially I thought I'd found the problem entry, but the code looked fine! After much experimentation I have found that if I comment out ANY two of the many property settings QDK works, as soon as I re-introduce either of them, it breaks again.

It seems to therefore be a problem with the QUANTITY of code I'm using, rather than the content. For example this single line in a QDK 'object' block -

   property <Already Closed;isClosedMessage;text>


is typical, AFAIK there's nothing wrong with the syntax, it isn't a duplicate of another property and the property does exist. When I comment this out (with any other) QDK will run, de-commenting the above line will then produce error "Run-Time error '7' out of memory" which suggests to me a size limit is being encountered.

So, is there a limit to the overall amount of 'QDK' Interface code, or the number of properties we can put into a Library interface?

Note this happens on my Win98SE box with 512Mb RAM and my WinXPPro box with 2Gb RAM - so I don't think it is a physical memory/specific system limitation. Also the test piece using the lib with ALL the properties in (but mostly hand coded) runs perfectly happily in Quest itself!

Al (MaDbRiT)

MaDbRiT
15 Jul 2005, 10:04
* * * UPDATE * * *

I wrote

Note this happens on my Win98SE box with 512Mb RAM and my WinXPPro box with 2Gb RAM - so I don't think it is a physical memory/specific system limitation.



Re-tested this and I was wrong - the problem no longer exists on the WIN XP Pro box (I must gave had a genuine error in the code last time I tried) - but still fails to work on my P3-800 WIN98SE box with 512Mb RAM.

Interestingly enough, on my old Win98SE Laptop (Celeron 333) with 192Mb RAM it works fine...

<ALARM BELLS>
System Resources - that's the problem!
</ALARM BELLS>

The Laptop is a very bare-bones install and not a lot of 'stuff' is started on startup, so it has plenty of system resources to play with. The desktop box on the other hand has loads of stuff running on startup - all of which guzzle a little bit of the system resources...

To test my guess, I deliberately 'shut down' a lot of background 'stuff' on the desktop, until I got available resources up to the level the laptop has on startup, started QDK and lo and behold, my test code + library ran sweet as you like. :D

So, if you use QDK on a Win98/95/ME machine and you get out of memory errors in QDK, try shutting down everything you aren't actually using and try again. This is not a lack of RAM issue, system resources and RAM are not the same thing.

Of course the ultimate solution is to upgrade to an NT based OS (Xp Pro/ Win 2K) where the resource management is infinitely better handled, but given the upgrade price, its probably more economic to 'ditch' the p3 box and buy a new Dell or something :shock:

Al (MaDbRiT)

paul_one
15 Jul 2005, 12:11
What windows 98 is it?
SE?

it could just be a VB5 bug somewhere not handling system resources properly...
Either way, I agree with the "ditch and get a new one". Some I've seen around, WITH windows installed are below £200!!

MaDbRiT
15 Jul 2005, 19:47
Tron wrote

What windows 98 is it?
SE?



Both, 98SE on the (old) desktop, 98 on the (old)laptop.

it could just be a VB5 bug somewhere not handling system resources properly...



I think its basically the OS limitations more than VB - it works OK on Win 2000/XP after all! AFAIK poor system resource management really reared its ugly head in Win 95, was improved a bit in 98/98SE and then hit new depths with the (Gawd Awful!) Win ME.

For those who don't know, to try and maintain compatability with old 16bit based code, Windows 95/98/ME has two 'hangover' system resource heaps (think of blocks of memory) namely GDI resources and User resources. Being 16bit, these have an absolute maximum size of 64kb each (1 'page' of 16bit memory = 64Kb). Because Win 9x/ME is essentially underpinned by a 16 bit DOS base, these 16 bit heaps are in continual background use by the system.

Although there are 32bit resource heaps in Win95 and later which do not have size limits for practical purposes, it is the two 16bit ones which cause trouble, because, being in constant use by the OS and many programs you run, if you have too many things running the space allocated for these resources cannot hold everything required. At this point you get an 'out of memory' error (often preceded by a slow down of the PC) and the detail will often tell you of an 'Invalid Page fault' - where the program has tried to 'overflow' the resource space's 64Kb limit and tried to access other memory that it isn't allowed to do.

Either way, I agree with the "ditch and get a new one". Some I've seen around, WITH windows installed are below £200!!



Yeah pricing is mad. Upgrading to XP-Pro and buying a decent 17" TFT would cost me £350... I can get a higher spec Dell with the TFT AND XP for that - in fact If I want to think of it that way the 'box' comes free if I buy the TFT and Win XP Pro from Dell... :lol:

That said, I have 5 PC's in use at home, two XP-Pro ones (laptop and desktop, both <6mths old and of high spec) the 2 Win 98/SE machines mentioned before in this thread AND an even older laptop I take on my hospitalisation sessions - how many PC's do I need? :shock:

Al (MaDbRiT)

paul_one
15 Jul 2005, 20:28
Nice info there Al. It would have been nice to know, but as 16-bit program's have mainly ended (erm, 93-96?... 32-bit CPU's were available from 90 or 88-ish right?), I don't think I'll find use for the info.
Being 'old school' does have alot of advantages sometimes!
... And yes, gawd awful Windows ME... I've dealt with 2 or 3 boxes at work, and all of them were terrible.

Both, 98SE on the (old) desktop, 98 on the (old)laptop.

You don't need to say your desktop is old to have windows 98 on it - although my dad has 98SE on a new Novatech box (NEW!?... barely) and runs it quite happily. I hate the network interface as so will never go back again.

I think its basically the OS limitations more than VB

I've never really had problem's with Windows 98. I've had it crash a couple of times... Mostly when I had 23894315 windows open, downloading etc and pushing the processor, hard-drive (paging&defragging&alot more) and RAM to limits, so that's why the limitation with the resources struck me as odd.
I've usually kept my boot-up pretty clean though, and messed around with all sorts of page-adding, cache-changing programs, so *shrugs*.

Yeah pricing is mad.

I didn't think of it that way... I recently got a VERY nice 17" TFT for £150-ish inc VAT. Now I'd have been pretty nicely off with buying an ACER & 17" for £230 or less, with XP Pro, loads-o-software, a combo drive (CDWR-DVD) and mouse, keyboard, warrenty etc, and sticking that in the corner in place of my current 90C-generating secondary PC.
Infact I may and turn it into a Linux box!
... I've also been warned about Dell advertising low prices and then cheating extra money out of you... Plus I've never liked Dell boxes too much.

5 PC's in use at home

I have 2 and a laptop. And 2 laptop's at work and a PC at work too... And the server at work I set up. They're annoying me lately, what with all the heat! Most of mine are middle-spec from several years ago. I see no need to get cutting-edge stuff.

how many PC's do I need?

About 7. 2 server's (one back-up) 3 PC's (windows (good spec), windows (med-spec... general), linux (med-spec)) and 2 laptop's. BUUUT that's just my preference :P .

MaDbRiT
15 Jul 2005, 20:43
Tron wrote

About 7. 2 server's (one back-up) 3 PC's (windows (good spec), windows (med-spec... general), linux (med-spec)) and 2 laptop's. BUUUT that's just my preference .



I've no use for servers at home, but if we include the machines at work I have my own (newish) desk/lap tops, 7 Win NT/2000/2003 servers, 2 SCO Unix servers, 2 x AIX, 2 x AS400's and 2 LINUX ones, and err... actually I don't know how many PC's, well into the high treble figures - LOL

And my 5 at home...

Given my family's complete disregard (verging on contempt) for anything vaguely security related, and their love of downloading anything and everything from the Web just for the hell of it, I prefer to keep the home machines non-networked and allocated to specific users. :shock: That way when one of them trashes a PC with the latest bit of downloaded malware (or just does something REALLY dumb to wreck it) we don't have wailing and fights over who's fault it is for losing someone else's stuff!

Al (MaDbRiT)

paul_one
15 Jul 2005, 20:54

wailing and fights over who's fault it is for losing someone else's stuff!

Hahaha, true! Although the situation has never come to light here, I have heard of similar incidents.

actually I don't know how many PC's, well into the high treble figures

Ahhh the life of a network systems admin!
I truely loathe networks - really un-interesting and easy. We do have a Unix&/Linux box/s at work, but I haven't touched them......... yet :D .
I work for a SMALL firm (even smaller soon) so no joy with the amount of PC's :P.
I find my server useful for holding my data - even if it is off most of the time... I also hooked it up to deal as a web/ftp/mail/PHP/SQL server too (as well as file-server). Prob gonna put Questnet on there if a game comes out. Of course it's nothing like a 'proper' server, as it's win XP, but I don't want domains etc at home :P .

Enough of the talk... I'm off to download anything and everything from the web - just for the hell of it! Onto a windows XP machine with NO updates past SP2, no firewall/antivirus software at all... Just to poke fun at all those people who screw themselves over :) .
Happy hunting Al !