Infralution Support Forum Index Infralution Support
Support groups for Infralution products
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Infralution.Richtext.dll cannot load on target machine.

 
Post new topic   Reply to topic    Infralution Support Forum Index -> Virtual Tree Support
View previous topic :: View next topic  
Author Message
sgouri



Joined: 02 Apr 2007
Posts: 7

PostPosted: Mon Apr 02, 2007 9:58 am    Post subject: Infralution.Richtext.dll cannot load on target machine. Reply with quote

Hello,

Summary : Richtext cannot load on test / target machine. The net result is that even simple applications cannot be deployed on end user machine if they rely on Infralution.RichText.dll.

Details :

We have made an application. We build it on a development machine with an Infralution installation correctly activated with recently purchased license. We test the application on the development machine and on a test target machine. The target machine has no development tools, it mimicks the machine of the end user of the application.

To perform a test we copy the output of the bin/Release directory on the test machine and run it there.

An application that only instanciates a VirtualTree works on both machines.
An application that relies on Infralution.RichText.dll works on development machine and fails on the test machine.

Even the sample application "Rich Text Tree" bundled with Infralution does not work on the test machine.

The symptom is always the same. An exception (translated from french) :
Quote:
"Cannot load file or assembly 'Infralution.RichText, Version 3.3.1.0, Culture=neutral, PublicKeyToken=xxx' or one of its dependencies. This application could not start because application configuration is incorrect. Reinstalling the application may solve the problem. (Exception from HRESULT : 0x800736B1.)


The stacktrace has on top :
Quote:
Infralution.Controls.VirtualTree.CellWidget.GetOptimalWidth(Graphics graphics)
(...) triggered by
VirtualTree.DataSource = someSource
which works fine on the development machine.

There is also :
"System.Runtime.InteropServices.COMException (0x800736B1)"

The net result is that even simple applications cannot be deployed on end user machine if they rely on Infralution.RichText.dll.

I have google a bit and read that post : [http://www.infralution.com/phpBB2/viewtopic.php?t=701].
The problem is probably related with Infralution.RichText.dll needing native code.

I haven't found anything about this in the documentation or in this forum.

Can you recommend a solution ?

Thank you for your attention.
Back to top
View user's profile Send private message
sgouri



Joined: 02 Apr 2007
Posts: 7

PostPosted: Mon Apr 02, 2007 4:49 pm    Post subject: Bug confirmed on third machine. Reply with quote

OS used on all machines is Windows XP Professional with Service Pack 2, all updates applied. Infralution is v3.3.1 .

We installed another fresh XP Professional on another test machine with all updates and Framework .NET 2.0 from Microsoft Update (.NET 2.0 is an optional update). The results are exactly the same as with the first test machine.

A good practice is to attach a sample solution that exhibits the faulty behavior. Well, one of the solutions we tried is simply the solution that Infralution installs (on dev machines) in C:\Program Files\Infralution\VirtualTree3\Samples\VS2005\CS\RichTextTree

I am surprised that Infralution does not document this problem and how to solve it. We are not the first to consider deploying an Infralution-based product since RichText.dll depends on native code, are-we ?

Thank you for your attention.
Back to top
View user's profile Send private message
Infralution



Joined: 28 Feb 2005
Posts: 5027

PostPosted: Mon Apr 02, 2007 10:20 pm    Post subject: Reply with quote

Is your test machine running the x64 version of XP? If so you will have the same issue referred to in the post. You need to compile your application with the Platform set to Win32.

We also test on clean installs of XP with SP2 and have not previously seen the issue you describe. However we will rerun these tests again to double check.

Quote:
To perform a test we copy the output of the bin/Release directory on the test machine and run it there


Does the directory on the test machine actually contain the Infralution.RichText dll? On your development machine the DLLs are installed in the GAC - so the application will run without the DLLs needing to be in the same directory as the application.
_________________
Infralution Support
Back to top
View user's profile Send private message Visit poster's website
sgouri



Joined: 02 Apr 2007
Posts: 7

PostPosted: Tue Apr 03, 2007 8:27 am    Post subject: Reply with quote

Infralution wrote:
Is your test machine running the x64 version of XP? If so you will have the same issue referred to in the post. You need to compile your application with the Platform set to Win32.


All machines are 32-bit.

Infralution wrote:
Does the directory on the test machine actually contain the Infralution.RichText dll? On your development machine the DLLs are installed in the GAC - so the application will run without the DLLs needing to be in the same directory as the application.


Yes, all four Infralution DLL are in the output directory. We have even set "copy local = true" on the references in the project so that they are automatically copied in that directory as part of the build process.

Furthermore, if I delete Infralution.RichText.dll on the target machine and run the program, the error message is different. No more HRESULT... or COM-related exception but a message meaning that the file was not found.

I did another test : use the executable supplied by Infralution installation in "released" subdirectories in C:\Program Files\Infralution\VirtualTree3\Samples\VS2005\CS

In each of those "released" dirs, I copied the four Infralution dlls and ran the executable. All but one executables failed with a generic error message "xxx.exe failed and must be closed ... please tell Microsoft [send error report] [do not send]" (I 'press do not send').
The only executable that behaved differently was AdvancedFeatures.exe .
It showed its window but the lower area did not show the grid/tree. Instead it was white, with a red border and two diagonal red lines crossing at the center. A window appeared on top as usually happens when a .NET program in release build encounters an exception. The message is essentially the same as in my first post. Three buttons at the bottom : details (shows the details copy-pasted below), continue (show that box again) and quit. I can send you a screenshot if you want.

Here is the complete error message. It's in french but I guess it doesn't change anything relevant.

Quote:
Consultez la fin de ce message pour plus de détails sur l'appel du débogage
juste-à-temps (JIT) à la place de cette boîte de dialogue.

************** Texte de l'exception **************
System.IO.FileLoadException: Impossible de charger le fichier ou l'assembly 'Infralution.RichText, Version=3.3.1.0, Culture=neutral, PublicKeyToken=3e7e8e3744a5c13f' ou une de ses dépendances. Cette application n'a pas pu démarrer car la configuration de l'application est incorrecte. Réinstaller l'application pourrait résoudre ce problème. (Exception de HRESULT : 0x800736B1)
Nom du fichier : 'Infralution.RichText, Version=3.3.1.0, Culture=neutral, PublicKeyToken=3e7e8e3744a5c13f' ---> System.Runtime.InteropServices.COMException (0x800736B1): Cette application n'a pas pu démarrer car la configuration de l'application est incorrecte. Réinstaller l'application pourrait résoudre ce problème. (Exception de HRESULT : 0x800736B1)
à Infralution.Controls.VirtualTree.CellWidget.PaintText(Graphics graphics, Rectangle bounds, Style style, String text)
à Infralution.Controls.VirtualTree.CellWidget.PaintForeground(Graphics graphics, Style style, Boolean printing)
à Infralution.Controls.VirtualTree.CellWidget.OnPaint(Graphics graphics)
à Infralution.Controls.Widget.OnPaint(Graphics graphics)
à Infralution.Controls.VirtualTree.RowWidget.OnPaint(Graphics graphics)
à Infralution.Controls.Widget.OnPaint(Graphics graphics)
à Infralution.Controls.VirtualTree.PanelWidget.OnPaint(Graphics graphics)
à Infralution.Controls.WidgetControl.PaintWidgets(Graphics graphics, Rectangle clipRectangle)
à Infralution.Controls.WidgetControl.OnPaint(PaintEventArgs e)
à Infralution.Controls.VirtualTree.VirtualTree.OnPaint(PaintEventArgs e)
à System.Windows.Forms.Control.PaintWithErrorHandling(PaintEventArgs e, Int16 layer, Boolean disposeEventArgs)
à System.Windows.Forms.Control.WmPaint(Message& m)
à System.Windows.Forms.Control.WndProc(Message& m)
à Infralution.Controls.BorderedControl.WndProc(Message& m)
à Infralution.Controls.VirtualTree.VirtualTree.WndProc(Message& m)
à System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
à System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
à System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)




************** Assemblys chargés **************
mscorlib
Version de l'assembly : 2.0.0.0
Version Win32 : 2.0.50727.42 (RTM.050727-4200)
CodeBase : file:///C:/WINDOWS/Microsoft.NET/Framework/v2.0.50727/mscorlib.dll
----------------------------------------
AdvancedFeatures
Version de l'assembly : 1.0.2622.16530
Version Win32 : 1.0.2622.16530
CodeBase : file:///C:/Documents%20and%20Settings/test/builds/InfralutionSamples/Samples/VS2005/CS/AdvancedFeatures/bin/Released/AdvancedFeatures.exe
----------------------------------------
System.Windows.Forms
Version de l'assembly : 2.0.0.0
Version Win32 : 2.0.50727.42 (RTM.050727-4200)
CodeBase : file:///C:/WINDOWS/assembly/GAC_MSIL/System.Windows.Forms/2.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
----------------------------------------
System
Version de l'assembly : 2.0.0.0
Version Win32 : 2.0.50727.42 (RTM.050727-4200)
CodeBase : file:///C:/WINDOWS/assembly/GAC_MSIL/System/2.0.0.0__b77a5c561934e089/System.dll
----------------------------------------
System.Drawing
Version de l'assembly : 2.0.0.0
Version Win32 : 2.0.50727.42 (RTM.050727-4200)
CodeBase : file:///C:/WINDOWS/assembly/GAC_MSIL/System.Drawing/2.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
----------------------------------------
System.Data
Version de l'assembly : 2.0.0.0
Version Win32 : 2.0.50727.42 (RTM.050727-4200)
CodeBase : file:///C:/WINDOWS/assembly/GAC_32/System.Data/2.0.0.0__b77a5c561934e089/System.Data.dll
----------------------------------------
Infralution.Controls.VirtualTree
Version de l'assembly : 3.3.1.0
Version Win32 : 3.3.1.0
CodeBase : file:///C:/Documents%20and%20Settings/test/builds/InfralutionSamples/Samples/VS2005/CS/AdvancedFeatures/bin/Released/Infralution.Controls.VirtualTree.DLL
----------------------------------------
Infralution.Controls
Version de l'assembly : 3.3.1.0
Version Win32 : 3.3.1.0
CodeBase : file:///C:/Documents%20and%20Settings/test/builds/InfralutionSamples/Samples/VS2005/CS/AdvancedFeatures/bin/Released/Infralution.Controls.DLL
----------------------------------------
System.Xml
Version de l'assembly : 2.0.0.0
Version Win32 : 2.0.50727.42 (RTM.050727-4200)
CodeBase : file:///C:/WINDOWS/assembly/GAC_MSIL/System.Xml/2.0.0.0__b77a5c561934e089/System.Xml.dll
----------------------------------------
Infralution.Common
Version de l'assembly : 3.3.1.0
Version Win32 : 3.3.1.0
CodeBase : file:///C:/Documents%20and%20Settings/test/builds/InfralutionSamples/Samples/VS2005/CS/AdvancedFeatures/bin/Released/Infralution.Common.DLL
----------------------------------------
mscorlib.resources
Version de l'assembly : 2.0.0.0
Version Win32 : 2.0.50727.42 (RTM.050727-4200)
CodeBase : file:///C:/WINDOWS/Microsoft.NET/Framework/v2.0.50727/mscorlib.dll
----------------------------------------
System.Transactions
Version de l'assembly : 2.0.0.0
Version Win32 : 2.0.50727.42 (RTM.050727-4200)
CodeBase : file:///C:/WINDOWS/assembly/GAC_32/System.Transactions/2.0.0.0__b77a5c561934e089/System.Transactions.dll
----------------------------------------
System.EnterpriseServices
Version de l'assembly : 2.0.0.0
Version Win32 : 2.0.50727.42 (RTM.050727-4200)
CodeBase : file:///C:/WINDOWS/assembly/GAC_32/System.EnterpriseServices/2.0.0.0__b03f5f7f11d50a3a/System.EnterpriseServices.dll
----------------------------------------
System.Configuration
Version de l'assembly : 2.0.0.0
Version Win32 : 2.0.50727.42 (RTM.050727-4200)
CodeBase : file:///C:/WINDOWS/assembly/GAC_MSIL/System.Configuration/2.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll
----------------------------------------
System.Windows.Forms.resources
Version de l'assembly : 2.0.0.0
Version Win32 : 2.0.50727.42 (RTM.050727-4200)
CodeBase : file:///C:/WINDOWS/assembly/GAC_MSIL/System.Windows.Forms.resources/2.0.0.0_fr_b77a5c561934e089/System.Windows.Forms.resources.dll
----------------------------------------

************** Débogage JIT **************
Pour activer le débogage juste-à-temps (JIT), le fichier de configuration pour cette
application ou cet ordinateur (machine.config) doit avoir la valeur
jitDebugging définie dans la section system.windows.forms.
L'application doit également être compilée avec le débogage
activé.

Par exemple :

<configuration>
<system.windows.forms jitDebugging="true" />
</configuration>

Lorsque le débogage juste-à-temps est activé, les exceptions non gérées
seront envoyées au débogueur JIT inscrit sur l'ordinateur
plutôt que d'être gérées par cette boîte de dialogue.


Last edited by sgouri on Tue Apr 03, 2007 9:06 am; edited 2 times in total
Back to top
View user's profile Send private message
Infralution



Joined: 28 Feb 2005
Posts: 5027

PostPosted: Tue Apr 03, 2007 8:49 am    Post subject: Reply with quote

OK we've been able to replicate this problem and (we think) track the source of it down. We recently installed VS2005 SP1 in our development environment and unfortunately Microsoft have made a change to the way the C runtime (CRT) libraries are handled which has broken RichText DLL on clean systems.

The Virtual Tree installer installs the SP1 version of the CRT - which the RichText DLL uses. This means that the DLL will load OK provided the Virtual Tree installer has been run (ie on your development machine) - but on a totally clean machine the SP1 CRT libraries are missing and the assembly does not fall back to using the standard CRT libraries which are installed.

We intend to get a fix out for this ASAP (probably tomorrow).
_________________
Infralution Support
Back to top
View user's profile Send private message Visit poster's website
sgouri



Joined: 02 Apr 2007
Posts: 7

