Debugging Direction Requested (Solved)

Discussion of Common Lisp
Post Reply
sabra.crolleton
Posts: 16
Joined: Sat Sep 13, 2008 6:46 pm

Debugging Direction Requested (Solved)

Post by sabra.crolleton » Sat May 08, 2010 10:21 am

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 Sat May 08, 2010 3:11 pm, edited 1 time in total.

ramarren
Posts: 613
Joined: Sun Jun 29, 2008 4:02 am
Location: Warsaw, Poland
Contact:

Re: Debugging Direction Requested

Post by ramarren » Sat May 08, 2010 1:20 pm

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.

sabra.crolleton
Posts: 16
Joined: Sat Sep 13, 2008 6:46 pm

Re: Debugging Direction Requested

Post by sabra.crolleton » Sat May 08, 2010 3:11 pm

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

Sabra

Post Reply