View Issue Details

IDProjectCategoryView StatusLast Update
0001693JEDI VCL00 JVCL Componentspublic2004-08-03 07:22
ReporteranonymousAssigned Toobones 
PrioritynormalSeveritymajorReproducibilityalways
Status resolvedResolutionfixed 
Product Version 
Target VersionFixed in Version 
Summary0001693: JvInterpreterFm -- "Privileged Instruction" error while executing form.pas sample in JvInterpreterTest example program
DescriptionRun JvInterpreterTest.EXE example program. Select "sample - form.pas" example. Click "Run" button. Then click "Hello" button in the modal form. You will got an error message "Privileged Instruction".
Additional InformationCompiler: Delphi 5 under W2K Sp1.
This error caused by ReadProps procedure (started at line 234 in JvInterpreterFm.pas). This procedure is changed in the last version of JvInterpreterFm.pas:
Line 254: Method.Data = Com in the new version, was Method.Data = Self
Line 261: PChar(FMethodList[F]), PropList^[I]^.PropType^.Name, Com, PropList^[I]^.Name))); was
PChar(FMethodList[F]), PropList^[I]^.PropType^.Name, Self, PropList^[I]^.Name)));

After replacing "Com" variable by "Self" (as it was in the previous version) this error disapperes.
TagsNo tags attached.

Activities

AlexeiR

2004-04-26 02:27

reporter   ~0004074

I'm using Delphi7.
The same bug occured in my application and JvInterpreterTest.
Replacing "Self" variable by "Com" will cause even more bugs.
See my bug report 0001608.

user72

2004-04-26 05:24

  ~0004076

Last edited: 2004-04-26 05:25

So it seems there is a mixup between "Com" and "Self" at play here. Can you come up with a usable solution? We can't keep changing Com and Self back and forth so a persistent solution must be found

edited on: 04-26-04 05:25

AlexeiR

2004-04-26 07:17

reporter   ~0004081

Sorry, I meant "Com by Self" in my bugnote.
But the intepreter doesn't work in any of those cases.
May be the bug is in other place?
I've reverted interpereter units to a shapshot dated 2004-03-04 (March),
and all my problems disappeared.

user72

2004-04-26 08:45

  ~0004082

Last edited: 2004-04-27 01:05

The difference between the march 3rd version and the current version is the use of Self and Com. Maybe the bugfix for 0001608 is incorrect, maybe it should be like this (as it was before):

         if Method.Data = Self then
         begin
            F := FMethodList.IndexOf(Method.Code);
            FMethodList.IndexOf(Method.Code);
            if F > -1 then
            begin
              SetMethodProp(Com, PropList^[I],
                TMethod(FJvInterpreterFm.NewEvent
                PChar(FMethodList[F]), PropList^[I]^.PropType^.Name,
                   Self)));
            end;
        end;

edited on: 04-27-04 01:05

anonymous

2004-04-28 01:56

viewer   ~0004097

This error does not appear with 1.15 version of JvInterpreterFm.pas Delphi 5, W2K Sp1). The only difference between current (1.16) and previous (1.15) version is in line 254:
(V. 1.16) if Method.Data = Com then
(V. 1.15) if Method.Data = Self then

In version 1.16 code block beneath line 254 will never be executed (at least in JvInterpreterTest.dpr example) so event will never be 'fixed up'.

anonymous

2004-04-28 03:46

viewer   ~0004098

Last edited: 2004-04-28 03:49

It seems to me that version 1.12 of JvInterpreterFm.pas was the most correct.
Line 255 has been changed in version 1.13: "Self" commented out and replaced by "Com".
I can't understand, why this "fix" was apllied.
Fixes in version 1.13 caused accessing form's components to fail.
Fixes in version 1.16 caused event calls to fail.

edited on: 04-28-04 03:48

edited on: 04-28-04 03:49

maxp

2004-04-28 06:58

reporter   ~0004106

The key difference between 1.12 and 1.16 is in lines 254 and 261 (Ver. 1.16 line numbers): in both lines Com (v.1.16) should be replaced by Self, as it was in V.1.12.

user72

2004-04-28 07:21

  ~0004108

You mean like this?

procedure TJvInterpreterForm.FixupMethods;
...

          if Method.Data = Self then
          begin
            F := FMethodList.IndexOf(Method.Code);
            if F > -1 then
            begin
              SetMethodProp(Com, PropList^[I],
                TMethod(FJvInterpreterFm.NewEvent(FUnitName,
                PChar(FMethodList[F]), PropList^[I]^.PropType^.Name, Self,PropList^[I]^.Name)));
            end;
          end;

maxp

2004-04-28 07:33

reporter   ~0004109

Yes, it is.

user72

2004-04-28 07:50

  ~0004111

OK, then. I'll commit it and then we'll see if other problems crop up :)

obones

2004-08-03 07:22

administrator   ~0004884

This bug has not had any activity for more than a month, it is therefore considered fixed.
To the original poster: If you think the issue is still there, even after having tested with the JVCL3, please create a new bug report.

Issue History

Date Modified Username Field Change
2004-04-24 11:19 anonymous New Issue
2004-04-26 02:27 AlexeiR Note Added: 0004074
2004-04-26 05:24 user72 Note Added: 0004076
2004-04-26 05:25 user72 Status new => feedback
2004-04-26 05:25 user72 Note Edited: 0004076
2004-04-26 07:17 AlexeiR Note Added: 0004081
2004-04-26 08:45 user72 Note Added: 0004082
2004-04-27 01:05 user72 Note Edited: 0004082
2004-04-28 01:56 anonymous Note Added: 0004097
2004-04-28 03:46 anonymous Note Added: 0004098
2004-04-28 03:48 anonymous Note Edited: 0004098
2004-04-28 03:49 anonymous Note Edited: 0004098
2004-04-28 06:58 maxp Note Added: 0004106
2004-04-28 07:21 user72 Note Added: 0004108
2004-04-28 07:33 maxp Note Added: 0004109
2004-04-28 07:50 user72 Note Added: 0004111
2004-08-03 07:22 obones Status feedback => resolved
2004-08-03 07:22 obones Resolution open => fixed
2004-08-03 07:22 obones Assigned To => obones
2004-08-03 07:22 obones Note Added: 0004884