'System.StackOverflowException' occurred in tessnet2.DLL asp.net 2.0 C#

173 views
Skip to first unread message

johny

unread,
May 14, 2009, 7:25:49 AM5/14/09
to tesseract-ocr
hi everyone

An unhandled exception of type 'System.StackOverflowException'
occurred in tessnet2.DLL

on line
List<tessnet2.Word> result = ocr.DoOCR(image, Rectangle.Empty);

asp.net 2.0 with C# on Production server

pls advice

regards

k_a_bahar

unread,
May 14, 2009, 7:45:37 AM5/14/09
to tesseract-ocr
I got the same error when deployed tessnet2 on IIS but it is not
happening everywhere!
I got the error for (IIS7 on Vista x86) and (IIS6 on Windows Server
2003 x86) but it works on (IIS6 + Windows Server 2003 x64).
These are the platforms I have access to, but my guess is that it only
happens on x86.

johny

unread,
May 14, 2009, 8:01:51 AM5/14/09
to tesseract-ocr
i m trying on IIS6 on Windows Server
2003 x86

any work around for this

regards

Remi Thomas

unread,
May 14, 2009, 8:47:30 AM5/14/09
to tesseract-ocr
Did you try with the DLL I put yesterday at 4pm (GMT+1) ?

There is a big difference with previous version (same version number,
I should have change it)
The last one is compile in native mode.
The previous one was compile in managed mode but there was a problem
with AppDomain and static variables (see my web page).

Rémi
> > > regards- Hide quoted text -
>
> - Show quoted text -

k_a_bahar

unread,
May 14, 2009, 9:02:38 AM5/14/09
to tesseract-ocr
Thanks Rémi. I just downloaded the latest version and it works without
a problem.

johny

unread,
May 14, 2009, 9:31:05 AM5/14/09
to tesseract-ocr
plz paste the link of that dll here

regards

k_a_bahar

unread,
May 14, 2009, 9:33:02 AM5/14/09
to tesseract-ocr

johny

unread,
May 14, 2009, 9:43:40 AM5/14/09
to tesseract-ocr
still the same problem for me ,can u pls attached that dll and send to
my email


On May 14, 1:33 am, k_a_bahar <k.a.ba...@gmail.com> wrote:
> You can download it fromhttp://www.pixel-technology.com/freeware/tessnet2/.

johny

unread,
May 14, 2009, 9:57:09 AM5/14/09
to tesseract-ocr
i restart the iis and its working now
thank you so much Rémi , k_a_bahar

regards

k_a_bahar

unread,
May 14, 2009, 10:00:59 AM5/14/09
to tesseract-ocr
Looks like the error still happens but not for all documents! I tried
a few different documents and got that error for only one of them.
This happens for me on Vista x86 but works fine on Server 2003 x64.
Also restarted IIS but the same thing happens again.

johny

unread,
May 14, 2009, 12:08:46 PM5/14/09
to tesseract-ocr
Rémi , k_a_bahar its not working still having the same error

regards

johny

unread,
May 14, 2009, 12:10:27 PM5/14/09
to tesseract-ocr
Rémi , k_a_bahar its not working still having the same error

regards


On May 14, 2:00 am, k_a_bahar <k.a.ba...@gmail.com> wrote:

johny

unread,
May 14, 2009, 12:36:35 PM5/14/09
to tesseract-ocr
Rémi , k_a_bahar its not working still having the same error

regards


On May 14, 2:00 am, k_a_bahar <k.a.ba...@gmail.com> wrote:

Remi Thomas

unread,
May 14, 2009, 1:28:56 PM5/14/09
to tesseract-ocr
Ok, I need more information.
Take the new bin.zip
http://www.pixel-technology.com/freeware/tessnet2/bin.zip
and deploy tessnet2.dll and tessnet2.pdb to have more info from the
debugger

Give stack trace here.

Rémi

johny

unread,
May 15, 2009, 6:14:11 AM5/15/09
to tesseract-ocr
i deploy tessnet2.dll and tessnet2.pdb
result is the same
on debug mode stuck on the line
List<tessnet2.Word> result = ocr.DoOCR(image, Rectangle.Empty);
showing:
An unhandled exception of type 'System.StackOverflowException'
occurred in tessnet2.DLL

and without debug
page cannot be display

plz let me now any work around for this .

regards


On May 14, 5:28 am, Remi Thomas <remi.tho...@gmail.com> wrote:
> Ok, I need more information.
> Take the new bin.ziphttp://www.pixel-technology.com/freeware/tessnet2/bin.zip

Remi Thomas

unread,
May 15, 2009, 9:07:52 AM5/15/09
to tesseract-ocr
Hi,

Can you give me your project and the problematic image ?
Use the mail at the bottom of tessnet2 web page to send the zip (or
rar).

Rémi

johny

unread,
May 15, 2009, 10:26:42 AM5/15/09
to tesseract-ocr
i attached code plz check clone.rar
its work fine on development server
but on IIS it gives error
about attached project i put website-start option check use custom
server and base url= http://localhost/testfrmImg

so u need to add testfrmimg folder to iss by right click on the folder
click on web sharing and click on share this folder and add alias
testfrmImg.

then run project on debug mode

johny

unread,
May 15, 2009, 10:42:18 AM5/15/09
to tesseract-ocr
for attached file
down in the list
clone.rar johny 2.8 MB 7:26am



On May 15, 2:26 am, johny <salmanlov...@gmail.com> wrote:
> i attached code plz check clone.rar
> its work fine on development server
> but on IIS it gives error
> about attached project i put website-start option check use custom
> server and base url=http://localhost/testfrmImg

Remi Thomas

unread,
May 15, 2009, 12:29:32 PM5/15/09
to tesseract-ocr
Johny,

Get the latest bin and try, it works after a small correction.
http://www.pixel-technology.com/freeware/tessnet2/bin.zip

Rémi

johny

unread,
May 15, 2009, 4:54:53 PM5/15/09
to tesseract-ocr
Remi

i deploy the new dll file but same error.
Appreciate your response.
plz find the solution for me .

thanks and regards


On May 15, 4:29 am, Remi Thomas <remi.tho...@gmail.com> wrote:
> Johny,
>
> Get the latest bin and try, it works after a small correction.http://www.pixel-technology.com/freeware/tessnet2/bin.zip

johny

unread,
May 15, 2009, 5:11:46 PM5/15/09
to tesseract-ocr
when i deploy new dll file by add reference its showing this error

Could not load file or assembly 'tessnet2' or one of its dependencies.
An attempt was made to load a program with an incorrect format.
Description: An unhandled exception occurred during the execution of
the current web request. Please review the stack trace for more
information about the error and where it originated in the code.


Stack Trace:


[BadImageFormatException: Could not load file or assembly 'tessnet2'
or one of its dependencies. An attempt was made to load a program with
an incorrect format.]
System.Reflection.Assembly.nLoad(AssemblyName fileName, String
codeBase, Evidence assemblySecurity, Assembly locationHint,
StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean
forIntrospection) +0
System.Reflection.Assembly.InternalLoad(AssemblyName assemblyRef,
Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean
forIntrospection) +211
System.Reflection.Assembly.InternalLoad(String assemblyString,
Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean
forIntrospection) +141
System.Reflection.Assembly.Load(String assemblyString) +25
System.Web.Configuration.CompilationSection.LoadAssemblyHelper
(String assemblyName, Boolean starDirective) +98

[ConfigurationErrorsException: Could not load file or assembly
'tessnet2' or one of its dependencies. An attempt was made to load a
program with an incorrect format.]
System.Web.Configuration.CompilationSection.LoadAssemblyHelper
(String assemblyName, Boolean starDirective) +724

System.Web.Configuration.CompilationSection.LoadAllAssembliesFromAppDomainBinDirectory
() +297
System.Web.Configuration.CompilationSection.LoadAssembly
(AssemblyInfo ai) +71
System.Web.Configuration.AssemblyInfo.get_AssemblyInternal() +39
System.Web.Compilation.BuildManager.GetReferencedAssemblies
(CompilationSection compConfig) +203
System.Web.Compilation.WebDirectoryBatchCompiler..ctor
(VirtualDirectory vdir) +163
System.Web.Compilation.BuildManager.BatchCompileWebDirectoryInternal
(VirtualDirectory vdir, Boolean ignoreErrors) +68
System.Web.Compilation.BuildManager.BatchCompileWebDirectory
(VirtualDirectory vdir, VirtualPath virtualDir, Boolean ignoreErrors)
+253
System.Web.Compilation.BuildManager.CompileWebFile(VirtualPath
virtualPath) +148
System.Web.Compilation.BuildManager.GetVPathBuildResultInternal
(VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp,
Boolean allowBuildInPrecompile) +618
System.Web.Compilation.BuildManager.GetVPathBuildResultWithNoAssert
(HttpContext context, VirtualPath virtualPath, Boolean noBuild,
Boolean allowCrossApp, Boolean allowBuildInPrecompile) +105
System.Web.Compilation.BuildManager.GetVirtualPathObjectFactory
(VirtualPath virtualPath, HttpContext context, Boolean allowCrossApp,
Boolean noAssert) +147
System.Web.Compilation.BuildManager.CreateInstanceFromVirtualPath
(VirtualPath virtualPath, Type requiredBaseType, HttpContext context,
Boolean allowCrossApp, Boolean noAssert) +81
System.Web.UI.PageHandlerFactory.GetHandlerHelper(HttpContext
context, String requestType, VirtualPath virtualPath, String
physicalPath) +56

System.Web.UI.PageHandlerFactory.System.Web.IHttpHandlerFactory2.GetHandler
(HttpContext context, String requestType, VirtualPath virtualPath,
String physicalPath) +112
System.Web.HttpApplication.MapHttpHandler(HttpContext context,
String requestType, VirtualPath path, String pathTranslated, Boolean
useAppConfig) +352

System.Web.MapHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute
() +183
System.Web.HttpApplication.ExecuteStep(IExecutionStep step,
Boolean& completedSynchronously) +191





regards

johny

unread,
May 15, 2009, 5:25:28 PM5/15/09
to tesseract-ocr
i re-installed the Microsoft Visual C++ 2005 SP1 Redistributable
Package.

still same error

Could not load file or assembly 'tessnet2' or one of its dependencies.
An attempt was made to load a program with an incorrect format.
Description: An unhandled exception occurred during the execution of
the current web request. Please review the stack trace for more
information about the error and where it originated in the code.

Remi Thomas

unread,
May 15, 2009, 6:14:36 PM5/15/09
to tesseract-ocr
You have to install C++ 2008 SP1
Get link on the tessnet2 web page.
> > System.Web.Configuration.CompilationSection.LoadAllAssembliesFromAppDomainB­inDirectory
> > System.Web.MapHandlerExecutionStep.System.Web.HttpApplication.IExecutionSte­p.Execute
> ...
>
> plus de détails »- Masquer le texte des messages précédents -
>
> - Afficher le texte des messages précédents -

johny

unread,
May 17, 2009, 1:57:46 AM5/17/09
to tesseract-ocr
its working now .
many thanks to remi for timely response.
> ...
>
> read more »

johny

unread,
May 17, 2009, 2:12:18 AM5/17/09
to tesseract-ocr
remi plz help me to read this small image, i just uploaded clone2.tif

regards
> ...
>
> read more »
Reply all
Reply to author
Forward
0 new messages