[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

safe eval



Hi folks,

I'm a scheme newbie, ambitious one though.
I'm trying to embed mzscheme into my Windows Jabber (instant messaging)
client.
The documents are great, and almost everything is well.

I am having troubles with safely evaluating expressions.  Following the
suggestion under section 2.6.1 of "Inside PLT MzScheme", which is to use the
example in "plt/src/mzscheme/dynsrc/oe.c", it all seems to work fine.
However, I experienced random crashes which starts with this.  I managed to
capture a
scenario when this happened.

The following are the 3 lines of code being eval'ed since mzscheme was
started up.

(current-library-collection-paths
  (path-list-string->path-list "" '("c:\\lang\\plt\\collects")))  ; ok
(require-library "date.ss" "mzlib")  ; ok
(date->string (seconds->date (current-seconds)))

At this point my "scheme_console_output" hook is called with the following
string
"error trying to display error: exception raised:\n", int len=50
The call stack is attached.

I would appreciate any pointers at all, TIA.

Best regards,

wil
interpreter_output_hook(char * 0x00df0bd0, long 50) line 14
scheme_inescapeable_error(const char * 0x0055fd3c `string', const char * 0x009a9aa0) line 494 + 21 bytes
call_error(char * 0x009a9aa0, int 77) line 508 + 14 bytes
do_raise(Scheme_Object * 0x00e031f8, int 0, int 1) line 1586 + 13 bytes
scheme_raise_exn(int 20) line 1487 + 43 bytes
tested_file_write_string(char * 0x00000000, long 0, long -1, Scheme_Output_Port * 0x00974f78) line 3545 + 23 bytes
flush_tested(Scheme_Output_Port * 0x00974f78) line 3565 + 15 bytes
tested_file_write_string(char * 0x00eb6498, long 81, long 46, Scheme_Output_Port * 0x00974f78) line 3554 + 9 bytes
scheme_write_offset_string(const char * 0x00eb6498, long 0, long 128, Scheme_Object * 0x00974f78) line 1512 + 19 bytes
scheme_write_string(const char * 0x00eb6498, long 128, Scheme_Object * 0x00974f78) line 1522 + 19 bytes
def_error_display_proc(int 1, Scheme_Object * * 0x0012ecec) line 1323 + 27 bytes
scheme_do_eval(Scheme_Object * 0x00cb0840, int 1, Scheme_Object * * 0x0012ecec, int -1) line 2214 + 14 bytes
apply_k() line 926 + 19 bytes
scheme_top_level_do(void * (void)* 0x00437c30 apply_k(void), int 0) line 883 + 3 bytes
_apply(Scheme_Object * 0x00cb0840, int 1, Scheme_Object * * 0x0012ecec, int 1, int 0) line 954 + 14 bytes
scheme_apply_multi(Scheme_Object * 0x00cb0840, int 1, Scheme_Object * * 0x0012ecec) line 969 + 21 bytes
call_error(char * 0x00eb6540, int 128) line 522 + 24 bytes
def_exn_handler(int 1, Scheme_Object * * 0x0012f1d0) line 1519 + 13 bytes
scheme_do_eval(Scheme_Object * 0x00cb0f90, int 1, Scheme_Object * * 0x0012f1d0, int 1) line 2214 + 14 bytes
apply_k() line 928 + 19 bytes
scheme_top_level_do(void * (void)* 0x00437c30 apply_k(void), int 0) line 883 + 3 bytes
_apply(Scheme_Object * 0x00cb0f90, int 1, Scheme_Object * * 0x0012f1d0, int 0, int 0) line 954 + 14 bytes
scheme_apply(Scheme_Object * 0x00cb0f90, int 1, Scheme_Object * * 0x0012f1d0) line 962 + 21 bytes
now_do_raise(void * 0x00e03210) line 1554 + 24 bytes
scheme_dynamic_wind(void (void *)* 0x00431e30 pre_raise(void *), Scheme_Object * (void *)* volatile 0x00431e50 now_do_raise(void *), void (void *)* volatile 0x00431e90 post_raise_or_debug(void *), Scheme_Object * (void *)* 0x00000000, void * volatile 0x00e03210) line 2186 + 7 bytes
do_raise(Scheme_Object * 0x00e03210, int 0, int 1) line 1629 + 26 bytes
scheme_raise_exn(int 6) line 1487 + 43 bytes
scheme_wrong_rator(Scheme_Object * 0x0099bdf0, int 1, Scheme_Object * * 0x0012f65c) line 1036 + 46 bytes
scheme_do_eval(Scheme_Object * 0x0099bdf0, int 1, Scheme_Object * * 0x0012f65c, int 1) line 2546 + 17 bytes
_apply_thunk_catch_exceptions(Scheme_Object * 0x00e03228, Scheme_Object * * 0x0012f6b0) line 40 + 20 bytes
eval_string_or_get_exn_message(char * 0x00cb4641) line 82 + 27 bytes
Interpreter::eval(const std::basic_string<char,std::char_traits<char>,std::allocator<char> > & {0x00cb4641 "(date->string (seconds->date (current-seconds)))"}) line 37 + 14 bytes
ABCApp::doInterpreter() line 194 + 53 bytes
ABCApp::onCommand(unsigned int 40014, long 0) line 50
ABCMainWin::WindowProc(HWND__ * 0x0005040c, unsigned int 273, unsigned int 40014, long 0) line 52
ABCApp::dispatchMessages(ABCApp * const 0x0057e760 class ABCApp  abc, HWND__ * 0x0005040c, unsigned int 273, unsigned int 40014, long 0) line 23 + 21 bytes
ABCWindowProc(HWND__ * 0x0005040c, unsigned int 273, unsigned int 40014, long 0) line 18
USER32! 77e148dc()
USER32! 77e14aa7()
USER32! 77e266fd()
WinMain(HINSTANCE__ * 0x00400000, HINSTANCE__ * 0x00000000, char * 0x00132b5e, int 1) line 29
WinMainCRTStartup() line 198 + 54 bytes
KERNEL32! 77e992a6()