[bug] Inspect often fails

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

[bug] Inspect often fails

Stephen-71
Issue status update for
http://smalltalk.gnu.org/node/279
Post a follow up:
http://smalltalk.gnu.org/project/comments/add/279

 Project:      GNU Smalltalk
 Version:      <none>
 Component:    Base classes
 Category:     bug reports
 Priority:     normal
 Assigned to:  Unassigned
 Reported by:  swoolerton
 Updated by:   swoolerton
 Status:       active

For example...   myVar inspect.

- Calling inspect from a system without gst-blox doesn't always work.
Sometimes it stack dumps.
- Calling inspect from a system with gst-blox will try to open a
graphical "inspect" window. Sometimes this window shows in the
operating system but no output appears in it and then after about 30
secs it disappears. Sometimes GST gets in a loop generating inspect
windows.

System documentation is...
inspect
  Print all the instance variables of the receiver on the Transcript
This doesn't imply that an X Window will get opened.

The "inspect" method is useful for debugging and when using a class
that someone else has written to see what objects it returns. Please
remove the "Windowing link" so that if a script is _not_ running inside
gst-blox, then GST will dump output to Transcript and not try to open an
XWindow.




_______________________________________________
help-smalltalk mailing list
[hidden email]
http://lists.gnu.org/mailman/listinfo/help-smalltalk
Reply | Threaded
Open this post in threaded view
|

Re: [bug] Inspect often fails

Paolo Bonzini-3
Issue status update for
http://smalltalk.gnu.org/project/issue/279
Post a follow up:
http://smalltalk.gnu.org/project/comments/add/279

 Project:      GNU Smalltalk
 Version:      <none>
 Component:    Base classes
 Category:     bug reports
 Priority:     normal
 Assigned to:  Unassigned
 Reported by:  swoolerton
 Updated by:   bonzinip
 Status:       active

Can you provide a simple way to reproduce this?

Thanks!




_______________________________________________
help-smalltalk mailing list
[hidden email]
http://lists.gnu.org/mailman/listinfo/help-smalltalk
Reply | Threaded
Open this post in threaded view
|

Re: Re: [bug] Inspect often fails

Stephen-71
>
> Can you provide a simple way to reproduce this?
>
Centos 5.2 64 bit gst 3.1.

There are issues with the inspect method and the class method. I'll send
you screenshots off-list for the "inspect" method issue. Essentially it
brings up a blank gst-blox window whether inspect is called from
interpreter or from a script. The terminal windows has to be closed to
remove the blank Inspect window.


Secondly the class method issue.
First of all, check with the interpreter and it is fine

$ gst
GNU Smalltalk ready

st> j := 3.
3
st> j class.
SmallInteger
st>



And now running a script...
$ cat displayclass.st
j := 3.
Transcript showCr: 'before'.
Transcript showCr: j class.
Transcript showCr: 'after'.


$ gst displayclass.st
before
Object: SmallIntegerObject: SmallIntegerObject: Semaphore new
"<0x2b69f6c7bd40>"Object: Semaphore new "<0x2b69f6c7bd40>"Object:
Semaphore new "<0x2b69f6c7bd40>"Object: Semaphore new "<0x2b69f6c7bd40>"

Note: the script hangs after printing 'Object: SmallInteger', so then I
push <ctrl><C>, at which point it prints 'Object: SmallInteger' again.
 From then on pressing <Ctrl><C> prints out ...Object: Semaphore new
"<0x2b69f6c7bd40>" . The terminal window has to be closed.


Note: It seems that these issues only occur on a Centos system with a
working X Windows and gst-blox. If the system doesn't have X Windows and
working gst-blox, then the 'class' and the 'inspect' method work.


_______________________________________________
help-smalltalk mailing list
[hidden email]
http://lists.gnu.org/mailman/listinfo/help-smalltalk
Reply | Threaded
Open this post in threaded view
|

Re: Re: [bug] Inspect often fails

Paolo Bonzini-2
Ah, I see.  The problem is with an image that includes Blox.

Regarding this:

> Note: the script hangs after printing 'Object: SmallInteger', so then I
> push <ctrl><C>, at which point it prints 'Object: SmallInteger' again.
> From then on pressing <Ctrl><C> prints out ...Object: Semaphore new
> "<0x2b69f6c7bd40>" . The terminal window has to be closed.

What with the patch I attached to the other issue?

Paolo


_______________________________________________
help-smalltalk mailing list
[hidden email]
http://lists.gnu.org/mailman/listinfo/help-smalltalk
Reply | Threaded
Open this post in threaded view
|

Re: Re: [bug] Inspect often fails

Stephen Woolerton

> What with the patch I attached to the other issue?
>
> Paolo
>
>  
Have I missed something?

The gst installation is in /usr/local and so I edited
/usr/local/share/smalltalk/kernel/Transcript.st. At line 192, it looks
like this now...
    initialize [
        "Private - Initialize the receiver's instance variables"

        <category: 'private'>
        "semaphore := Semaphore forMutualExclusion"
        semaphore := RecursionLock new
    ]
]


When I run gst now, I get
$ gst
nil did not understand selector #new

(ip 4)TextCollector>>#initialize
(ip 8)TextCollector class>>#message:
(ip 14)UndefinedObject>>#executeStatements
(ip 0)<bottom>
nil

/usr/local/share/smalltalk/kernel/Transcript.st:206: Aborted
(ip 4)TextCollector>>#initialize
(ip 8)TextCollector class>>#message:
(ip 14)UndefinedObject>>#executeStatements
(ip 0)<bottom>
Aborted



_______________________________________________
help-smalltalk mailing list
[hidden email]
http://lists.gnu.org/mailman/listinfo/help-smalltalk
Reply | Threaded
Open this post in threaded view
|

Re: Re: [bug] Inspect often fails

Paolo Bonzini-2
I forgot a hunk:

diff --git a/libgst/files.c b/libgst/files.c
index d6376d5..1d2ec48 100644
--- a/libgst/files.c
+++ b/libgst/files.c
@@ -248,8 +248,8 @@ static const char standard_files[] = {

   /* More core classes */
   "Random.st\0"
-  "Transcript.st\0"
   "RecursionLock.st\0"
+  "Transcript.st\0"
   "Point.st\0"
   "Rectangle.st\0"
   "RunArray.st\0"

Paolo


_______________________________________________
help-smalltalk mailing list
[hidden email]
http://lists.gnu.org/mailman/listinfo/help-smalltalk
Reply | Threaded
Open this post in threaded view
|

Re: Re: [bug] Inspect often fails

Stephen Woolerton

Paolo Bonzini wrote:
> I forgot a hunk:
>
>
>  
That made a difference :-)

I've recompiled and here is the result... (gst isn't trying to open Blox
windows now on the code below, which is good)

$ cat displayclass.st

j := 3.
Transcript showCr: 'before'.
Transcript showCr: j class.
Transcript showCr: 'after'.

$ gst displayclass.st
before
Object: SmallInteger error: did not understand #nextPutAllOn:
MessageNotUnderstood(Exception)>>signal (AnsiExcept.st:216)
SmallInteger class(Object)>>doesNotUnderstand: #nextPutAllOn:
(AnsiExcept.st:1556)
FileStream(Stream)>>nextPutAll: (Stream.st:305)
FileStream(Stream)>>nextPutAllFlush: (Stream.st:297)
[] in TextCollector>>primNextPutAll: (Transcript.st:188)
BlockClosure>>on:do: (BlkClosure.st:192)
TextCollector>>primNextPutAll: (Transcript.st:189)
[] in TextCollector>>showCr: (Transcript.st:134)
[] in RecursionLock>>critical: (RecursionLock.st:106)
BlockClosure>>ensure: (BlkClosure.st:269)
[] in RecursionLock>>critical: (RecursionLock.st:107)
[] in Semaphore>>critical: (Semaphore.st:82)
BlockClosure>>ensure: (BlkClosure.st:269)
Semaphore>>critical: (Semaphore.st:83)
RecursionLock>>critical: (RecursionLock.st:104)
TextCollector>>showCr: (Transcript.st:133)
UndefinedObject>>executeStatements (displayclass.st:4)
after
$
$
$
$
$ vi displayclass.st
$ cat displayclass.st

j := 3.
Transcript showCr: 'before'.
Transcript showCr: j inspect.
Transcript showCr: 'after'.

$ gst displayclass.st
before
An instance of SmallInteger
Object: 3 error: did not understand #nextPutAllOn:
MessageNotUnderstood(Exception)>>signal (AnsiExcept.st:216)
SmallInteger(Object)>>doesNotUnderstand: #nextPutAllOn: (AnsiExcept.st:1556)
FileStream(Stream)>>nextPutAll: (Stream.st:305)
FileStream(Stream)>>nextPutAllFlush: (Stream.st:297)
[] in TextCollector>>primNextPutAll: (Transcript.st:188)
BlockClosure>>on:do: (BlkClosure.st:192)
TextCollector>>primNextPutAll: (Transcript.st:189)
[] in TextCollector>>showCr: (Transcript.st:134)
[] in RecursionLock>>critical: (RecursionLock.st:106)
BlockClosure>>ensure: (BlkClosure.st:269)
[] in RecursionLock>>critical: (RecursionLock.st:107)
[] in Semaphore>>critical: (Semaphore.st:82)
BlockClosure>>ensure: (BlkClosure.st:269)
Semaphore>>critical: (Semaphore.st:83)
RecursionLock>>critical: (RecursionLock.st:104)
TextCollector>>showCr: (Transcript.st:133)
UndefinedObject>>executeStatements (displayclass.st:4)
after


_______________________________________________
help-smalltalk mailing list
[hidden email]
http://lists.gnu.org/mailman/listinfo/help-smalltalk
Reply | Threaded
Open this post in threaded view
|

Re: [bug] Inspect often fails

Paolo Bonzini-3
In reply to this post by Stephen-71
Issue status update for
http://smalltalk.gnu.org/project/issue/279
Post a follow up:
http://smalltalk.gnu.org/project/comments/add/279

 Project:      GNU Smalltalk
 Version:      <none>
 Component:    Base classes
 Category:     bug reports
 Priority:     normal
 Assigned to:  Unassigned
 Reported by:  swoolerton
 Updated by:   bonzinip
-Status:       active
+Status:       duplicate

the root problem was the last one (deadlock if the transcript raises an
exception), which I had split out to issue 283.




_______________________________________________
help-smalltalk mailing list
[hidden email]
http://lists.gnu.org/mailman/listinfo/help-smalltalk