Exception after changing from version

Discussions about TWAIN & WIA scanning in GdPicture.NET using GdPictureImaging.
Post Reply
iirusger
Posts: 12
Joined: Mon Jan 05, 2009 1:37 pm

Exception after changing from version

Post by iirusger » Fri Dec 11, 2009 1:40 pm

with version 6.4 we become an exception under Win7 64 bit (short: "...you trie read or write in secure Memory...". :(

Therefore I update to GdPicture V6.5
But after this the sourcecode didn't compile at the point "...RotateFlipType...",
because in the last version of it was a type of system.drawing. and now I take it back to a type of GdPicture.

After solve this, a new exception come if I execute the code follow:
=================================

Code: Select all

                try
                {
                    imageId = _gdpictureImaging.TwainAcquireToGdPictureImage(this.Handle);
                    var status = _gdpictureImaging.GetStat();
                    if (status != GdPictureStatus.OK)
                        throw new ApplicationException(status.ToString());
                }
                catch (Exception ex)
                {
                    MessageBox.Show("Der Scanvorgang konnte nicht ausgeführt werden.\n" + ex.Message, "orgAnice DMS DirektScan", MessageBoxButtons.OK,
                                MessageBoxIcon.Stop);
                    this.statustext.Text = "Scanvorgang mit Fehler abgebrochen.";
                    return;

                }
                imageCount = imageCount + 1;
                ApplyImageFilters(imageId);
=================================
the status was .OK and the catch give no exception back,
but the change to the routine ApplyImageFilters...
shows the exception (I see it before too in variable Exception ex with mousover:COMPlusExceptionCode -532459699) with a messagebox:
"procedure not found:"GdPicture.GdPictureStatus GdPicture.GdPictureImaging.Rotate(Int32, GdPicture.RotateFlipType)". OK"

I see in the metadata "public GdPictureStatus Rotate(int ImageID, RotateFlipType Rotation);"
and so I think this is a part of your internal code.

Is this right?
Do you have an idea?
What can do to solve the problem?
(the scanner can be various to get the same error)

User avatar
Loïc
Site Admin
Posts: 5881
Joined: Tue Oct 17, 2006 10:48 pm
Location: France
Contact:

Re: Exception after changing from version

Post by Loïc » Fri Dec 11, 2009 2:14 pm

Hi,

Please, write us a code snippet which reproduce the problem. We need code which we will be available to run "as is".

Kind regards,

Loïc

iirusger
Posts: 12
Joined: Mon Jan 05, 2009 1:37 pm

Re: Exception after changing from version

Post by iirusger » Fri Dec 11, 2009 6:20 pm

... in shortly extracted snippets I didn't see the problem ...
but from version without errors to this with the exception I only changed the GdPicture version.

there are 2 ways I think
1. I try to solve the problem step by step for myself ( first I try if other computers brings the errror too ...)
2. I send you my project with the source code for .Net visual studio 2008 and the executable files
to try if it bring at your computer the same result ( it this possible? send me a info to roth@orgAnice.de )

regards
iirusger

User avatar
Loïc
Site Admin
Posts: 5881
Joined: Tue Oct 17, 2006 10:48 pm
Location: France
Contact:

Re: Exception after changing from version

Post by Loïc » Fri Dec 11, 2009 6:32 pm

Hi,

Keep in mind that we can't debug your entire application. We don't have enough time for this.

You have to isolate the problem and send us correct description in order to be able to reproduce your error.

Thank you for your comprehension.

Kind regards,

Loïc

iirusger
Posts: 12
Joined: Mon Jan 05, 2009 1:37 pm

Re: Exception after changing from version 6.4 to 6.5

Post by iirusger » Thu Dec 31, 2009 12:32 pm

Hi, I'm back, but didn't solve the problem.

I trie to update an other module to version 6.5.
After this comes an other error message, but it seem to be the same problem:

Beim Scanprozess ist der Fehler Nr. -2146233054 aufgetreten.Der Typ "GdPicture.RotateFlipType" in der Assembly "GdPicture.NET, Version=6.5.0.1, Culture=neutral, PublicKeyToken=3058ead3ae55af17" konnte nicht geladen werden.

1. After changing the version from 6.4 to 6.5 I have to solve the conflict that the RotateFlipType in version 6.4 was a type of System.drawing. and now it have to be a type of GdPicture.

2. if I register the version 6.5.0.1 with your _Register for COM.bat there are the following text written:
=========================

Code: Select all

Types registered successfully
The Typbibliothekexporter has when processing "GdPicture.GdPictureImaging + _GdPictureImaging.PrintSetDuplexMode (duplex mode), GdPicture.NET" found a minor error. Warning: In the not visible to COM value type "System.Drawing.Printing.Duplex" referenced by the exported type or one of the basic types.
The Typbibliothekexporter found during the processing of "GdPicture.GdPictureImaging + _GdPictureImaging.PrintGetDuplexMode (# 0), GdPicture.NET" a minor mistake. Warning: In the not visible to COM value type "System.Drawing.Printing.Duplex" referenced by the exported type or one of the basic types.
The Typbibliothekexporter found during the processing of "GdPicture.GdViewer + _GdViewer.set_BackgroundImageLayout (value), GdPicture.NET" a minor mistake. Warning: In the not visible to COM value type "System.Windows.Forms.ImageLayout" referenced by the exported type or one of the basic types.
The Typbibliothekexporter found during the processing of "GdPicture.GdViewer + _GdViewer.get_BackgroundImageLayout (# 0), GdPicture.NET" a minor mistake. Warning: In the not visible to COM value type "System.Windows.Forms.ImageLayout" referenced by the exported type or one of the basic types.
The Typbibliothekexporter has when processing "GdPicture.GdViewer + _GdViewer.PrintSetDuplexMode (duplex mode), GdPicture.NET" found a minor error. Warning: In the not visible to COM value type "System.Drawing.Printing.Duplex" referenced by the exported type or one of the basic types.
The Typbibliothekexporter found during the processing of "GdPicture.GdViewer + _GdViewer.PrintGetDuplexMode (# 0), GdPicture.NET" a minor mistake. Warning: In the not visible to COM value type "System.Drawing.Printing.Duplex" referenced by the exported type or one of the basic types.
Assembly exported to 'C: \ OS_Checkout \ OSSCN_DirektScan \ trunk \ source \ solution \ externals \ GdPicture \ COM Interop \ GdPicture.NET.tlb', and the type library was registered successfully
=======================================
You can see there is an error in relation of the System.Drawing. object too !

If I debug I see the exceptioncode COMPlusExceptionCode -532459699 after the twainscanning, but the resultcode is OK
The exception is calling the Messagebox after the program is leave the actual procedure to a procedure with the rotation code.
If I deactivate this code the program continue the run, but freeze the app-window, if it have to go back to the main application.

So I Think there is a Bug in the COM-Interface or internal handling.

I try on to create a short example that crashes too.
But I think it woud be next year ;-)

Happy and successful new year to you

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest