clojure.contrib.profile crashes

83 views
Skip to first unread message

Sunil S Nandihalli

unread,
Jul 21, 2011, 5:59:56 PM7/21/11
to clo...@googlegroups.com
Hello everybody,
 I have used the profiler successfully in the past. But some how it is repeatedly crashing with the following stack trace.

Value out of range for int: 17069635385                                                                                                                                            
  [Thrown class java.lang.IllegalArgumentException]                                                                                                                                
                                                                                                                                                                                   
Restarts:                                                                                                                                                                          
 0: [QUIT] Quit to the SLIME top level                                                                                                                                             
                                                                                                                                                                                   
Backtrace:                                                                                                                                                                         
  0: clojure.lang.RT.intCast(RT.java:950)                                                                                                                                          
  1: clojure.lang.RT.intCast(RT.java:922)                                                                                                                                          
  2: clojure.contrib.profile$summarize$fn__3252.invoke(profile.clj:88)                                                                                                             
  3: clojure.core$r.invoke(core.clj:799)                                                                                                                                           
  4: clojure.contrib.profile$summarize.invoke(profile.clj:85)                                                                                                                      
  5: bitvector.core$eval4530.invoke(NO_SOURCE_FILE:1)                                                                                                                              
  6: clojure.lang.Compiler.eval(Compiler.java:5424)                                                                                                                                
  7: clojure.lang.Compiler.eval(Compiler.java:5391)                                                                                                                                
  8: clojure.core$eval.invoke(core.clj:2382)                                                                                                                                       
  9: swank.core$eval650$fn__651.invoke(core.clj:409)                                                                                                                               
 10: clojure.lang.MultiFn.invoke(MultiFn.java:163)                                                                                                                                 
.
.
.
.

Before I bother you all with actual code which might get messy, does anybody have any suggestion as to why this is happening..?
Thanks,
Sunil.

Sunil S Nandihalli

unread,
Jul 21, 2011, 6:12:01 PM7/21/11
to clo...@googlegroups.com
The reason I am not posting the code is because I am not able to reproduce this on a simple case. I was just hoping some of you may have some insight with out the code..
Thanks,
Sunil.

Aaron Bedra

unread,
Jul 21, 2011, 7:21:25 PM7/21/11
to clo...@googlegroups.com
What version of Clojure are you running?

Cheers,

Aaron Bedra
--
Clojure/core
http://clojure.com
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clo...@googlegroups.com
Note that posts from new members are moderated - please be patient with your first post.
To unsubscribe from this group, send email to
clojure+u...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Sunil S Nandihalli

unread,
Jul 25, 2011, 2:40:57 AM7/25/11
to clo...@googlegroups.com
Hi Aaron Bedra,
 Thanks for your quick response. Sorry I could not get back to you with the information you asked for sooner.. 

 I am using 

user> *clojure-version*
{:major 1, :minor 2, :incremental 1, :qualifier ""}     

My project.clj is as follows...

(defproject bitvector "1.0.0-SNAPSHOT"
  :description "FIXME: write description"
  :dependencies [[org.clojure/clojure "1.2.1"]
                 [org.clojure/clojure-contrib "1.2.0"]
                 [clj-iterate "0.95-SNAPSHOT"]]
  :dev-dependencies [[swank-clojure "1.4.0-SNAPSHOT"]
                     [clojure-source "1.2.1"]]
  :main bitvector.core)

do you have any idea why I am getting this out of range thing when I use clojure.contrib.profile?

Thanks again,
Sunil.

Sunil S Nandihalli

unread,
Jul 25, 2011, 2:42:38 AM7/25/11
to clo...@googlegroups.com
here is the list of jar files in my lib directory

github@eagle ~/bitvector/lib#tree
.
|-- clj-iterate-0.95-20110417.030036-2.jar
|-- clojure-1.2.1.jar
|-- clojure-contrib-1.2.0.jar
`-- dev
    |-- cdt-1.2.6.1-20110417.030036-6.jar
    |-- clojure-1.2.1.jar
    |-- clojure-contrib-1.2.0.jar
    |-- clojure-source-1.2.1.jar
    |-- debug-repl-0.3.1.jar
    `-- swank-clojure-1.4.0-20110601.165758-9.jar

1 directory, 9 files

Colin Jones

unread,
Jul 25, 2011, 10:28:12 AM7/25/11
to clo...@googlegroups.com
This could be the same issue that Kevin Baribeau has found with clojure.contrib.profile here: https://github.com/richhickey/clojure-contrib/pull/2#issuecomment-1385392 

(Yes, we know he needs a CA, etc. - he mentions requesting assembla access before closing that pull request.)


- Colin

Aaron Bedra

unread,
Jul 26, 2011, 12:22:33 PM7/26/11
to clo...@googlegroups.com
The first thing I do when experiencing something strange like this is to remove anything possible.  In this case, try taking Leiningen out of the picture and just running it directly.  I am thinking that Colin is correct in his assessment that this is related to the bug that has already been filed. 

Cheers,

Aaron Bedra
--
Clojure/core
http://clojure.com


Stuart Sierra

unread,
Aug 1, 2011, 8:55:05 AM8/1/11
to clo...@googlegroups.com
clojure.contrib.profile (which I wrote) is deprecated. It was a half-baked idea to start with. Use a JVM profiler.

-Stuart Sierra
clojure.com
Reply all
Reply to author
Forward
0 new messages