Quinn-Curtis Forums
Quinn-Curtis Forums
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Tools for Windows
 Charting and Real-Time Graphics Tools for Windows
 CRITICAL ERROR: Error Building a graph
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

mefoley

3 Posts

Posted - 14 Nov 2007 :  11:07:57  Show Profile  Reply with Quote
We have an application that has been running successfully. Recently, we had had a rash of laptops that produce the following error:

CRITCAL ERROR
Error building a graph - access violation at 5334a4
Your Program will terminate

This application runs on other laptops of the same model that is based on the same build level (same software). Expect some software or driver is causing the issue.

A debug version of our application produces the following errors when trying to display graph in same two areas of the app:

Debug Assertion failure in PageView.cpp, Line 122 and
Debug Assertion failure in PageWnd.cpp, Line 190

This is on Assert in the OnCreate method.

BTW, the demo (Wrtdemo.exe) does work on one of the laptops (only tested one)

Any help / advise on this issue?

quinncurtis

1531 Posts

Posted - 14 Nov 2007 :  11:45:24  Show Profile  Reply with Quote
There isn't much we can tell based on the information provided.

Are all the laptops where it fails the same? What is the operating system ?

Does your application used multi-threading.

Are there any data values, read from a file, or calculated, no matter how trivial, that is being accessed in the graph building routine, that may not be properly initialized on the problem laptops.

How many years was your program been running properly, before the rash of failure?

The software requires that the computer have a default printer selected. Check to see if the laptops that have the problem have a default printer selected, and if not, select one and try the program again. It is not necessary that a printer is attached to the computer, only that default printer is selected from the Control Panel. Since your laptop runs the WRTDemo example program, this is probably not the problem, but it is simple to check.

The WRTDemo example program does not use MFC, so try and run some of the example programs in the QCW32\MFCLIB folder on the problem machine. BIGMDI and RTMDI1 would be good ones to try.
Go to Top of Page

mefoley

3 Posts

Posted - 26 Nov 2007 :  13:21:45  Show Profile  Reply with Quote
I rebuilt BIGMDI demo using VStudio 2005. I recompiled CT32D and BIGMDI and get the same CRITICAL Error and since I compiled the debug version, I get the same Debug Assertion Failed in PageView.cpp, Line 122.

In the function QCPageView::OnCreate(LPCREATESTRUCT lpCS) in PageView.cpp, the lpCS structure is already wrong. The window size is (cy,cx,y,x) = (0,0,0,0), the lpszName is "OleMainThreadWndName" and lpszClass = BadPtr.

This executable works on one machine and not another. The machine that does not work is a machine that can run the original application that this whole problem started.

I appears that it could be the order of DLLs and maybe which ones.

In compiling the RTMDI1 demo (using VSTudio6) it is looking for qcwrt.h in mfclib\dyndata.h. It is not in the QCW32 directory structure. Where should it be found?
Go to Top of Page

quinncurtis

1531 Posts

Posted - 26 Nov 2007 :  13:54:02  Show Profile  Reply with Quote
The RTMDI1 examples program is an MFC Class Library example that uses our Real-Time Graphics Tools library. If you don't have the qcwrt.h include file, then you don't have our Real-Time Graphics Tools (WIN-BMC-200) installed. The RTMDI1 example program is installed as part of the GCL for MFC install, but no check is actually made if you have the Real-Time Graphics Tools installed.

We still suspect that you may have a default printer problem. You must have a default printer selected for the computer, even if a printer is not attached. Please answer that question, and preferrably all the questions in our original post.

Go to Top of Page

mefoley

3 Posts

Posted - 26 Nov 2007 :  17:36:28  Show Profile  Reply with Quote
1. A few of the laptops are identical models Compaq/HP nc6230, some are other HP models (NC6400) all running Windows XP.

2. The application does not appear to be Multi-Threaded

3. The issue occured in October and the application has been running for years. The laptops resently received printer driver updates as a new network printer was installed (replace old one).

4. There are data values read in for the graphics (not sure what you are asking here). But we read serialized data that is used for the graphs.

Finally, I switched the default printer on my laptop (DELL Latitude D830) to default to "Microsoft Office Document Image Writer" and the BIGMDI demo works. Switch back to "HP LaserJet 2430 PCL 5e" and the BIGMID demo produces the error. However the trouble application runs on my PC in either case.

Also, one of the trouble laptops () when the user switches to the "Microsoft Office Document Image Writer" printer the trouble application will display the graphs. The two printers that he uses are a color hp lj cp3505n and a b&w 5200tn (both crash the application). More of the trouble laptops use hp lj cp3505n printers.
Go to Top of Page

dehardebeck

1 Posts

Posted - 27 Jun 2008 :  09:19:41  Show Profile  Reply with Quote
I have the same problem. I get a critical error - error building a graph. I think the problem may be related to the differences between MFC70 and MFC71. I have an older machine with Visual Studio 2003 which uses MFC70 for the build. This program compiles and runs fine on that machine. I have a newer machine with Visual Studio 2003 which builds with MFC71. The program compiles correctly but produces the critical error and exits when launched. When I move the executable from the older machine (7.0) to the newer machine, the program fails because it cannot find mfc70.dll and msvcr70.dll. When I copy the two libraries from the older machine to the newer machine, the program produces the same critical error even though it was built for MFC70.
Go to Top of Page

quinncurtis

1531 Posts

Posted - 27 Jun 2008 :  10:17:09  Show Profile  Reply with Quote
We have no experience with this problem.

Did you compile the GCL for MFC libraries for MFC 7.1, or are you using ones compiled for MFC 7.0 ?

Assuming you recompiled the GCL for MFC libraries, can you reproduce the problem using one of our example progams ?

You should not be copying random MFC*70.dll files from one computer to the next. There are runtime installs from Microsoft you should be able to download that will install all of the runtime files associated with a given version of MFC into the proper folders.
Go to Top of Page

wieland

3 Posts

Posted - 26 Nov 2008 :  11:03:32  Show Profile  Reply with Quote

I also have this problem.
We use Visual Studio 6.0 Enterprise with QCW-Tools V3.0 with W2K and XP. If the application is built as debug-version, the program crashes also with "Debug Assertion failure in PageView.cpp, Line 122". In the release-version it does not crash, but the graphics window is completely white. Only if you close this window the program ends without any message. After some tests I think, that this problem only appears if a HP-printer with USB or Ethernet-interface is used (i.e. DeskJet D4200, DeskJet 6940) and set as default printer. With i.e. an Epson stylus photo R300-printer or an old HP-Printer with LPT-interface (HP D 640) it works!


quote:
Originally posted by quinncurtis

There isn't much we can tell based on the information provided.

Are all the laptops where it fails the same? What is the operating system ?

Does your application used multi-threading.

Are there any data values, read from a file, or calculated, no matter how trivial, that is being accessed in the graph building routine, that may not be properly initialized on the problem laptops.

How many years was your program been running properly, before the rash of failure?

The software requires that the computer have a default printer selected. Check to see if the laptops that have the problem have a default printer selected, and if not, select one and try the program again. It is not necessary that a printer is attached to the computer, only that default printer is selected from the Control Panel. Since your laptop runs the WRTDemo example program, this is probably not the problem, but it is simple to check.

The WRTDemo example program does not use MFC, so try and run some of the example programs in the QCW32\MFCLIB folder on the problem machine. BIGMDI and RTMDI1 would be good ones to try.


Go to Top of Page

quinncurtis

1531 Posts

Posted - 26 Nov 2008 :  11:46:17  Show Profile  Reply with Quote
Here is a link to a DLL (make sure you unzip the attached file to get at the wct32dr3.dll) that we created a few years ago to solve a problem with HP printers.

http://quinn-curtis.com/downloadsoftware/wct32dr3.zip

The DLL solves a problem that when a few newer HP printers were selected as the computers default printer, when the program booted, you would immediately get an error, " Error Building a graph", that would terminate the program.

Rename your original wct32dr3.dll to wct32dr3.bak, and copy the attached wct32dr3.dll in its place. Make sure you search your entire computer for instances of the wct32dr3.dll to make sure a copy isn't lurking in some other folder, such as Windows\System32. We don't copy the files there, but often users of our software do.
Go to Top of Page

wieland

3 Posts

Posted - 27 Nov 2008 :  03:56:06  Show Profile  Reply with Quote
Sorry, it does not work! The error message is "Debug Assertion failure in PageView.cpp, Line 122" and not " Error Building a graph"!
Also now I found out, that our program is referencing only the 2 DLL's WCT32FR3.dll and WRT32FR3.dll but not the W?T32DR3.dll-files. Perhaps there is a problem also ?


quote:
Originally posted by quinncurtis

Here is a link to a DLL (make sure you unzip the attached file to get at the wct32dr3.dll) that we created a few years ago to solve a problem with HP printers.

http://quinn-curtis.com/downloadsoftware/wct32dr3.zip

The DLL solves a problem that when a few newer HP printers were selected as the computers default printer, when the program booted, you would immediately get an error, " Error Building a graph", that would terminate the program.

Rename your original wct32dr3.dll to wct32dr3.bak, and copy the attached wct32dr3.dll in its place. Make sure you search your entire computer for instances of the wct32dr3.dll to make sure a copy isn't lurking in some other folder, such as Windows\System32. We don't copy the files there, but often users of our software do.

Go to Top of Page

quinncurtis

1531 Posts

Posted - 27 Nov 2008 :  09:35:42  Show Profile  Reply with Quote
The WCT32FR3 DLL is the seldom used float version of the WCT32DR3.DLL charting tools DLL. We have added that version of the DLL to the WCT32DR3.DLL zip file, so just download it again. Follow our original instructions, except use the WCT32FR3.DLL file instead of WCT32R3.DLL.
Go to Top of Page

wieland

3 Posts

Posted - 27 Nov 2008 :  10:03:04  Show Profile  Reply with Quote
Thank you very much for the fast support, it works
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
Quinn-Curtis Forums © 2000-07 Quinn-Curtis, Inc. Go To Top Of Page
Powered By: Snitz Forums 2000 Version 3.4.07