This is a read-only archive of lispforum.com. The forum was locked to new users and posts and is preserved here as static HTML from a database snapshot taken on 2019-09-07.

Debugging Direction Requested (Solved)

3 posts · 972 views

Situation: webapp using hunchentoot and jquery. On one page, there is a select box which jquery watches. On change, jquery calls the appropriate lisp function. The lisp functions are registered with hunchentoot. The lisp functions are in a file which gets compiled prior to the file which registers the functions in hunchentoot. Everything compiles in sbcl without any warnings.

However, when first loaded, the jquery calls do not get any return from the lisp functions. If I open the relevant file, hit Ctrl-c Ctrl-c, everything works as expected.

Looking at the message-log for hunchentoot, there is an:
Error while processing connection: The value "Albania" is not of type (UNSIGNED-BYTE 8).

(The function was returning the text for an html list box of countries).
When I do the Ctrl-c Ctrl-c in the repl, that message does not come up again and, as previously stated, everything works as expected.

I'm wondering if I have somehow transgressed against the gods of function ordering or if I should be looking in a different direction.

I'm trying to get the code down to a manageable test case, but any suggestions on directions to take in debugging this would be appreciated.

Sabra

Last edited by sabra.crolleton on , edited 1 time in total.

Re: Debugging Direction Requested

sabra.crolleton wrote:However, when first loaded, the jquery calls do not get any return from the lisp functions. If I open the relevant file, hit Ctrl-c Ctrl-c, everything works as expected.
Do you reload the function or the registering form? Also, is the function registered by name (symbol), or identity (function object)? It is hard to have any insight without seeing the code, but my guess would be either duplicate definition or a typo, but either should probably cause a warning.

Re: Debugging Direction Requested

Bingo. Thank you Ramarren. Buried two subdirectories below, there was another function with the same name.

Sabra