Nigel,
This is a strange bug, but it definitely exists, at least here and on another users system. Another user who uses an older version of ImageEn reported he got an exception when pasting an object to me. When I followed up here I got the exception as well.
I tested Win32 or Win64 and both produce the exception. When the exception occurs there is an vectorial object in the clipboard because that is what copied immediately before the paste.
A test with a very simple demo does not produce the exception, but paste does not work at all... meaning no object is visible after the paste.
A MadExcept error log shows that when the exception occurs the line that causes the exception is TImageEnVect.ObjPasteFromClipboard.
Delphi XE4
Windows 8.1
ImageEn 5.0.5
To test this further I made a very simple demo. With the simple demo I do not get an exception when pasting, but if an object is selected before pasting, the object is not pasted (is not visible) and there are no error messages or exceptions. If I unselect all objects before the call to paste, then everything works as expected.
unit Unit1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, ExtCtrls,
imageenview, ieview, ievect;
type
TForm1 = class(TForm)
Panel1: TPanel;
ImageEnVect1: TImageEnVect;
Button1: TButton;
Button2: TButton;
Button3: TButton;
Button4: TButton;
CheckBox1: TCheckBox;
procedure Button1Click(Sender: TObject);
procedure Button2Click(Sender: TObject);
procedure Button3Click(Sender: TObject);
procedure Button4Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
implementation
{$R *.dfm}
procedure TForm1.Button1Click(Sender: TObject);
begin
ImageEnVect1.ObjKind[IEV_NEXT_INSERTED_OBJECT] := iekBOX;
ImageEnVect1.SetObjRect(IEV_NEXT_INSERTED_OBJECT, Rect(10, 10, 100, 100));
ImageEnVect1.ObjPenColor[IEV_NEXT_INSERTED_OBJECT] := clRed;
ImageEnVect1.ObjBrushColor[IEV_NEXT_INSERTED_OBJECT] := clRed;
ImageEnVect1.ObjBrushStyle[IEV_NEXT_INSERTED_OBJECT] := bsSolid;
ImageEnVect1.AddNewObject;
end;
procedure TForm1.Button2Click(Sender: TObject);
begin
ImageEnVect1.ObjCopyToClipboard;
end;
procedure TForm1.Button3Click(Sender: TObject);
begin
if CheckBox1.Checked then
ImageEnVect1.UnSelAllObjects;
ImageEnVect1.ObjPasteFromClipboard(0,0);
end;
procedure TForm1.Button4Click(Sender: TObject);
begin
ImageEnVect1.MouseInteractVt := [miObjectSelect];
end;
end.
I do not know what is wrong but something is for sure. A MadExcept error log for the demos that produce the exception is shown below.
date/time : 2014-02-07, 08:38:20, 653ms
computer name : DEVELOP
user name : w2miller
registered owner : Windows User
operating system : Windows 8 Tablet PC x64 build 9200
system language : English
system up time : 39 minutes 33 seconds
program up time : 17 seconds
processors : 8x Intel(R) Core(TM) i7-4770 CPU @ 3.40GHz
physical memory : 20079/24526 MB (free/total)
free disk space : (C:) 144.13 GB (D:) 1829.88 GB
display mode : 1920x1080, 32 bit
process id : $1e54
allocated memory : 80.92 MB
executable : ImageEnVectorial.exe
exec. date/time : 2014-02-07 08:30
version : 1.0.0.0
compiled with : Delphi XE4
madExcept version : 4.0.7
contact name : w2m
contact email : w2m@frontiernet.net
callstack crc : $a594c2ae, $98db443e, $98db443e
exception number : 1
exception class : EOutOfMemory
exception message : Out of memory.
main thread ($228c):
00990609 +2b9 ImageEnVectorial.exe ievect 8896 +69 TImageEnVect.ReadObj
00996754 +100 ImageEnVectorial.exe ievect 11673 +24 TImageEnVect.ObjPasteFromClipboard
009dd268 +044 ImageEnVectorial.exe Unit1 7830 +2 TForm1.ObjPaste1Click
0066c9f6 +0aa ImageEnVectorial.exe Vcl.Menus 2523 +19 TMenuItem.Click
0066e03f +013 ImageEnVectorial.exe Vcl.Menus 3436 +5 TMenu.DispatchCommand
00680387 +01f ImageEnVectorial.exe Vcl.Forms 6153 +2 TCustomForm.WMCommand
0059da29 +2bd ImageEnVectorial.exe Vcl.Controls 7224 +91 TControl.WndProc
005a24e5 +5c5 ImageEnVectorial.exe Vcl.Controls 10039 +153 TWinControl.WndProc
0067d1ad +60d ImageEnVectorial.exe Vcl.Forms 4388 +201 TCustomForm.WndProc
005a1b28 +02c ImageEnVectorial.exe Vcl.Controls 9751 +3 TWinControl.MainWndProc
0053c164 +014 ImageEnVectorial.exe System.Classes 16860 +8 StdWndProc
76839c3b +00b user32.dll DispatchMessageW
0068683b +0f3 ImageEnVectorial.exe Vcl.Forms 10288 +23 TApplication.ProcessMessage
0068687e +00a ImageEnVectorial.exe Vcl.Forms 10318 +1 TApplication.HandleMessage
00686bb9 +0c9 ImageEnVectorial.exe Vcl.Forms 10456 +26 TApplication.Run
009e99f8 +064 ImageEnVectorial.exe ImageEnVectorial 22 +5 initialization
7757495b +00c KERNEL32.DLL BaseThreadInitThunk
thread $1e40:
7757495b +c KERNEL32.DLL BaseThreadInitThunk
thread $274c:
7757495b +c KERNEL32.DLL BaseThreadInitThunk
William Miller
Adirondack Software & Graphics
Email: w2m@frontiernet.net
EBook: http://www.imageen.com/ebook/
Apprehend: http://www.frontiernet.net/~w2m/index.html