bug-3dldf
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug-3dldf] Run errors


From: Laurence Finston
Subject: [bug-3dldf] Run errors
Date: Fri, 27 Aug 2004 01:31:25 +0200
User-agent: IMHO/0.98.3+G (Webmail for Roxen)

Hi Glen,

See comments below.

> -------
> %% abc.ldf
> 
>     beginfig(1);
> 
>     point a[];
> 
>     a21 := (21,21,21);
>     a11 := (11, 11, 11);
>     a41 := (41, 41, 41);
> 
>     a1 := (1,1,1);
> 
>     show a1;
>     show a11;
>     show a21;
>     show a41;
> 
>     endfig;
>     end;
> 
> 
> **************************
> 
> (gdb) run --multithread-input --multithread-output 
> abc.ldf
> 
> *** Parser: declaration --> picture_declaration.

There is no picture declaration in the `abc.ldf' you list above.  
Are you sure that's your input file?

> [Thread 2] *** Parser: variable --> tag suffix:
> sb.first == p-.

There's no `p[]' variable, either.

> 
> *** Parser: numeric_token (INTEGER).
> $$ == 15
> 

No 15, either.

> *** Parser: point_primary --> numeric_vector.
> p: (15, 20, 30)
> 

The file above isn't the input file.

> *** Parser: numeric_atom (numeriIn `main()': After

The line above shows some non-thread-safe debugging output.

> `pthread_create()':
> status == 0
> c_token_atom).
> $$ == 21

> [New Thread 1080322992 (zombie)]

This is a thread that's spawned for outputting a `picture'.

> 
> *** Parser: command --> output_command.
> [Thread 2] *** Parser: statement_list -->
> statement_list statement.
> 
> *** Parser: with_clause_output_list --> EMPTY.
> [Thread 2] *** Parser: endfig_command --> ENDFIG
> with_clause_output_list.
> 
> [New Thread 1082424240 (zombie)]
> 

This is for outputting `current_picture', which `endfig' does.

> *** Parser: command --> endfig_command.

> [Thread 2] *** Parser: `program --> statement_list
> END'.
>    `yyparse()' returning 0.
> ERROR! In `Mutex_Type::~Mutex_Type(void)':
> `pthread_mutex_destroy()' failed.
> `status' == `EBUSY' (mutex is in use).

This is strange because `~Mutex_Type()' first tries to lock the mutex and then
unlock it before destroying it.  If it fails, it issues error 
messages, which aren't in your transcript.  

Please do the following:

1.  Use this as your input:

beginfig(1);
point p[];
p0 := (10, 11, 12);
p1 := (14, 15, 16);
draw p0 .. p1;
endfig;

2. Don't use gdb.

3. Turn debugging output on in `~Mutex_Type()'.

3. Let me know whether `<filename>.mp' is generated properly and contains a
`draw' command, and whether the same error with 
`pthread_mutex_destroy()' occurs.  If it does, turn debugging output on in
`Scan_Parse::output_func()' and Scan_Parse::output_command_func()', run 
the program again, and send me a transcript of the terminal output.

Thanks.

I think it would be a good idea if you would try to relate the debugging
output with the code in your file.  This way, you can get an idea of what the
parser is doing.  Just input this, for example: 

point p;

and then

point p;
p := 1;

and build up gradually.
Then you can start looking at the actions for those parser rules, and work
your way into reading the code that way.  I think that might be a realistic
way of learning it.

Laurence

%% Local Variables:
%% mode:auto-fill
%% fill-column:59
%% End:



reply via email to

[Prev in Thread] Current Thread [Next in Thread]