1. win32lib: Weird problems out of the blue.

I am trying to develop an accounting package with Euphoria & Win32lib. So far, I
have about 28 files (inclusive of all .e .ew .exw files). I normally edit my code
with Mike's Editor and then run direct from the editor to test & debug. My OS is
Win98SE.

Symptoms: The first 5-6 times everything works okay, then suddenly my main
window doesn't show, though the password pop-up does appear. If I continue to
try, I eventually end up with the infamous Error 461 "Failed to acquire a
hWnd...". If I re-boot, everything is just fine again and I can run my program
again for another 5-6 times before the same things start again.

Observations: When this happens, other Windows & Euphoria programs work just
fine. Using other editors or running the .exw directly doesn't make any
difference. The same thing starts happening to my bound (.exe) program also,
though other bound and non-bound programs run just fine. This starts happening
even if I don't make a single change in my code. My anti-virus, anti-spyware,
security updates, etc. are all up-to-date (to the best of my knowledge &
ability).

Is my program too big for Euphoria/Win32lib, or is Windows holding on to some
variables from my previous runs which might clash with my new run, or is it some
other problem?

Thanks.
Anando

new topic     » topic index » view message » categorize

2. Re: win32lib: Weird problems out of the blue.

Anando Banerjee wrote:
 
> I am trying to develop an accounting package with Euphoria & Win32lib.

What versions of Euphoria, Win32lib and Windows are you using?

There was some problems with resource handling on win98 with older versions of
the win32lib library.

-- 
Derek Parnell
Melbourne, Australia
irc://irc.sorcery.net:9000/euphoria

new topic     » goto parent     » topic index » view message » categorize

3. Re: win32lib: Weird problems out of the blue.

Derek Parnell wrote:
> 
> Anando Banerjee wrote:
>  
> > I am trying to develop an accounting package with Euphoria & Win32lib.
> 
> What versions of Euphoria, Win32lib and Windows are you using?
> 
> There was some problems with resource handling on win98 with older versions of
> the
> win32lib library.
> 
> -- 
> Derek Parnell
> Melbourne, Australia
> irc://irc.sorcery.net:9000/euphoria
> 

Hi Derek,

I am using Win98SE, Euphoria 2.5 Final (and the proper Binder), Win32lib
v0.60.6. I have also edited w32DLL.ew (as suggested in one of your earlier posts
on EUforum) to resolve the Error 461 problem with RichEdit. I have not had any
more problems with RichEdit Error 461 since. Now, the only problem is this weird
461 that appears after 5-6 runs, disappears on re-boot, only to re-appear again
after 5-6 runs even without any changes in anything.

Thanks.
Anando

new topic     » goto parent     » topic index » view message » categorize

4. Re: win32lib: Weird problems out of the blue.

Anando Banerjee wrote:
> 
> Derek Parnell wrote:
> > 
> > Anando Banerjee wrote:
> >  
> > > I am trying to develop an accounting package with Euphoria & Win32lib.
> > 
> > What versions of Euphoria, Win32lib and Windows are you using?
> > 
> > There was some problems with resource handling on win98 with older versions
> > of the
> > win32lib library.
> > 
> > -- 
> > Derek Parnell
> > Melbourne, Australia
> > irc://irc.sorcery.net:9000/euphoria
> > 
> 
> Hi Derek,
> 
> I am using Win98SE, Euphoria 2.5 Final (and the proper Binder), Win32lib
> v0.60.6. I
> have also edited w32DLL.ew (as suggested in one of your earlier posts on
> EUforum) to
> resolve the Error 461 problem with RichEdit. I have not had any more problems
> with
> RichEdit Error 461 since. Now, the only problem is this weird 461 that appears
> after
> 5-6 runs, disappears on re-boot, only to re-appear again after 5-6 runs even
> without
> any changes in anything.
> 
> Thanks.
> Anando
> 


This sounds like another Memory Leakage error, that is caused by using the
RichEdit structures to change the Font, Escape, Color, and various other
aspects of a RichEdit Control's Text.  I know I ran into this problem when
working on my Simple RichEdit library.  Derek, you may want to double check
your RichEdit functions, to make sure they are truely releasing the RichEdit
structures, and they aren't just being nestled away, allowing memory to
accumulate.

Mario Steele
http://enchantedblade.trilake.net
Attaining World Dominiation, one byte at a time...

new topic     » goto parent     » topic index » view message » categorize

5. Re: win32lib: Weird problems out of the blue.

Mario Steele wrote:
> 
> 
> This sounds like another Memory Leakage error, that is caused by using the
> RichEdit structures to change the Font, Escape, Color, and various other
> aspects of a RichEdit Control's Text.  I know I ran into this problem when
> working on my Simple RichEdit library.  Derek, you may want to double check
> your RichEdit functions, to make sure they are truely releasing the RichEdit
> structures, and they aren't just being nestled away, allowing memory to
> accumulate.
> 
> Mario Steele
> <a
> href="http://enchantedblade.trilake.net">http://enchantedblade.trilake.net</a>
> Attaining World Dominiation, one byte at a time...
> 

Thanks Mario,

While Derek ponders on this, let me just add to the knowledge base. My program
is currently spread out over 28 files (other than Win32lib, EUGrid, etc.) with
approx 19,600 lines of code so far. I am using RichEdit in about 17 places to
display on-screen reports (basically print previews). I have recently found a
better way to do this with Bitmap and bitBlt but would still like to see a better
RichEdit. As of now, when I try to output anything directly to RichEdit, the
display appears and disappears in a flash leaving a blank RichEdit box (no error
messages). So, I use a temporary variable to design the page with "\n" "\t" etc.
and then setText the variable to RichEdit to get a final display. Shoddy method,
I agree, but could not find a better way till I found Bitmap and bitBlt. (Any
suggestions from anybody for something even better?)

At present, I am converting all my RichEdit previews to Bitmap previews but,
like I said, why not an error-free RichEdit anyway?

Hope this helps.

Regards.
Anando

new topic     » goto parent     » topic index » view message » categorize

6. Re: win32lib: Weird problems out of the blue.

Anando Banerjee wrote:
> Thanks Mario,
> 
> While Derek ponders on this, let me just add to the knowledge base. My program
> is currently
> spread out over 28 files (other than Win32lib, EUGrid, etc.) with approx
> 19,600 lines
> of code so far. I am using RichEdit in about 17 places to display on-screen
> reports
> (basically print previews). I have recently found a better way to do this with
> Bitmap
> and bitBlt but would still like to see a better RichEdit. As of now, when I
> try to
> output anything directly to RichEdit, the display appears and disappears in a
> flash
> leaving a blank RichEdit box (no error messages). So, I use a temporary
> variable to
> design the page with "\n" "\t" etc. and then setText the variable to RichEdit
> to get
> a final display. Shoddy method, I agree, but could not find a better way till
> I found
> Bitmap and bitBlt. (Any suggestions from anybody for something even better?)
> 
> At present, I am converting all my RichEdit previews to Bitmap previews but,
> like I
> said, why not an error-free RichEdit anyway?
> 
> Hope this helps.
> 
> Regards.
> Anando
> 

Which method are you using to store the text into the RichEdit?  Are you
using setText(), or are you using appendText()?  appendText() will append
the text to the RichEdit, and shouldn't make anything dis-appear.  setText()
is basically clearing everything in the RichEdit, and storing the new text
in it, as a clean sheet basically.

One thing I would suggest to you though, is to check and see which version
of RichEdit Win32lib is linking to, and weither or not, you have 2 versions
of RichEdit installed on your computer.  Cause some of these problems sound
as though something I encountered with RichEdit 1.0, which wasn't as
sophisticated as RichEdit 2.0 or 3.0 for that matter.  And some of the
RichEdit structures have been known to not work properly with RichEdit 1.0.

Just some things for you to check.  I'd check myself, but Unfortunatly, I'm
on Linux now, and don't deal much with Windows anymore.

Mario Steele
http://enchantedblade.trilake.net
Attaining World Dominiation, one byte at a time...

new topic     » goto parent     » topic index » view message » categorize

7. Re: win32lib: Weird problems out of the blue.

Mario Steele wrote:
> Which method are you using to store the text into the RichEdit?  Are you
> using setText(), or are you using appendText()?  appendText() will append
> the text to the RichEdit, and shouldn't make anything dis-appear.  setText()
> is basically clearing everything in the RichEdit, and storing the new text
> in it, as a clean sheet basically.
> 
> One thing I would suggest to you though, is to check and see which version
> of RichEdit Win32lib is linking to, and weither or not, you have 2 versions
> of RichEdit installed on your computer.  Cause some of these problems sound
> as though something I encountered with RichEdit 1.0, which wasn't as
> sophisticated as RichEdit 2.0 or 3.0 for that matter.  And some of the
> RichEdit structures have been known to not work properly with RichEdit 1.0.
> 
> Just some things for you to check.  I'd check myself, but Unfortunatly, I'm
> on Linux now, and don't deal much with Windows anymore.
> 
> Mario Steele
> <a
> href="http://enchantedblade.trilake.net">http://enchantedblade.trilake.net</a>
> Attaining World Dominiation, one byte at a time...
> 

Will check out your tips. 

One question though: How do I find out what version of RichEdit Win32lib is
linking to and, if it is not 2.0 or 3.0, how do I rectify that?

Thanks a million.
Anando

new topic     » goto parent     » topic index » view message » categorize

8. Re: win32lib: Weird problems out of the blue.

Determining which version of Richedit Win32Lib is using is quite simple.
Check the value of the global constant WC_RICHEDIT.
If the value is "RICHEDIT" then it is using Version 1.
If the value is "RICHEDIT20A" then it is using Version 2 or 3.
I don't know of any simple way to tell the difference between version 2 and 3.
Any OS later than Win95 should have at least version 2.

Larry Miller

new topic     » goto parent     » topic index » view message » categorize

9. Re: win32lib: Weird problems out of the blue.

Larry Miller wrote:
> 
> Determining which version of Richedit Win32Lib is using is quite simple.
> Check the value of the global constant WC_RICHEDIT.
> If the value is "RICHEDIT" then it is using Version 1.
> If the value is "RICHEDIT20A" then it is using Version 2 or 3.
> I don't know of any simple way to tell the difference between version 2 and 3.
> Any OS later than Win95 should have at least version 2.
> 
> Larry Miller

This is correct, checking the WC_RICHEDIT Constant will tell you what version is
loaded.  And actually Larry, RichEdit 2.0 didn't come out till Win98SE/SP2. 
Win98 shipped with RichEdit 1.0, and the Microsoft HTML Engine.  Which was later
replaced, to use the RichEdit 2.0 DLL that came out
with Win98SE, and Internet Explorer 5.0.


Mario Steele
http://enchantedblade.trilake.net
Attaining World Dominiation, one byte at a time...

new topic     » goto parent     » topic index » view message » categorize

10. Re: win32lib: Weird problems out of the blue.

Mario Steele wrote:
> 
> Larry Miller wrote:
> > 
> > Determining which version of Richedit Win32Lib is using is quite simple.
> > Check the value of the global constant WC_RICHEDIT.
> > If the value is "RICHEDIT" then it is using Version 1.
> > If the value is "RICHEDIT20A" then it is using Version 2 or 3.
> > I don't know of any simple way to tell the difference between version 2 and
> > 3.
> > Any OS later than Win95 should have at least version 2.
> > 
> > Larry Miller
> 
> This is correct, checking the WC_RICHEDIT Constant will tell you what version
> is loaded.
>  And actually Larry, RichEdit 2.0 didn't come out till Win98SE/SP2.  Win98
>  shipped
> with RichEdit 1.0, and the Microsoft HTML Engine.  Which was later replaced,
> to use
> the RichEdit 2.0 DLL that came out
> with Win98SE, and Internet Explorer 5.0.
> 
> 
> Mario Steele
> <a
> href="http://enchantedblade.trilake.net">http://enchantedblade.trilake.net</a>
> Attaining World Dominiation, one byte at a time...
> 

How do I do that? And, if it is not 2.0 or 3.0, how do I upgrade?
Thanks.
Anando

new topic     » goto parent     » topic index » view message » categorize

11. Re: win32lib: Weird problems out of the blue.

Anando Banerjee wrote:
> How do I do that? And, if it is not 2.0 or 3.0, how do I upgrade?
> Thanks.
> Anando

include win32lib.ew
puts(1,WC_RICHEDIT)
machine_proc(26,0)


To upgrade, google RichEdit Upgrade.


Mario Steele
http://enchantedblade.trilake.net
Attaining World Dominiation, one byte at a time...

new topic     » goto parent     » topic index » view message » categorize

12. Re: win32lib: Weird problems out of the blue.

Mario Steele wrote:
> 
> Anando Banerjee wrote:
> > How do I do that? And, if it is not 2.0 or 3.0, how do I upgrade?
> > Thanks.
> > Anando
> 
> }}}
<eucode>
> include win32lib.ew
> puts(1,WC_RICHEDIT)
> machine_proc(26,0)
> <font color="#330033"></eucode>
{{{
</font>
> 
> To upgrade, google RichEdit Upgrade.
> 
> 
> Mario Steele
> <a
> href="http://enchantedblade.trilake.net">http://enchantedblade.trilake.net</a>
> Attaining World Dominiation, one byte at a time...
> 

Thanks Mario, Larry et al.

Showing 20A, though this is probably because I did google and download and run
riched30.exe just before I got your answer.

Now, let me see whether this solves the problem or not. Will get back if it
doesn't, otherwise it's working.

Just like to mention that I really appreciate all the help you guys are
providing. You actually go thru the messages to see how you can help. This is
just not available in most forums.

Thanks again.
Anando

new topic     » goto parent     » topic index » view message » categorize

13. Re: win32lib: Weird problems out of the blue.

> 
> Showing 20A, though this is probably because I did google and download and run
> riched30.exe
> just before I got your answer.
> 
> Now, let me see whether this solves the problem or not. Will get back if it
> doesn't,
> otherwise it's working.
> 


Just to report that RichEdit 20A has not solved the problem. Maybe it's not a
RichEdit problem. Just have to keep on searching, I guess.

Anando

new topic     » goto parent     » topic index » view message » categorize

14. Re: win32lib: Weird problems out of the blue.

Anando Banerjee wrote:
> 
> Just to report that RichEdit 20A has not solved the problem. Maybe it's not a
> RichEdit
> problem. Just have to keep on searching, I guess.
> 
> Anando
> 

Some more observations: When I have an open IE window, the error appears.
Keeping the same windows open, if I un-include a few of my files (.e .ew), the
error disappears and the program works normally (without the facilities of the
un-included files, of course). Re-including the files again results in the 461
error. I am using IE6.

At the same time, other Euphoria programs and other Windows programs work just
fine.

Any suggestions anybody?

Thanks & regards.
Anando

new topic     » goto parent     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu