FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Windows / TPANEL
Posts: 3022
Joined: Fri Oct 07, 2005 01:45 PM
Windows / TPANEL
Posted: Tue Nov 05, 2013 11:26 PM
A client goes to process a credit card, and when he completes that task, he tries to open the appointment scheduler.
Both routines call external .dll's
Both work fine independently
Recently, when he attempts to open the scheduler after completing the credit card transaction, he gets the following error:

Code (fw): Select all Collapse
Error description: Error FiveWin/6  Cannot create window or control: 
Class: TPANEL
Caption: 
System Error: Cannot find window class.

Stack Calls
===========
   Called from: .\source\classes\WINDOW.PRG => WNDCREATEERROR( 766 )
   Called from: .\source\classes\WINDOW.PRG => TPANEL:CREATE( 747 )
   Called from: .\source\classes\TPANEL.PRG => TPANEL:NEW( 49 )
   Called from: D:\Projects\MLS2013\Source\tCodeJock.prg => MPCAL:BUILDPANELS( 550 )
   Called from: D:\Projects\MLS2013\Source\tCodeJock.prg => MPCAL:NEW( 178 )
   Called from: D:\projects\MLS2013\source\asw2012.prg => (b)MAIN( 454 )


The object is created with the following code:
LOCAL cipObject
cipObject := FWGetOleObject("cipwin32.easyIntegrator")

We had some discussion on this previously, focused on how to CLOSE the object. The answer was that it didn't need to be closed because it is a LOCAL and goes away.

The error comes specifically after using that control ( and exiting it ), then doing the following:
::oPanelCalex = TPanel():New( 0, 175, ( nHeight ), ::nWidth, ::oWndClient )
::oPanelExplorer = TPanel():New( 0, 0, ( nHeight ) , ::oPanelCalex:nLeft, ::oWndClient )
This creates a FiveWin/6 Cannot create window or control in TPANEL.


I know work has been done recently on TPANEL. Any thoughts on why this may occur ?
Tim Stone
http://www.MasterLinkSoftware.com
http://www.autoshopwriter.com
timstone@masterlinksoftware.com
Using: FWH 23.10 with Harbour 3.2.0 / Microsoft Visual Studio Community 2022-24 32/64 bit
Posts: 4840
Joined: Fri Nov 18, 2005 04:52 PM
Re: Windows / TPANEL
Posted: Wed Nov 06, 2013 06:51 AM

Tim,

Just a thought, you might try doing a sysRefresh() after exiting the panel.

James

FWH 18.05/xHarbour 1.2.3/BCC7/Windows 10
Posts: 3022
Joined: Fri Oct 07, 2005 01:45 PM
Re: Windows / TPANEL/ Codejock ERROR
Posted: Thu Nov 07, 2013 11:30 PM

I tried the SysRefresh( )

At first we thought it might have resolved the problem. However, after 68 minutes when the client tried the process again, it errored out.

All of the information is shown above in detail.

This build is done with FWH 13.08 ( .09 will not compile here at this time ).

Your ideas are appreciated.

Tim Stone
http://www.MasterLinkSoftware.com
http://www.autoshopwriter.com
timstone@masterlinksoftware.com
Using: FWH 23.10 with Harbour 3.2.0 / Microsoft Visual Studio Community 2022-24 32/64 bit
Posts: 4840
Joined: Fri Nov 18, 2005 04:52 PM
Re: Windows / TPANEL
Posted: Fri Nov 08, 2013 12:32 AM
Tim,

However, after 68 minutes when the client tried the process again, it errored out.


Do you mean that he just opened it once after waiting 68 minutes (while doing nothing else with the program), or he opened and closed it regularly for 68 minutes before it crashed?

Perhaps it is a memory issue. If it is getting opened and closed a lot and a resource is not being destroyed, then he could be running low on memory. I would put a checkres() in the function and see if it keeps getting smaller each time the routine is exited.

Regards,
James
FWH 18.05/xHarbour 1.2.3/BCC7/Windows 10
Posts: 3022
Joined: Fri Oct 07, 2005 01:45 PM
Re: Windows / TPANEL
Posted: Fri Nov 08, 2013 01:11 AM

We are working with two processes.

The first is a call to a credit card processing routine.

The second is a Codejock appointment scheduler that many of us use.

No, he wasn't using it constantly. A client comes in, he processes the credit card, and then exits that routine and goes to schedule an appointment. It dies when he opens the appointment scheduler.

This boots him out of the main program and he has to re-enter and then go in to schedule the appointment. Obviously he does use both features.

I did the sysRefresh( ) after he closed the credit card transaction.

The computer is the same. This was not a problem until I started using FWH 13.08 for the builds. I do believe tPanel had some updates at that time.

Tim

Tim Stone
http://www.MasterLinkSoftware.com
http://www.autoshopwriter.com
timstone@masterlinksoftware.com
Using: FWH 23.10 with Harbour 3.2.0 / Microsoft Visual Studio Community 2022-24 32/64 bit
Posts: 4840
Joined: Fri Nov 18, 2005 04:52 PM
Re: Windows / TPANEL
Posted: Fri Nov 08, 2013 01:47 AM
Tim,

This was not a problem until I started using FWH 13.08 for the builds. I do believe tPanel had some updates at that time.


Well, it should be easy enough to test that theory. If you have both TPanel versions, then do a simple file compare. Any changes should be obvious. It there are changes then try compiling with the new version of FWH and the old version of TPanel. If the problem persists, then TPanel is the cause, if not then something else is the issue.

James
FWH 18.05/xHarbour 1.2.3/BCC7/Windows 10
Posts: 3022
Joined: Fri Oct 07, 2005 01:45 PM
Re: Windows / TPANEL
Posted: Fri Nov 08, 2013 01:52 AM

Yeah, I've been doing that on other issues. I was hoping someone knew something here. I also was hoping 13.09 would build correctly, but I got 30 errors and no one has posted a response to that yet ...

Tim Stone
http://www.MasterLinkSoftware.com
http://www.autoshopwriter.com
timstone@masterlinksoftware.com
Using: FWH 23.10 with Harbour 3.2.0 / Microsoft Visual Studio Community 2022-24 32/64 bit
Posts: 4840
Joined: Fri Nov 18, 2005 04:52 PM
Re: Windows / TPANEL
Posted: Fri Nov 08, 2013 02:06 AM

Tim,

I checked the What's new docs from 13.04-13.09 and I couldn't find any documented changes to TPanel. Of course, a change may not have been documented. A file compare is the best way to tell.

James

FWH 18.05/xHarbour 1.2.3/BCC7/Windows 10
Posts: 6755
Joined: Wed Feb 15, 2012 08:25 PM
Re: Windows / TPANEL
Posted: Fri Nov 08, 2013 06:28 AM
TimStone wrote:

The computer is the same. This was not a problem until I started using FWH 13.08 for the builds. I do believe tPanel had some updates at that time.



Tim
I compared the files TPanel from version 12.03 and FWH 13.08 and 13.09 and are equal. No changes
Cristobal Navarro

Hay dos tipos de personas: las que te hacen perder el tiempo y las que te hacen perder la noción del tiempo

El secreto de la felicidad no está en hacer lo que te gusta, sino en que te guste lo que haces
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: Windows / TPANEL
Posted: Fri Nov 08, 2013 09:19 AM

Tim,

As far as I understand it, you use panels with no problems, then use codejock, then try to use panels again and get the error.

If that is the case, please run this code after using codejock and before using the panels again:

MsgInfo( TPanel():lRegistered )

The error that you get means that the Class TPanel has not been properly registered. If you used panels before codejock, then it means that it was properly registered but somehow after using codejock the class is no longer available. Maybe codejock uses another with the same name ? Quite strange...

My intuition is that using third party components (OLE) brings all these situations. Better don't use them, as they are black boxes and if they fail its quite difficult to find a workaround, etc.

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 4840
Joined: Fri Nov 18, 2005 04:52 PM
Re: Windows / TPANEL
Posted: Fri Nov 08, 2013 03:27 PM
Tim,

Maybe codejock uses another with the same name ? Quite strange...


You could test this by creating a copy of TPanel and just changing the class name.

James
FWH 18.05/xHarbour 1.2.3/BCC7/Windows 10
Posts: 3022
Joined: Fri Oct 07, 2005 01:45 PM
Re: Windows / TPANEL
Posted: Fri Nov 08, 2013 07:38 PM

One of the most frustrating problems to solve is when it "happens" at only one customer location, and is not being duplicated at others, and cannot be duplicated on my test computers !

In long discussions with this client, it turns out the problem has been appear far longer than he originally said. In fact, the problem has occurred for over a year ( boy was that misleading ), and the credit card processing program has only been on the system for about 6 months.

I went online and took a close look at his computer this morning. He is running Windows 7 - 64 bit with only 2 GB of RAM. With only 2 programs running he is using more than 80% of his RAM, and he runs more. The Virtual Memory is, of necessity, in use, and I'm sure he's not real patient while the computer swaps RAM to disk, or the reverse. My first suggestion was to immediately increase the RAM ( for $35 US he can add 4 GB to the machine ) to see if that resolves the problem.

Meanwhile, the problem actually is limited to our implementation of the Codejock program. I realize the disadvantage of the "black box" but at this point in time we do get great functionality from this program, and in every other case I have no problem. I'm thinking that it may be wise for me to focus on this issue within the Codejock code, and to look at other elements of my program which may not be using resources efficiently.

Thanks for all of the ideas.

Tim Stone
http://www.MasterLinkSoftware.com
http://www.autoshopwriter.com
timstone@masterlinksoftware.com
Using: FWH 23.10 with Harbour 3.2.0 / Microsoft Visual Studio Community 2022-24 32/64 bit
Posts: 195
Joined: Sun Jul 22, 2012 07:01 PM
Re: Windows / TPANEL
Posted: Fri Nov 08, 2013 07:59 PM

Tim,

I needed to review some changes in the past couple days, part of which is I did a diff between 13.09 Source\Classes and 13.03 Source\Classes. I do not see that TPanel.prg changed between those two releases. There have been about 30 class files changed between those two releases, one of which is activex.prg, with at least some of the changes made in the area of 32 and 64 but operating system differences. I don't know if you are using this activex class with codejock, but if you are this seems to me to be a place to look.

Robb

Posts: 3022
Joined: Fri Oct 07, 2005 01:45 PM
Re: Windows / TPANEL
Posted: Fri Nov 08, 2013 08:51 PM

Robb,

Thanks. That's the next avenue of investigation. I did the compare of the TPanel files already, but did not have time to post there were no changes. I just remember a discussion, and it seemed like a few days ago, but it could have been in notes further back that I just read recently.

Tim

Tim Stone
http://www.MasterLinkSoftware.com
http://www.autoshopwriter.com
timstone@masterlinksoftware.com
Using: FWH 23.10 with Harbour 3.2.0 / Microsoft Visual Studio Community 2022-24 32/64 bit

Continue the discussion