From: Borislav I. <bor...@ko...> - 2005-12-10 06:15:43
|
Hi Tim, After a few evenings of struggle, I think I found where the problem comes from. I was thrown off by the fact that the same application works, successfully deployed for over 2 years now. Here is the issue: the null/empty pair in Jscheme is represented by the static final Pair.EMPTY which has both first and rest assigned to itself. The method 'isEmpty' simply compares 'this == Pair.EMPTY' instead of 'this == first == rest" (doesn't look like it's possible in Jscheme to construct such a pair). Now, the problem is when I serializes a Pair into a DB blob and then deserialize it. The deserialized object looks exactly like Pair.EMPTY, but it's not one and the same Java reference. So, I found out that previous version of Jscheme had a Pair.readResolve method that specifically dealed with the empty pair. Is there any particular reason why this method was removed from later versions? Thanks, Boris | -----Original Message----- | From: Timothy J Hickey [mailto:tjh...@br...] | Sent: Wednesday, December 07, 2005 7:10 AM | To: Borislav Iordanov | Subject: Re: [Jscheme-user] Help interpreting a stack trace | | | Hi Boris, | | It looks like the stack overflow occurs inside the | iterate call, but its hard to tell. If you send me the source | code I might be able to help you find it.... Typically this | will happen with a non-tail-call recursion as the Java stack | is not very deep... | | Best, | ---Tim--- | | On Dec 7, 2005, at 12:14 AM, Borislav Iordanov wrote: | | > Hello, | > | > I'm trying to track down a stack overflow in a Jscheme code I wrote | > some | > time ago. Can anyone help me with the meaning of the following stack | > trace: | > | > (heat-it image-graphics (get-polygons-for-coordinate (.get | radials i | > )(.get stages j ))(get-signal-for-region i j insitu-result | )max-signal | > ) | > j = 3 | > stages = [Stage 4, Stage 3, Stage 2, Stage 1] | > applicable = [Stage 1] | > stage-loop = {jsint.Closure ??[3] (j stages applicable)} | > i = 0 | > radials = [Columella, Cortex, Endo, Endo+Cortex, | > Epidermis(atrichoblasts), Lat.root cap, Pericycle, Phloem, St... | > radial-loop = {jsint.Closure ??[2] (i radials)} | > max-signal = 527.924F | > image-graphics = | > | sun.java2d.SunGraphics2D[font=java.awt.Font[family=Dialog,name | =Dialog,s | > t | > yle=plain,size=12],color=jav... | > image-encoder = sun.awt.image.codec.JPEGImageEncoderImpl@39452f | > insitu-result = | org.pamweb.ui.ticl.model.MySQLTableModel$Row@1ed13da | > session = | org.apache.catalina.session.StandardSessionFacade@1b25a82 | > request = org.apache.coyote.tomcat4.CoyoteRequestFacade@541b02 | > out = org.apache.coyote.tomcat4.CoyoteOutputStream@1b94ea2 | > | > ==================================== | > | > (iterate radial-polygons {jsint.Closure ??[1] | (radial-point-list)} ) | > Error in BacktraceException.printStackTrace: | > java.lang.StackOverflowError | > Error in BacktraceException.printStackTrace: | > java.lang.StackOverflowError | > Error in BacktraceException.printStackTrace: | > java.lang.StackOverflowError | > | > Specifically, should I assume that the stack overflow | occurs somewhere | > with the (iterate radial-polygons ...) call? | > | > Thanks, | > Boris | > | > | > | > ------------------------------------------------------- | > This SF.net email is sponsored by: Splunk Inc. Do you grep | through log | > files | > for problems? Stop! Download the new AJAX search engine that makes | > searching your log files as easy as surfing the web. | DOWNLOAD SPLUNK! | > http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click | > _______________________________________________ | > Jscheme-user mailing list | > Jsc...@li... | > https://lists.sourceforge.net/lists/listinfo/jscheme-user | |