<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<br>
<div class="moz-forward-container">For some reason, this message was
sent to a mailing list administration address.<br>
<br>
-------- Forwarded Message --------
<table class="moz-email-headers-table" border="0" cellpadding="0"
cellspacing="0">
<tbody>
<tr>
<th valign="BASELINE" nowrap="nowrap" align="RIGHT">Subject:
</th>
<td>Error "Fault during read of memory address #x13"</td>
</tr>
<tr>
<th valign="BASELINE" nowrap="nowrap" align="RIGHT">Date: </th>
<td>Tue, 3 Nov 2015 10:20:10 +0100</td>
</tr>
<tr>
<th valign="BASELINE" nowrap="nowrap" align="RIGHT">From: </th>
<td>Renzo Orsini <a class="moz-txt-link-rfc2396E" href="mailto:orsini@dsi.unive.it"><orsini@dsi.unive.it></a></td>
</tr>
<tr>
<th valign="BASELINE" nowrap="nowrap" align="RIGHT">To: </th>
<td><a class="moz-txt-link-abbreviated" href="mailto:openmcl-devel-owner@clozure.com">openmcl-devel-owner@clozure.com</a></td>
</tr>
</tbody>
</table>
<br>
<br>
<pre>Given this program:
(defvar *regions* '((SA (WA NT Q NSW V)) (WA (NT SA)) (NT (Q SA WA)) (Q (NSW SA NT)) (NSW (V SA Q)) (V (SA NSW)) (T)))
(defun list-regions (m)
(mapcar #'car m))
(defun map-coloring-constraint (region-map)
(let* ((node-list (list-regions region-map))
(node-list-length (length node-list))
(constraints (make-array (list node-list-length node-list-length) :initial-element nil)))
(loop for (node-a . value) in region-map
for position-a = (position node-a node-list)
do (mapcar (lambda (b)
(format t "before setf with ~a ~a ~a ~%" node-a b position-a)
(setf (aref constraints
position-a
(position b node-list))
t))
(car value)))
constraints))
If I do:
(map-coloring-constraint *regions*)
the program produces its result, but if I remove the (format …) that I have inserted for debugging purposes, the following error arises:
Fault during read of memory address #x13
[Condition of type CCL::INVALID-MEMORY-ACCESS]</pre>
<br>
</div>
<br>
</body>
</html>