help 
Author Message
 help

Hi all,

I'm getting this console error when I try to run my Dylan console app:

attempt to call subclass? on an incompletely initialized class
"<sorted-sequence>"

Also the GPF dialog box pops up with:

CH16 caused an exception 03H in module D2DYLAN.DLL at 015f:66e4ed31.
Registers:
EAX=c0030300 CS=015f EIP=66e4ed31 EFLGS=00000206
EBX=00000001 SS=0167 ESP=0253fa98 EBP=0253faa8
ECX=00000000 DS=0167 ESI=1efc09b0 FS=57b7
EDX=1efc09ac ES=0167 EDI=0253faa4 GS=0000
Bytes at CS:EIP:
58 c9 c2 04 00 83 3d a0 27 ee 66 00 74 06 b8 3c
Stack dump:
66edcbe4 00000001 00402224 66edcbe4 0253fabc 66e0638d 1efc09a4 66edcbe4
1efc4d00 0253fae0 66e0c6d0 66ee4cc4 1efc0964 66efc12c 1efc085c 66efc12c

which looks like a bug in Harlequin Dylan to me.

And all of this is happenning only when my <sorted-sequence> class
is in it's own, separate module. When everything is in one module I
don't have any problems. Here is the code:

Module:    dylan-user

define module ch16
  use byte-vector;
  use finalization;
  use harlequin-dylan;
  use machine-word;
  use simple-random;
  use transcendentals;
  use format;
  use format-out;
  use print;
  use standard-io;
  use streams;
  use date;
  use file-system;
  use operating-system;

  use sorted-sequence ;

  // Add binding exports here.

end module ch16;

Module: dylan-user

define module  sorted-sequence

  use byte-vector;
  use finalization;
  use harlequin-dylan;
  use machine-word;
  use simple-random;
  use transcendentals;
  use format;
  use format-out;
  use print;
  use standard-io;
  use streams;
  use date;
  use file-system;
  use operating-system;

  export <sorted-sequence> ;
end ;

Module: sorted-sequence

define class  <sorted-sequence> ( <sequence> )

   slot  data :: <stretchy-vector> = make( <stretchy-vector>, size: 0 )
;

   constant slot  value-func :: <function> = identity, init-keyword:
value-func: ;

   constant slot  comparison-func :: <function> = \<, init-keyword:
comparison-func: ;
end ;

define method  size( sequence-arg :: <sorted-sequence> )
   => ( sequence-size :: <integer> )

   sequence-arg.data.size ;
end ;

Module:    ch16
define method main () => ()

   let  s1 :: <sorted-sequence> = make( <sorted-sequence>, size: 23 ) ;

   format-out( "s1.size=%d\n", s1.size ) ;

end method main;

begin
  main();
end;

Module:    dylan-user

define library ch16
  use harlequin-dylan;
  use io;
  use system;

  // Add any more module exports here.
  export ch16;
  export sorted-sequence ;
end library ch16;

Thanks for any help,
    Dragan

-------------------------------------------------------------------
Dragan Nedeljkovic                   ClearNet Inc.



Tue, 11 Sep 2001 03:00:00 GMT  
 help

Hi Dragan,

Quote:
> I'm getting this console error when I try to run my Dylan console app:

> attempt to call subclass? on an incompletely initialized class
> "<sorted-sequence>"

> Also the GPF dialog box pops up with:

> CH16 caused an exception 03H in module D2DYLAN.DLL at 015f:66e4ed31.
> Registers:
> EAX=c0030300 CS=015f EIP=66e4ed31 EFLGS=00000206
> EBX=00000001 SS=0167 ESP=0253fa98 EBP=0253faa8
> ECX=00000000 DS=0167 ESI=1efc09b0 FS=57b7
> EDX=1efc09ac ES=0167 EDI=0253faa4 GS=0000
> Bytes at CS:EIP:
> 58 c9 c2 04 00 83 3d a0 27 ee 66 00 74 06 b8 3c
> Stack dump:
> 66edcbe4 00000001 00402224 66edcbe4 0253fabc 66e0638d 1efc09a4 66edcbe4
> 1efc4d00 0253fae0 66e0c6d0 66ee4cc4 1efc0964 66efc12c 1efc085c 66efc12c

> which looks like a bug in Harlequin Dylan to me.

To explain the dialog box first of all, by default if an error condition
goes unhandled in a Dylan console app run outside the development
environment, this dialog is deliberately provoked in order to give you
the chance to open a de{*filter*} on it. On the other hand, if the program
had been being run under the control of the Harlequin Dylan environment,
a de{*filter*} window should have come up automatically instead.

This is just the default behaviour, though. A block/exception or let
handler on <serious-condition> can be used in a program to catch
unexpected error conditions and deal with them in an application-
specific manner if you wish.

Quote:
> And all of this is happenning only when my <sorted-sequence> class
> is in it's own, separate module. When everything is in one module I
> don't have any problems. Here is the code:

> [...]

This seems to be a load order problem. If I make sure the file containing
the call to main appears after the file containing the definition of
<sorted-sequence> in the project, I see:

  s1.size = 0

