Network extension heap related crash
NickName:Simon Bush Ask DateTime:2015-06-11T12:27:12

Network extension heap related crash

I have a network with approximately 4000 nodes approximately 50 of which only have a single link. When I run nw:weighted-path and nw:weighted-distance they both work perfectly, but when I try to use nw:mean-weighted-path-distance netlogo hangs (not responding), eventually leading to a heap failure. I've tried to reproduce it using the connect graph example and everything works well. I've doe this with the network extensions bundled with 5.1.0 and 5.2.0 I wonder if anyone else has come across this and if they got around it?

Edit 1 (code added)

I have links called highways and breeds called roads and origins that are all connected by highways

let road-set (turtle-set roads origins) 
nw:set-context road-set highways 
output-show nw:mean-weighted-path-length "my-highway-length"

edit 2 [using Netlogo 5.2] I get a GC overload error, as follows

java.lang.OutOfMemoryError: GC overhead limit exceeded
 at scala.collection.immutable.StreamIterator.<init>(Stream.scala:936)
 at scala.collection.immutable.Stream.iterator(Stream.scala:510)
 at scala.collection.TraversableLike$class.toIterator(TraversableLike.scala:606)
 at scala.collection.immutable.List.toIterator(List.scala:76)
 at scala.collection.TraversableOnce$FlattenOps$$anon$1.hasNext(TraversableOnce.scala:391)
 at scala.collection.Iterator$class.find(Iterator.scala:823)
 at scala.collection.TraversableOnce$FlattenOps$$anon$1.find(TraversableOnce.scala:388)
 at org.nlogo.extensions.nw.algorithms.PathFinder$class.org$nlogo$extensions$nw$algorithms$PathFinder$$expandBestTraversal(PathFinder.scala:64)
 at org.nlogo.extensions.nw.algorithms.PathFinder$$anonfun$distance$1.apply(PathFinder.scala:111)
 at org.nlogo.extensions.nw.algorithms.PathFinder$$anonfun$distance$1.apply(PathFinder.scala:110)
 at scala.Option.orElse(Option.scala:218)
 at org.nlogo.extensions.nw.algorithms.PathFinder$class.distance(PathFinder.scala:110)
 at org.nlogo.extensions.nw.GraphContext.distance(GraphContext.scala:14)
 at org.nlogo.extensions.nw.prim.MeanWeightedPathLength$$anonfun$2.apply(MeanPathLength.scala:32)
 at org.nlogo.extensions.nw.prim.MeanWeightedPathLength$$anonfun$2.apply(MeanPathLength.scala:32)
 at org.nlogo.extensions.nw.algorithms.MeanPathLength$$anonfun$meanPathLength$1$$anonfun$apply$mcV$sp$1$$anonfun$apply$2.apply(MeanPathLength.scala:21)
 at org.nlogo.extensions.nw.algorithms.MeanPathLength$$anonfun$meanPathLength$1$$anonfun$apply$mcV$sp$1$$anonfun$apply$2.apply(MeanPathLength.scala:19)
 at scala.collection.TraversableLike$WithFilter$$anonfun$map$2.apply(TraversableLike.scala:697)
 at scala.collection.immutable.HashSet$HashSet1.foreach(HashSet.scala:130)
 at scala.collection.immutable.HashSet$HashTrieSet.foreach(HashSet.scala:275)
 at scala.collection.immutable.HashSet$HashTrieSet.foreach(HashSet.scala:275)
 at scala.collection.immutable.HashSet$HashTrieSet.foreach(HashSet.scala:275)
 at scala.collection.TraversableLike$WithFilter.map(TraversableLike.scala:696)
 at org.nlogo.extensions.nw.algorithms.MeanPathLength$$anonfun$meanPathLength$1$$anonfun$apply$mcV$sp$1.apply(MeanPathLength.scala:19)
 at org.nlogo.extensions.nw.algorithms.MeanPathLength$$anonfun$meanPathLength$1$$anonfun$apply$mcV$sp$1.apply(MeanPathLength.scala:18)
 at scala.collection.immutable.HashSet$HashSet1.foreach(HashSet.scala:130)
 at scala.collection.immutable.HashSet$HashTrieSet.foreach(HashSet.scala:275)
 at scala.collection.immutable.HashSet$HashTrieSet.foreach(HashSet.scala:275)
 at scala.collection.immutable.HashSet$HashTrieSet.foreach(HashSet.scala:275)
 at org.nlogo.extensions.nw.algorithms.MeanPathLength$$anonfun$meanPathLength$1.apply$mcV$sp(MeanPathLength.scala:18)
 at scala.util.control.Breaks.breakable(Breaks.scala:39)
 at org.nlogo.extensions.nw.algorithms.MeanPathLength$.meanPathLength(MeanPathLength.scala:16)

NetLogo 5.2.0
main: org.nlogo.app.AppFrame
thread: AWT-EventQueue-0
Java HotSpot(TM) Server VM 1.6.0_45 (Sun Microsystems Inc.; 1.6.0_45-b06)
operating system: Windows 7 6.1 (x86 processor)
Scala version 2.9.2
JOGL: (3D View not initialized)
OpenGL Graphics: (3D View not initialized)
model: GIS Network v9.0 (markov - import-graph)

02:14:23.491 IconifiedEvent (org.nlogo.app.App) AWT-EventQueue-0
02:11:52.249 AddJobEvent (org.nlogo.window.ButtonWidget) AWT-EventQueue-0
02:11:52.155 InputBoxLoseFocusEvent (org.nlogo.window.ButtonWidget) AWT-EventQueue-0
02:11:52.124 InterfaceGlobalEvent (org.nlogo.app.InterfacePanel$2 (org.nlogo.window.SliderWidget)) AWT-EventQueue-0
02:11:52.124 InterfaceGlobalEvent (org.nlogo.widget.SwitchWidget) AWT-EventQueue-0
02:11:52.124 InterfaceGlobalEvent (org.nlogo.window.InputBoxWidget) AWT-EventQueue-0
02:11:52.124 InterfaceGlobalEvent (org.nlogo.window.InputBoxWidget) AWT-EventQueue-0
02:11:52.124 InterfaceGlobalEvent (org.nlogo.window.InputBoxWidget) AWT-EventQueue-0
02:11:52.124 InterfaceGlobalEvent (org.nlogo.widget.SwitchWidget) AWT-EventQueue-0
02:11:52.124 InterfaceGlobalEvent (org.nlogo.window.ChooserWidget) AWT-EventQueue-0

Copyright Notice:Content Author:「Simon Bush」,Reproduced under the CC 4.0 BY-SA copyright license with a link to the original source and this disclaimer.
Link to original article:https://stackoverflow.com/questions/30771578/network-extension-heap-related-crash

More about “Network extension heap related crash” related questions

Network extension heap related crash

I have a network with approximately 4000 nodes approximately 50 of which only have a single link. When I run nw:weighted-path and nw:weighted-distance they both work perfectly, but when I try to u...

Show Detail

Heap Analytics in a Chrome extension

Currently working on a Chrome extension that requires Heap analytics. I can see that Heap is being setup correctly with the load script provided, and I can see in network tab of Chrome's developer ...

Show Detail

How to get chrome extension crash event?

Is there any way to get a chrome extension crash event? I wrote a chrome extension, it may crash sometimes. Are there any chrome apis or events related to extension crashes? if no, how do you mon...

Show Detail

Heap size related error

how to increase heap size? or how to overcome the problem related to heap size. I am facing error related to heap size. my error is: Apex heap size too large: 9264402 Error is in expression '{!met...

Show Detail

Install Firebase / Crashlytics on iOS NEDNSProxyProvider Network extension

I have an iOS app with a network extension and i'm trying to install Firebase/Crashlytics on both: Host app (com.mycompany.appname) NEDNSProxyProvider Network extension (com.mycompany.appname.dnsp...

Show Detail

Chromecast memory related crash

I have been experimenting with Chromecast (2013 and 2015 models) to try and run a small Unity3D game. Basically, display 4 sprites on the screen. The game is compiled (by Unity's tools) to WebGL us...

Show Detail

Strange crash in Network Extension IPC

Sometimes I'm getting strange crash inside my Packet Tunnel (Network Extension) when I send IPC message from GUI: Hardware Model: iPad5,4 Process: PacketTunnel [7893] Code Type: ...

Show Detail

Heap corruption: What could the cause be?

I am investigating a crash due to heap corruption. As this issue is non-trivial and involves analyzing the stack and dump results, I have decided to do a code review of files related to the crash. ...

Show Detail

Crashes from network extension not being reported

I have a host app and network extension. Crashes from the host app are being reported correctly, but nothing from the extension. I'm calling [Fabric with:@[[Crashlytics class]]]; from

Show Detail

Heap extension command fails: failed to initialize the extention

While trying to use the !heap extension in Windbg for investigating a dump, I get following error: 0:000&gt; !heap -s -v -a SEGMENT HEAP ERROR: failed to initialize the extention This happens for ...

Show Detail