473,753 Members | 8,053 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Crash on target PC (not dev PC) when hosting a WinFormsView in a CFrameWnd?

Hi All,

Grateful if anyone has any suggestions here? I have a VS2005 MFC app
which hosts several types of views in CFrameWnds - one of which
contains a managed control hosted in a CWinFormsView

Everything works well on my dev pc (and other peoples dev pcs), but
when I try and instantiate the managed view on a target-pc (no
compilers, etc) there's an exception thrown followed by program
termination.

Compiling the release build with debug info and optimizations turned
off, I can trace the source of the crash to this line using WndBg

CView *pNewView = pFrame->CreateView(pIn fo->m_pszTitle, pInfo-
>m_pViewClass ,
pInfo->m_uViewAcceler ators);

m_pViewClass is just RUNTIME_CLASS(C WFVMessageView) which is the
CWinFormsView class. When I step over this line there's a first
chance exception 0x80000003 thrown (bad params?) way down in nt.dll

Both PCs have .NET v.2.0.50727 installed and vcredist_x86.ex e has been
applied to the target PC? The managed control resides in a dll in the
same folder as the app module (not registered in the GAC or anything).

Like I say, it works well on a dev-pc but not a clean one, so maybe
I've missed a step out in the installer or something???

Many thanks,

Duncan.

Apr 30 '07 #1
1 1694
On Apr 30, 10:25 pm, Duncan Smith <DSmith1...@goo glemail.comwrot e:
Hi All,

Grateful if anyone has any suggestions here? I have a VS2005 MFC app
which hosts several types of views in CFrameWnds - one of which
contains a managed control hosted in a CWinFormsView

Everything works well on my dev pc (and other peoples dev pcs), but
when I try and instantiate the managed view on a target-pc (no
compilers, etc) there's an exception thrown followed by program
termination.

Compiling the release build with debug info and optimizations turned
off, I can trace the source of the crash to this line using WndBg

CView *pNewView = pFrame->CreateView(pIn fo->m_pszTitle, pInfo->m_pViewClass ,

pInfo->m_uViewAcceler ators);

m_pViewClass is just RUNTIME_CLASS(C WFVMessageView) which is the
CWinFormsView class. When I step over this line there's a first
chance exception 0x80000003 thrown (bad params?) way down in nt.dll

Both PCs have .NET v.2.0.50727 installed and vcredist_x86.ex e has been
applied to the target PC? The managed control resides in a dll in the
same folder as the app module (not registered in the GAC or anything).

Like I say, it works well on a dev-pc but not a clean one, so maybe
I've missed a step out in the installer or something???

Many thanks,

Duncan.
Found the problem: If you derive a class from CWinFormsView then your
app will require 'mfcmifc80.dll' at runtime, but this file does not
get shipped with vcredist_x86.ex e so the onus is on your installer.

It was difficult to spot, because no information is given and even
WinDbg can't debug the managed module. In the end I hooked up a dev-
laptop to a release machine for a remote debug session - and finally
got a sensible error message.

It's a shame about WinDbg though because I won't always have a dev-pc
handy in the release environment. Oh well.

Regards,

Duncan.

May 1 '07 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

48
8504
by: Joseph | last post by:
Hi I'm writing a commercial program which must be reliable. It has to do some basic reading and writing to and from files on the hard disk, and also to a floppy. I have foreseen a potential problem. The program may crash unexpectedly while writing to the file. If so, my program should detect this during startup, and then (during startup) probably delete the data added to the file and redo the writing operation.
1
4300
by: agrsaurabh | last post by:
Hello Everybody, I have created an AVI Player using DirectShow. This player is working fine. I have also created a View Window (with class name CViewWnd) using CFrameWnd class. This view window is used in an application which plays its own customised files (of some other extensions) on this view window. Now:
5
4136
by: Marc Gustafson | last post by:
This function is executed when a application file is double-clicked to open in a VC++ application. Specifically, this function is enabled by RegisterShellFileTypes () in the application's InitInstance. However, under MFC 7.1 for VC++ .NET 2003, CFrameWnd::OnDDEExecute has a bug that repeatedly generates this error message in the debugger Error: failed to execute DDE command ''.
6
2891
by: pradeep_TP | last post by:
Hi all, I am using IIS 5.0 and this question is regarding working of ASP.net worker process. I have only one web application right now on my web server. This means that only one AppDomain will be created inside a single worker process. NOw for example, due to some reason, my web application generated a stack overflow error and crashed my appdoman (this happend in real case). In this case as far as my knowledge goes, only appdomain...
1
6722
by: David Veeneman | last post by:
Does anyone knmow why an asynchronous worker method would crash if the e.Cancel method is set to true, but not otherwise? I'm working on a demo app with an asynchronous call, using the .NET 2.0 BackgroundWorker component. The app works fine if I let the worker method proceed to completion. But if I cancel the worker method, it crashes. Specifically, if I set the DoWorkEventArgs.Cancel property to true, the worker thread crashes at the...
4
2957
by: Patricia Mindanao | last post by:
I want to call cgi perl scripts on my web hosters server from my HTML web pages (on the the web hosters server too). It occurs sometimes (especially during development phase) that these cgi-perl scripts didn't work like intended. They crash because e.g. - syntax errors - wrong or changing pathes - unexpected user input - ...
110
10618
by: alf | last post by:
Hi, is it possible that due to OS crash or mysql itself crash or some e.g. SCSI failure to lose all the data stored in the table (let's say million of 1KB rows). In other words what is the worst case scenario for MyISAM backend? Also is it possible to not to lose data but get them corrupted?
3
2278
by: Nalaka | last post by:
Hi, Can you tell me what type a things in asp.net code can crash... "application pool". Any example would do.... I was under imresiion that code cannot crash the app pool. Any direction is deeply appreciated Nalaka
11
3046
by: =?Utf-8?B?R2VyaGFyZA==?= | last post by:
I have run into a situation that if a page/tab that uses the Ajax toolkit (using .net version 3.5) is closed before the Ajax enable controls complete loading, then IE locks up. Does it in both IE7 and IE8. There is no issue when the controls are allowed to complete loading. Can you please tell me the best practice that handles this? Thanks.
0
9072
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8896
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9653
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
9421
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9333
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
6869
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6151
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
1
3395
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2284
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.