and the program exits cleanly.

When you moved <sorted-sequence> to its own module, did you perhaps add
a new file to the end of the project (new files are inserted last by
default) and move the code there? If so, try using Move File Up and Move
File Down on the Project menu to place the file containing the call to
main last in the list, and rebuild your program.

File order can be significant because definitions and top level
initializations are elaborated in file order, and top-to-bottom within a
file. Attempting to call make on a class whose definition has not yet
been "run" will indeed cause the runtime to complain that the class is
incompletely initialized.

Hope this helps!

-- Keith



Tue, 11 Sep 2001 03:00:00 GMT  
 help

Quote:

> I'm getting this console error when I try to run my Dylan console app:

> attempt to call subclass? on an incompletely initialized class
> "<sorted-sequence>"

What order do you have your modules declared in your projcect? I
created a test project in HD 1.2 using a class <abc>:

define class <abc> (<object>)
    slot xyz = make(<stretchy-vector>);
end class <abc>;

This was declared in abc.dylan.

I used this in my test.dylan:

define method main () => ()
  // Your program starts here...
  let x = make(<abc>);
  format-out("%=\n", x);
end method main;

begin
  main();
end;

If the file abc.dylan appeared after test.dylan in the project list,
when running I got a similar error to you:

attempt to make an instance of an incompletely initialized class: "<abc>"

If I made sure abc.dylan was before test.dylan in the project list
then things compiled and ran fine.

Chris.



Tue, 11 Sep 2001 03:00:00 GMT  
 help
It was a load order problem.

   Thanks,
        Dragan

Quote:

> Hi Dragan,

> > I'm getting this console error when I try to run my Dylan console app:

> > attempt to call subclass? on an incompletely initialized class
> > "<sorted-sequence>"

> > Also the GPF dialog box pops up with:

> > CH16 caused an exception 03H in module D2DYLAN.DLL at 015f:66e4ed31.
> > Registers:
> > EAX=c0030300 CS=015f EIP=66e4ed31 EFLGS=00000206
> > EBX=00000001 SS=0167 ESP=0253fa98 EBP=0253faa8
> > ECX=00000000 DS=0167 ESI=1efc09b0 FS=57b7
> > EDX=1efc09ac ES=0167 EDI=0253faa4 GS=0000
> > Bytes at CS:EIP:
> > 58 c9 c2 04 00 83 3d a0 27 ee 66 00 74 06 b8 3c
> > Stack dump:
> > 66edcbe4 00000001 00402224 66edcbe4 0253fabc 66e0638d 1efc09a4 66edcbe4
> > 1efc4d00 0253fae0 66e0c6d0 66ee4cc4 1efc0964 66efc12c 1efc085c 66efc12c

> > which looks like a bug in Harlequin Dylan to me.

> To explain the dialog box first of all, by default if an error condition
> goes unhandled in a Dylan console app run outside the development
> environment, this dialog is deliberately provoked in order to give you
> the chance to open a de{*filter*} on it. On the other hand, if the program
> had been being run under the control of the Harlequin Dylan environment,
> a de{*filter*} window should have come up automatically instead.

> This is just the default behaviour, though. A block/exception or let
> handler on <serious-condition> can be used in a program to catch
> unexpected error conditions and deal with them in an application-
> specific manner if you wish.

> > And all of this is happenning only when my <sorted-sequence> class
> > is in it's own, separate module. When everything is in one module I
> > don't have any problems. Here is the code:

> > [...]

> This seems to be a load order problem. If I make sure the file containing
> the call to main appears after the file containing the definition of
> <sorted-sequence> in the project, I see:

>   s1.size = 0

> and the program exits cleanly.

> When you moved <sorted-sequence> to its own module, did you perhaps add
> a new file to the end of the project (new files are inserted last by
> default) and move the code there? If so, try using Move File Up and Move
> File Down on the Project menu to place the file containing the call to
> main last in the list, and rebuild your program.

> File order can be significant because definitions and top level
> initializations are elaborated in file order, and top-to-bottom within a
> file. Attempting to call make on a class whose definition has not yet
> been "run" will indeed cause the runtime to complain that the class is
> incompletely initialized.

> Hope this helps!

> -- Keith

--

-------------------------------------------------------------------
Dragan Nedeljkovic                   ClearNet Inc.



Tue, 11 Sep 2001 03:00:00 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. help! f90.help help help help

2. ***HELP***HELP***NEED INFORMATION***HELP***HELP

3. HELP HELP HELP HELP

4. HELP HELP HELP HELP

5. Ord Function HELP Please HELP HELP HELP

6. help help help help!!!!!!!!!!!

7. (HELP (HELP (HELP (HELP))))

8. HELP: HELP: HELP: HELP: Online-manual on Expect

9. Help Help Help

10. TopSpeed - ODBC 3.1???? HELP HELP HELP

11. HELP - HELP - HELP

12. HELP HELP HELP - round function error

 

 
Powered by phpBB® Forum Software