Interesting Problem
- Posted by jessedavis Apr 20, 2010
- 1459 views
This started out with many lines of code. The problem is that I get a machine level error. The error handler points to the switch statement. I removed one line of code at a time to get to what you see. Remove ANY line of code and the problem disappears. Change the order of the lines and the problem disappears. If anyone is interested I can send the error file. The japi.e include file is a euphoria wrapper for GUI code from www.japi.de via rapideuphoria's archive. Euphoria 4.0 Ubuntu 9.xx It smells like a pointer or stack problem. Also note that if you replace the symbol btn in the case statement with its value (integer 4) the problem goes away.
Any thoughts? regards, jd
#! /home/jd/euphoria/bin/eui include japi.e as j include std/pretty.e as pe if( j:j_start() = j:J_FALSE ) then --sets up the engine puts(1,"can't connect to JAPI server") abort(1) end if constant win1 = j:j_frame("Manage Categories") constant btn = j:j_button(win1,"SAVE") --j:j_show(win1) integer obj = 2 --values 2 & 3 do not work others do work <<-------------- sequence values values = {win1,btn} --no effect on operation diagnostics only pe:pretty_print(1,values,{}) --no effect on operation diagnostics only switch obj do --this is line number 23 case 1 then case btn then case else end switch
The terminal output follows:
./test1.ex:23 A machine-level exception occurred during execution of this statement