Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clozure cl fix #5

Merged
merged 3 commits into from Dec 2, 2013
Merged

Clozure cl fix #5

merged 3 commits into from Dec 2, 2013

Conversation

guicho271828
Copy link
Contributor

  • first run of the test pass and rest fails (on clozure cl)
  • NNS on R*-tree fails on ccl. the test case is removed
  • related to test fails on ccl #4

@rpav
Copy link
Owner

rpav commented Dec 2, 2013

Ah looks good thanks. Any idea why R* fails on CCL?

rpav added a commit that referenced this pull request Dec 2, 2013
@rpav rpav merged commit 665873b into rpav:master Dec 2, 2013
@guicho271828
Copy link
Contributor Author

The problem exists in the library itself I guess, not in the test. (both on sbcl and ccl)
The minimal code to reproduce the error is shown below.
However, in order to reproduce the error you will have to run it several times because it depends on the input data.
Thanks to the exhaustive random testing, we get to know about this bug.

(require :spatial-trees.test) ;; the test will fail

;; after the load has been completed,
(in-package :spatial-trees-test) ; ouch, this is not renamed yet

;; then run below several times ... 5 times or so may be enough
(loop for kind in '(:r :greene :r* :x)
   do (loop repeat 100
         for list = (loop repeat 200 collect (make-random-rectangle))
         do (let ((tree (make-spatial-tree kind :rectfun #'identity)))
              (dolist (r list)
                (insert r tree))))) ;; <--- just inserting a rectangle, but it *sometimes* signals an error

@guicho271828
Copy link
Contributor Author

or maybe due to the change I made. I will track down the error...

@guicho271828
Copy link
Contributor Author

Confirmed.
Reproduced in ccl, in commit b9f6f3c .
I was not involved at that time.
so this is a problem in the library itself.

@guicho271828
Copy link
Contributor Author

There are two kinds of error.
First one is signalled from (HEIGHT #<R_-TREE ...)) .
Second one is this (also related to R_-tree):

 There is no applicable method for the generic function:
  #<STANDARD-GENERIC-FUNCTION (SETF PARENT) #x18C283D6>
when called with arguments:
  (#<SPATIAL-TREE-NODE #<(0.42134553,0.061936513) - (1.3773994,0.8995452)> ... #10)
   [Condition of type CCL:NO-APPLICABLE-METHOD-EXISTS]

  0: (#<CCL::STANDARD-KERNEL-METHOD NO-APPLICABLE-METHOD (T)> #<STANDARD-GENERIC-FUNCTION (SETF PARENT) #x18C283D6> #<SPATIAL-TREE-NODE #<(0.42134553,0.061936513) - (1.3773994,0.8995452)> (#<SPATIAL-TREE-L..
  1: (NIL #<Unknown Arguments>)
  2: (#<STANDARD-METHOD ADJUST-TREE (R-TREE T)> #<R*-TREE #<SPATIAL-TREE-NODE (#<SPATIAL-TREE-NODE #<(0.0087614525,0.0014770869) - (1.1816769,1.6085284)> ..)))) #<SPATIAL-TREE-LEAF-NODE #<(0.42134553,0.061..
  3: (%INSERT #S(LEAF-NODE-ENTRY :RECTANGLE #<(0.615465,0.15804224) - (1.2664554,0.24819304)> :DATUM #<(0.615465,0.15804224) - (1.2664554,0.24819304)>) #<R*-TREE #<SPATIAL-TREE-NODE (#<SPATIAL-TREE-NODE #<..
  4: (REINSERT #S(LEAF-NODE-ENTRY :RECTANGLE #<(0.8815057,0.1985789) - (1.3660911,0.67779934)> :DATUM #<(0.8815057,0.1985789) - (1.3660911,0.67779934)>) #<R*-TREE #<SPATIAL-TREE-NODE (#<SPATIAL-TREE-NODE #..
  5: (OVERFLOW-TREATMENT #S(LEAF-NODE-ENTRY :RECTANGLE #<(0.8815057,0.1985789) - (1.3660911,0.67779934)> :DATUM #<(0.8815057,0.1985789) - (1.3660911,0.67779934)>) #<R*-TREE #<SPATIAL-TREE-NODE (#<SPATIAL-T..
  6: (%INSERT #S(LEAF-NODE-ENTRY :RECTANGLE #<(0.8815057,0.1985789) - (1.3660911,0.67779934)> :DATUM #<(0.8815057,0.1985789) - (1.3660911,0.67779934)>) #<R*-TREE #<SPATIAL-TREE-NODE (#<SPATIAL-TREE-NODE #<..
  7: (#<STANDARD-METHOD INSERT (T R*-TREE)> #<(0.8815057,0.1985789) - (1.3660911,0.67779934)> #<R*-TREE #<SPATIAL-TREE-NODE (#<SPATIAL-TREE-NODE #<(0.0087614525,0.0014770869) - (1.1816769,1.6085284)> ..)))..

@guicho271828
Copy link
Contributor Author

I guess the current state of the master branch will not be included into the quicklisp until the problem is fixed
because the test currently does not pass.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants