code waiting on something - cannot debug - driving me insane!!!

464 views
Skip to first unread message

Jim - FooBar();

unread,
Nov 13, 2012, 3:19:13 PM11/13/12
to clo...@googlegroups.com
Hi all,

I've had this unbelievable problem for some time now but I'm sick and
tired of ignoring it! It is literally driving nuts...Due to the nature
of the problem my terminal hangs and Eclipse crashes altogether
(potentially losing work)!

So what is the problem...Well I really don't have a clue! it is pretty
obvious that my code is waiting on something but it only happens when
I've got a dependency on a namespace of mine which uses seesaw. It is
basically my gui...the bad behaviour is exhibited every time I try to
reload my namespace after having opened a JFrame regardless of having
done anything on the frame! I mean the same happens if I open it and
close it straight after!

anyway, I managed to mock the behaviour with a minimal example:
-------------------------------------------------------------------------------------------------------------

(ns Clondie24.games.dummy
(:require [Clondie24.lib.gui :as gui]))

(def details {:name 'Dummy
:players 2
:arena-size [420 :by 505]
:tile-size 133})

(defn -main
"Starts a graphical (swing) Chess game."
[& args]
(gui/show-gui! details))


(ns Clondie24.lib.gui
(:require [Clondie24.lib.util :as ut]
[Clondie24.lib.core :as core]
[seesaw.core :as ssw]
[seesaw.chooser :as choo])
(:import [java.awt AlphaComposite Graphics Graphics2D Toolkit]
[java.awt.event MouseEvent]
[javax.swing SwingWorker UIManager]) )

(def curr-game (promise))
(def status-label (ssw/label :id :status :text "Ready!"))

(defn draw-tiles [d ^Graphics g]
(let [w (ssw/width d)
h (ssw/height d)
tile-size (:tile-size @curr-game)
tiles (map vector (for [x (range 0 w tile-size)
y (range 0 h tile-size)] [x y])
(cycle (:alternating-colours @curr-game)))]
(when (:alternating-colours @curr-game)
(doseq [[[x y] c] tiles]
(.setColor g c)
(.fillRect g x y tile-size tile-size)) )
(draw-grid d g)
(draw-images g)
(highlight-rects g)))

(def canvas "The paintable canvas - our board"
(ssw/canvas
:paint draw-tiles
:id :canvas
:listen [:mouse-clicked (fn [e] (when-not (and (:block? @knobs)
(realized?
curr-game))
(canva-react e)))]
))

(defn arena "Constructs and returns the entire arena frame." []
(ssw/frame
:title "Clondie24 Arena"
:size (:arena-size @curr-game)
:resizable? false
:on-close :exit
:menubar nil ;(make-menubar)
:content (ssw/border-panel
:border 10
:hgap 10
:vgap 10 ;;IGNORE ALL THIS FOLLOWING CODE TO SAVE TIME
:north (ssw/horizontal-panel :items
[(ssw/button :text "Undo" :listen [:action (fn
[e] (when-not (:block? @knobs)
(do (refresh :highlighting? false
:hint nil)
(undo!) (ssw/repaint! canvas))))]) [:fill-h 10]
(ssw/button :text "Clear" :listen [:action (fn
[e] (when-not (:block? @knobs)
(do (refresh :highlighting? false
:hint nil)
(clear!) (ssw/repaint! canvas))))]) [:fill-h 10]
(ssw/button :text "Available Moves" :listen
[:action (fn [e] (when-not (:block? @knobs)
(do
(refresh :highlighting? true
:hint nil)
(ssw/repaint! canvas))))]) [:fill-h 10]
(ssw/button :text "Hint" :listen [:action (fn
[e] (when-not (:block? @knobs)
(do (knob!
:highlighting? false)
(with-busy-cursor canvas
(hint
(:pref-depth @curr-game)) :hint))))]) [:fill-h 10]])
:center canvas
:south status-label)))


(defn show-gui! "Everything starts from here." [game-map]
(deliver curr-game game-map) ;firstly make the gui aware of what game
we want it to display
(ssw/invoke-later
(doto (arena) ssw/show!)))

---------------------------------------------------------------------------------------------------------------------------

any thoughts / feedback are greatly welcome. I cannot see why such a
standard setup would hang after trying to reload the dummy namespace.
everything reloads just fine as long as i don't show anything on
screen...scary stuff!

thanks in advance...

Jim



Dave Ray

unread,
Nov 13, 2012, 3:36:38 PM11/13/12
to clo...@googlegroups.com
Just a wild guess, but if something's shown on the screen,
#'draw-tiles will probably get invoked to paint the canvas and it
might end up blocking on the #'curr-game promise.

Dave
> --
> 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

Laurent PETIT

unread,
Nov 13, 2012, 4:12:39 PM11/13/12
to clo...@googlegroups.com
Hello,

As of the freeze of Eclipse: you're probably using 0.10.1. A problem
of hangs in relation with the way Counterclockwise was talking to the
repl has been fixed in the beta. You could either switch right now to
the beta "channel" ( http://ccw.crand.net/updatesite-betas/ ) either
wait until Thursday, I'll deliver what is currently in beta into a new
stable release (0.10.2)

Sent from a smartphone, please excuse the brevity/typos.

Jim - FooBar();

unread,
Nov 13, 2012, 4:42:51 PM11/13/12
to clo...@googlegroups.com
On 13/11/12 20:36, Dave Ray wrote:
> Just a wild guess, but if something's shown on the screen,
> #'draw-tiles will probably get invoked to paint the canvas and it
> might end up blocking on the #'curr-game promise.
thanks for your response Dave,

even though I'm not entirely sure what you mean, I can confirm that the
promise is not to blame...I replaced it with an atom and the same thing
happened...Delivering the promise is the very 1st thing happening so I
can't see how it might be blocking...also, the canvas does not react
unless the promise has been realized. After closing the gui I can't do
anything on the dummy namespace...it hangs indefinately...

any other thoughts? I am quite desperate here...

Jim

ps: thanks Laurent, I'll check out the stable release on Thursday. The
problem is that I'm not getting any exceptions so I'm not sure to much
extent the eclipse debugger can help me.

Dave Ray

unread,
Nov 13, 2012, 4:45:11 PM11/13/12
to clo...@googlegroups.com
Dump the JVM's threads [1] and see what it's stuck on?

Dave

[1] http://www.crazysquirrel.com/computing/java/basics/java-thread-dump.jspx

Jim - FooBar();

unread,
Nov 13, 2012, 4:52:39 PM11/13/12
to clo...@googlegroups.com
On 13/11/12 21:45, Dave Ray wrote:
> Dump the JVM's threads [1] and see what it's stuck on?

What am I looking for? I don't see anything related with my project...IT
is pretty obvious from the output though that everything is waiting! No
clue what though...

Jim
-------------------------------------------------------------------------------------------------------------------------------------

2012-11-13 21:47:16
Full thread dump Java HotSpot(TM) 64-Bit Server VM (23.2-b09 mixed mode):

"Thread-11" prio=10 tid=0x00007f4268022800 nid=0x1fc8 waiting on
condition [0x00007f4258338000]
java.lang.Thread.State: TIMED_WAITING (parking)
at sun.misc.Unsafe.park(Native Method)
- parking to wait for <0x00000000c286d270> (a
java.util.concurrent.SynchronousQueue$TransferStack)
at
java.util.concurrent.locks.LockSupport.parkNanos(LockSupport.java:226)
at
java.util.concurrent.SynchronousQueue$TransferStack.awaitFulfill(SynchronousQueue.java:460)
at
java.util.concurrent.SynchronousQueue$TransferStack.transfer(SynchronousQueue.java:359)
at
java.util.concurrent.SynchronousQueue.poll(SynchronousQueue.java:942)
at
clojure.tools.nrepl.transport$fn_transport$fn__1008.invoke(transport.clj:41)
at clojure.tools.nrepl.transport.FnTransport.recv(transport.clj:28)
at reply.eval_modes.nrepl$main$fn__1451.invoke(nrepl.clj:154)
at clojure.lang.AFn.run(AFn.java:24)
at java.lang.Thread.run(Thread.java:722)

"NonBlockingInputStreamThread" daemon prio=10 tid=0x00007f42685d9000
nid=0x1fc5 in Object.wait() [0x00007f4258439000]
java.lang.Thread.State: WAITING (on object monitor)
at java.lang.Object.wait(Native Method)
- waiting on <0x00000000c286b100> (a
jline.internal.NonBlockingInputStream)
at
jline.internal.NonBlockingInputStream.run(NonBlockingInputStream.java:278)
- locked <0x00000000c286b100> (a jline.internal.NonBlockingInputStream)
at java.lang.Thread.run(Thread.java:722)

"process reaper" daemon prio=10 tid=0x00007f42685d5000 nid=0x1fbf
waiting on condition [0x00007f4258461000]
java.lang.Thread.State: TIMED_WAITING (parking)
at sun.misc.Unsafe.park(Native Method)
- parking to wait for <0x00000000c286d7e8> (a
java.util.concurrent.SynchronousQueue$TransferStack)
at
java.util.concurrent.locks.LockSupport.parkNanos(LockSupport.java:226)
at
java.util.concurrent.SynchronousQueue$TransferStack.awaitFulfill(SynchronousQueue.java:460)
at
java.util.concurrent.SynchronousQueue$TransferStack.transfer(SynchronousQueue.java:359)
at
java.util.concurrent.SynchronousQueue.poll(SynchronousQueue.java:942)
at
java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1043)
at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1103)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
at java.lang.Thread.run(Thread.java:722)

"clojure-agent-send-off-pool-3" prio=10 tid=0x00007f4214005000
nid=0x1fbd runnable [0x00007f4258560000]
java.lang.Thread.State: RUNNABLE
at java.net.PlainSocketImpl.socketAccept(Native Method)
at
java.net.AbstractPlainSocketImpl.accept(AbstractPlainSocketImpl.java:398)
at java.net.ServerSocket.implAccept(ServerSocket.java:522)
at java.net.ServerSocket.accept(ServerSocket.java:490)
at clojure.tools.nrepl.server$accept_connection.invoke(server.clj:32)
at clojure.core$binding_conveyor_fn$fn__3989.invoke(core.clj:1822)
at clojure.lang.AFn.applyToHelper(AFn.java:161)
at clojure.lang.RestFn.applyTo(RestFn.java:132)
at clojure.lang.Agent$Action.doRun(Agent.java:116)
at clojure.lang.Agent$Action.run(Agent.java:165)
at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
at java.lang.Thread.run(Thread.java:722)

"clojure-agent-send-off-pool-2" prio=10 tid=0x00007f4214003800
nid=0x1fbb waiting on condition [0x00007f4258663000]
java.lang.Thread.State: TIMED_WAITING (parking)
at sun.misc.Unsafe.park(Native Method)
- parking to wait for <0x00000000c286e000> (a
java.util.concurrent.SynchronousQueue$TransferStack)
at
java.util.concurrent.locks.LockSupport.parkNanos(LockSupport.java:226)
at
java.util.concurrent.SynchronousQueue$TransferStack.awaitFulfill(SynchronousQueue.java:460)
at
java.util.concurrent.SynchronousQueue$TransferStack.transfer(SynchronousQueue.java:359)
at
java.util.concurrent.SynchronousQueue.poll(SynchronousQueue.java:942)
at
clojure.tools.nrepl.transport$fn_transport$fn__1008.invoke(transport.clj:41)
at clojure.tools.nrepl.transport.FnTransport.recv(transport.clj:28)
at clojure.tools.nrepl.transport.FnTransport.recv(transport.clj:27)
at clojure.tools.nrepl.server$handle.invoke(server.clj:24)
at
clojure.tools.nrepl.server$accept_connection$fn__1256.invoke(server.clj:35)
at clojure.core$binding_conveyor_fn$fn__3989.invoke(core.clj:1819)
at clojure.lang.AFn.call(AFn.java:18)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
at java.util.concurrent.FutureTask.run(FutureTask.java:166)
at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
at java.lang.Thread.run(Thread.java:722)

"process reaper" daemon prio=10 tid=0x00007f422002a000 nid=0x1fa8
waiting on condition [0x00007f425888d000]
java.lang.Thread.State: TIMED_WAITING (parking)
at sun.misc.Unsafe.park(Native Method)
- parking to wait for <0x00000000c286d7e8> (a
java.util.concurrent.SynchronousQueue$TransferStack)
at
java.util.concurrent.locks.LockSupport.parkNanos(LockSupport.java:226)
at
java.util.concurrent.SynchronousQueue$TransferStack.awaitFulfill(SynchronousQueue.java:460)
at
java.util.concurrent.SynchronousQueue$TransferStack.transfer(SynchronousQueue.java:359)
at
java.util.concurrent.SynchronousQueue.poll(SynchronousQueue.java:942)
at
java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1043)
at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1103)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
at java.lang.Thread.run(Thread.java:722)

"clojure-agent-send-off-pool-1" prio=10 tid=0x00007f4268875800
nid=0x1fa6 waiting on condition [0x00007f425898e000]
java.lang.Thread.State: TIMED_WAITING (parking)
at sun.misc.Unsafe.park(Native Method)
- parking to wait for <0x00000000c28130a8> (a
java.util.concurrent.SynchronousQueue$TransferStack)
at
java.util.concurrent.locks.LockSupport.parkNanos(LockSupport.java:226)
at
java.util.concurrent.SynchronousQueue$TransferStack.awaitFulfill(SynchronousQueue.java:460)
at
java.util.concurrent.SynchronousQueue$TransferStack.transfer(SynchronousQueue.java:359)
at
java.util.concurrent.SynchronousQueue.poll(SynchronousQueue.java:942)
at
java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1043)
at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1103)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
at java.lang.Thread.run(Thread.java:722)

"clojure-agent-send-off-pool-0" prio=10 tid=0x00007f422000c800
nid=0x1fa5 waiting on condition [0x00007f4258a8f000]
java.lang.Thread.State: TIMED_WAITING (parking)
at sun.misc.Unsafe.park(Native Method)
- parking to wait for <0x00000000c28130a8> (a
java.util.concurrent.SynchronousQueue$TransferStack)
at
java.util.concurrent.locks.LockSupport.parkNanos(LockSupport.java:226)
at
java.util.concurrent.SynchronousQueue$TransferStack.awaitFulfill(SynchronousQueue.java:460)
at
java.util.concurrent.SynchronousQueue$TransferStack.transfer(SynchronousQueue.java:359)
at
java.util.concurrent.SynchronousQueue.poll(SynchronousQueue.java:942)
at
java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1043)
at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1103)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
at java.lang.Thread.run(Thread.java:722)

"Service Thread" daemon prio=10 tid=0x00007f42680fa800 nid=0x1fa2
runnable [0x0000000000000000]
java.lang.Thread.State: RUNNABLE

"C1 CompilerThread2" daemon prio=10 tid=0x00007f42680f8000 nid=0x1fa1
waiting on condition [0x0000000000000000]
java.lang.Thread.State: RUNNABLE

"C2 CompilerThread1" daemon prio=10 tid=0x00007f42680f6000 nid=0x1fa0
waiting on condition [0x0000000000000000]
java.lang.Thread.State: RUNNABLE

"C2 CompilerThread0" daemon prio=10 tid=0x00007f42680f3000 nid=0x1f9f
waiting on condition [0x0000000000000000]
java.lang.Thread.State: RUNNABLE

"Signal Dispatcher" daemon prio=10 tid=0x00007f42680f1000 nid=0x1f9e
waiting on condition [0x0000000000000000]
java.lang.Thread.State: RUNNABLE

"Finalizer" daemon prio=10 tid=0x00007f42680a4000 nid=0x1f9d in
Object.wait() [0x00007f42604f6000]
java.lang.Thread.State: WAITING (on object monitor)
at java.lang.Object.wait(Native Method)
- waiting on <0x00000000c2546250> (a java.lang.ref.ReferenceQueue$Lock)
at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:135)
- locked <0x00000000c2546250> (a java.lang.ref.ReferenceQueue$Lock)
at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:151)
at java.lang.ref.Finalizer$FinalizerThread.run(Finalizer.java:177)

"Reference Handler" daemon prio=10 tid=0x00007f42680a1800 nid=0x1f9c in
Object.wait() [0x00007f42605f7000]
java.lang.Thread.State: WAITING (on object monitor)
at java.lang.Object.wait(Native Method)
- waiting on <0x00000000c25460a8> (a java.lang.ref.Reference$Lock)
at java.lang.Object.wait(Object.java:503)
at java.lang.ref.Reference$ReferenceHandler.run(Reference.java:133)
- locked <0x00000000c25460a8> (a java.lang.ref.Reference$Lock)

"main" prio=10 tid=0x00007f4268009000 nid=0x1f96 runnable
[0x00007f426f764000]
java.lang.Thread.State: RUNNABLE
at java.lang.Class.getClassLoader0(Native Method)
at java.lang.ClassLoader.getCallerClassLoader(ClassLoader.java:1537)
at java.lang.Class.getMethods(Class.java:1426)
at clojure.lang.Reflector.getMethods(Reflector.java:357)
at clojure.lang.Reflector.invokeNoArgInstanceMember(Reflector.java:296)
at
reply.eval_modes.nrepl$session_responses$fn__1414.invoke(nrepl.clj:33)
at clojure.lang.LazySeq.sval(LazySeq.java:42)
- eliminated <0x00000000f9b1d060> (a clojure.lang.LazySeq)
at clojure.lang.LazySeq.seq(LazySeq.java:60)
- locked <0x00000000f9b1d060> (a clojure.lang.LazySeq)
at clojure.lang.RT.seq(RT.java:473)
at clojure.core$seq.invoke(core.clj:133)
at clojure.core$filter$fn__4106.invoke(core.clj:2470)
at clojure.lang.LazySeq.sval(LazySeq.java:42)
- locked <0x00000000f9b1d0b8> (a clojure.lang.LazySeq)
at clojure.lang.LazySeq.seq(LazySeq.java:67)
- locked <0x00000000c2d835f0> (a clojure.lang.LazySeq)
at clojure.lang.RT.seq(RT.java:473)
at clojure.core$seq.invoke(core.clj:133)
at clojure.core$take_while$fn__4116.invoke(core.clj:2511)
at clojure.lang.LazySeq.sval(LazySeq.java:42)
- eliminated <0x00000000c2d83628> (a clojure.lang.LazySeq)
at clojure.lang.LazySeq.seq(LazySeq.java:60)
- locked <0x00000000c2d83628> (a clojure.lang.LazySeq)
at clojure.lang.RT.seq(RT.java:473)
at clojure.core$seq.invoke(core.clj:133)
at reply.eval_modes.nrepl$execute_with_client.invoke(nrepl.clj:46)
at reply.eval_modes.nrepl$run_repl.invoke(nrepl.clj:96)
at reply.eval_modes.nrepl$main.invoke(nrepl.clj:171)
at reply.main$launch_nrepl$fn__1706.invoke(main.clj:58)
at clojure.core$with_redefs_fn.invoke(core.clj:6585)
at reply.main$launch_nrepl.invoke(main.clj:55)
at leiningen.repl$repl.invoke(repl.clj:150)
at clojure.lang.Var.invoke(Var.java:415)
at clojure.lang.AFn.applyToHelper(AFn.java:161)
at clojure.lang.Var.applyTo(Var.java:532)
at clojure.core$apply.invoke(core.clj:603)
at leiningen.core.main$resolve_task$fn__836.doInvoke(main.clj:123)
at clojure.lang.RestFn.invoke(RestFn.java:410)
at clojure.lang.AFn.applyToHelper(AFn.java:161)
at clojure.lang.RestFn.applyTo(RestFn.java:132)
at clojure.lang.AFunction$1.doInvoke(AFunction.java:29)
at clojure.lang.RestFn.applyTo(RestFn.java:137)
at clojure.core$apply.invoke(core.clj:603)
at leiningen.core.main$apply_task.invoke(main.clj:146)
at leiningen.core.main$_main$fn__895.invoke(main.clj:223)
at leiningen.core.main$_main.doInvoke(main.clj:208)
at clojure.lang.RestFn.invoke(RestFn.java:408)
at clojure.lang.Var.invoke(Var.java:415)
at clojure.lang.AFn.applyToHelper(AFn.java:161)
at clojure.lang.Var.applyTo(Var.java:532)
at clojure.core$apply.invoke(core.clj:601)
at clojure.main$main_opt.invoke(main.clj:324)
at clojure.main$main.doInvoke(main.clj:427)
at clojure.lang.RestFn.invoke(RestFn.java:436)
at clojure.lang.Var.invoke(Var.java:423)
at clojure.lang.AFn.applyToHelper(AFn.java:167)
at clojure.lang.Var.applyTo(Var.java:532)
at clojure.main.main(main.java:37)

"VM Thread" prio=10 tid=0x00007f426809a000 nid=0x1f9b runnable

"GC task thread#0 (ParallelGC)" prio=10 tid=0x00007f4268017000
nid=0x1f97 runnable

"GC task thread#1 (ParallelGC)" prio=10 tid=0x00007f4268019000
nid=0x1f98 runnable

"GC task thread#2 (ParallelGC)" prio=10 tid=0x00007f426801a800
nid=0x1f99 runnable

"GC task thread#3 (ParallelGC)" prio=10 tid=0x00007f426801c800
nid=0x1f9a runnable

"VM Periodic Task Thread" prio=10 tid=0x00007f4268105800 nid=0x1fa3
waiting on condition

JNI global references: 236

Heap
PSYoungGen total 320832K, used 239091K [0x00000000eb600000,
0x00000000ffe50000, 0x0000000100000000)
eden space 304960K, 78% used
[0x00000000eb600000,0x00000000f9f6cd28,0x00000000fdfd0000)
from space 15872K, 0% used
[0x00000000feed0000,0x00000000feee0000,0x00000000ffe50000)
to space 15360K, 0% used
[0x00000000fdfd0000,0x00000000fdfd0000,0x00000000feed0000)
ParOldGen total 58304K, used 11805K [0x00000000c2200000,
0x00000000c5af0000, 0x00000000eb600000)
object space 58304K, 20% used
[0x00000000c2200000,0x00000000c2d875f0,0x00000000c5af0000)
PSPermGen total 38336K, used 22466K [0x00000000bd000000,
0x00000000bf570000, 0x00000000c2200000)
object space 38336K, 58% used
[0x00000000bd000000,0x00000000be5f0a70,0x00000000bf570000)

Laurent PETIT

unread,
Nov 13, 2012, 5:35:42 PM11/13/12
to clo...@googlegroups.com
Could you create a small lein2 project on github with what you
previously pasted in this thread correctly spread over files, etc., so
that it's really quick to reproduce the error?

Thanks,

Laurent

Sent from a smartphone, please excuse the brevity/typos.

Jim - FooBar();

unread,
Nov 13, 2012, 6:25:42 PM11/13/12
to clo...@googlegroups.com
The original project is already on github...I just committed the dummy
namespace as well so you can have a look...
so, do:

git clone https://github.com/jimpil/Clondie24.git
cd Clondie24
lein2 repl

(load-file "Clondie24.games.dummy.clj")
(ns Clondie24.games.dummy)
(-main)

then close the frame without doing anything and try evaluating anything
(e.g "(:name details)").
it goes without saying that the same thing happens in all other proper
games as well...

thanks a million for looking into this :-)

Jim


On 13/11/12 22:35, Laurent PETIT wrote:
> Could you create a small lein2 project on github with what you
> previously pasted in this thread correctly spread over files, etc., so
> that it's really quick to reproduce the error?
>
> Thanks,
>
> Laurent
>
> Sent from a smartphone, please excuse the brevity/typos.
>
> Le 13 nov. 2012 � 22:52, "Jim - FooBar();" <jimpi...@gmail.com> a �crit :

Karsten Schmidt

unread,
Nov 15, 2012, 5:42:40 PM11/15/12
to clo...@googlegroups.com
Hi Jim, isn't that just due to the fact that closing the Swing frame
kills the nrepl server JVM, but not the REPL client?

Also discussed here:
https://groups.google.com/forum/?fromgroups=#!topic/leiningen/QLcZIK2e5C0

I agree, it's annoying, but not sure how to workaround it? Maybe with
a heartbeat between nrepl client/server with the client closing the
repl session if the heartbeat been missing for x seconds...

Hth! K.


On 13 November 2012 23:25, Jim - FooBar(); <jimpi...@gmail.com> wrote:
> The original project is already on github...I just committed the dummy
> namespace as well so you can have a look...
> so, do:
>
> git clone https://github.com/jimpil/Clondie24.git
> cd Clondie24
> lein2 repl
>
> (load-file "Clondie24.games.dummy.clj")
> (ns Clondie24.games.dummy)
> (-main)
>
> then close the frame without doing anything and try evaluating anything (e.g
> "(:name details)").
> it goes without saying that the same thing happens in all other proper games
> as well...
>
> thanks a million for looking into this :-)
>
> Jim
>
>
>
> On 13/11/12 22:35, Laurent PETIT wrote:
>>
>> Could you create a small lein2 project on github with what you
>> previously pasted in this thread correctly spread over files, etc., so
>> that it's really quick to reproduce the error?
>>
>> Thanks,
>>
>> Laurent
>>
>> Sent from a smartphone, please excuse the brevity/typos.
>>
>> Le 13 nov. 2012 ą 22:52, "Jim - FooBar();" <jimpi...@gmail.com> a écrit
--
Karsten Schmidt
+44 7875 524 336

http://postspectacular.com | http://toxiclibs.org | http://toxi.co.uk

Jim - FooBar();

unread,
Nov 15, 2012, 6:29:39 PM11/15/12
to clo...@googlegroups.com
Wow! Unbelievable !

So there is nothing wrong with my code?
After reading this thread, it seems like a serious issue...the entire
repl becomes unusable which greatly limits the interactive experience.

But then,

what happens in Eclipse? the same principle applies? From my experience
with Java I know that eclipse spawns a new VM every time you run a
project....what's happening there? why does eclipse crash completely?

btw, thanks for spotting this :-) ...at least now i can stop fiddling
with my code and start looking for a workaround towards the right
direction. Hiding the frame temporarily, would allow me to at least work
easier. I'll try tomorrow...

Jim

Jim - FooBar();

unread,
Nov 15, 2012, 6:34:08 PM11/15/12
to clo...@googlegroups.com
Oops! I can use :dispose instead of :exit. If it does what it implies,
it should do the job...

Jim

Laurent PETIT

unread,
Nov 16, 2012, 9:08:16 AM11/16/12
to clo...@googlegroups.com
2012/11/16 Jim - FooBar(); <jimpi...@gmail.com>

Wow! Unbelievable !

So there is nothing wrong with my code?
After reading this thread, it seems like a serious issue...the entire repl becomes  unusable which greatly limits the interactive experience.

But then,

what happens in Eclipse?


Hello,

As I said, the last version of Counterclockwise, now released as stable 0.10.2, does not suffer from this problem anymore : Eclipse does not hang.

The server, however, does not respond (and that's to be expected), with the "exit on close" version.

I urge you to upgrade your Counterclockwise, if not already done ;-)

Cheers,

--
Laurent

Reply all
Reply to author
Forward
0 new messages