PostPosted: Tue Apr 03, 2007 10:00 am    Post subject: Reply with quote

Infralution wrote:
OK we've been able to replicate this problem and (we think) track the source of it down. We recently installed VS2005 SP1 in our development environment and unfortunately Microsoft have made a change to the way the C runtime (CRT) libraries are handled which has broken RichText DLL on clean systems.

The Virtual Tree installer installs the SP1 version of the CRT - which the RichText DLL uses. This means that the DLL will load OK provided the Virtual Tree installer has been run (ie on your development machine) - but on a totally clean machine the SP1 CRT libraries are missing and the assembly does not fall back to using the standard CRT libraries which are installed.

We intend to get a fix out for this ASAP (probably tomorrow).


Thank you for your answer.

I would add that I was surprised of this dependence on RichText dll because our application does not explicitely require any "rich text" feature and I guess that not all of Infralution samples actually need those features. Alas it seems that probably any program requiring a Virtual Tree also requires all the other DLL and the dependence on unmanaged code, even if not actually needed.

As an example, see below that when compiling the Simple Tree sample, msbuild explicitely references RichText.

Code:

C:\Program Files\Microsoft Visual Studio 8\SDK\v2.0\bin\LC.exe /target:SimpleTree.exe /complist:licenses.licx /outdir:obj\Debug\ /i:"C:\Program Files\Infralution\VirtualTree3\bin\Infralution.Common.dll" /i:"C:\Program Files\Infralution\VirtualTree3\bin\Infralution.Controls.dll" /i:"C:\Program Files\Infralution\VirtualTree3\bin\Infralution.Controls.VirtualTree.dll" /i:C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\System.Data.dll /i:C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\System.Design.dll /i:C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\System.dll /i:C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\System.Drawing.dll /i:C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\System.Windows.Forms.dll /i:C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\System.Xml.dll /i:"C:\Program Files\Infralution\VirtualTree3\bin\Infralution.RichText.dll" /i:C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Microsoft.VisualC.dll
C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Csc.exe /noconfig /unsafe- /checked- /nowarn:1701,1702 /nostdlib- /errorreport:prompt /warn:4 /doc:SimpleTree.xml /baseaddress:285212672 /define:DEBUG;TRACE /reference:"C:\Program Files\Infralution\VirtualTree3\bin\Infralution.Common.dll" /reference:"C:\Program Files\Infralution\VirtualTree3\bin\Infralution.Controls.dll" /reference:"C:\Program Files\Infralution\VirtualTree3\bin\Infralution.Controls.VirtualTree.dll" /reference:C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\System.Data.dll /reference:C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\System.Design.dll /reference:C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\System.dll /reference:C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\System.Drawing.dll /reference:C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\System.Windows.Forms.dll /reference:C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\System.Xml.dll /debug+ /debug:full /filealign:4096 /optimize- /out:obj\Debug\SimpleTree.exe /resource:obj\Debug\Infralution.Controls.VirtualTree.Samples.SimpleTree.MainForm.resources /resource:obj\Debug\SimpleTree.exe.licenses /target:winexe /warnaserror- /win32icon:App.ico AssemblyInfo.cs MainForm.cs Part.cs


Thank you, I'll stay tuned for your fix to the initial problem.
Back to top
View user's profile Send private message
Infralution



Joined: 28 Feb 2005
Posts: 5027

PostPosted: Tue Apr 03, 2007 1:06 pm    Post subject: Reply with quote

We will also look at removing the dependence on the RichText if it is not actually being used (if this is possible).
_________________
Infralution Support
Back to top
View user's profile Send private message Visit poster's website
Infralution



Joined: 28 Feb 2005
Posts: 5027

PostPosted: Wed Apr 04, 2007 3:55 am    Post subject: Reply with quote

We have now released version 3.3.3 which removes the dependency on the SP1 versions of the CRT libraries. This should fix the issue with deploying on systems that do not have these libraries installed. We have also modified Virtual Tree so that deployment of the RichText dll is not required if you aren't using RichText features. See the announcement in this forum for more details.
_________________
Infralution Support
Back to top
View user's profile Send private message Visit poster's website
sgouri



Joined: 02 Apr 2007
Posts: 7

PostPosted: Wed Apr 04, 2007 9:23 am    Post subject: Problem solved. Reply with quote

Infralution wrote:
We have now released version 3.3.3 which removes the dependency on the SP1 versions of the CRT libraries. This should fix the issue with deploying on systems that do not have these libraries installed. We have also modified Virtual Tree so that deployment of the RichText dll is not required if you aren't using RichText features. See the announcement in this forum for more details.


I have installed version 3.3.3. With that version our application starts correctly on the test machine and the tree works.

Thank you very much for the quick and efficient support !
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Infralution Support Forum Index -> Virtual Tree Support All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group