|
Post by alexfish on Oct 26, 2012 19:01:31 GMT 1
I don't think this will help but I have been running into a segmentation fault while trying to compile my little logout app using build 27 and Geany but I can compile it in the bacongui. Not sure if it is the same thing. In the bacongui, I had to update the syntax(?) file or something before bacongui would work or I got an error message too. Could some dep be missing that will allow bacon to pars and then compile? I think it may be a pointer to array problem "OPTION BASE" or a pointer in the SPLIT String TO SIZE, or the NULL String, This is the usual seg fault If got fish terminal this gives a better fault pointer than xterm or gnome terminal it will return OUT OF BOUNDS if an array to pointer problem. Regards Alex
|
|
|
Post by alexfish on Oct 26, 2012 19:55:53 GMT 1
Have done a compile pkg using Beta 28 , everything works as expected.
Logging shows all pointers in the executor and compile + load file are correct.
at Main loop file + 1 = x='0' y='0' width='295' height='125' file + 3 = <text x='25' y='1500' font-family='sans' font-style='regular' font-size='12' fill='black' font-weight='normal'>Main</text> widget text = Main hugline$[3] = WINDOW,window1,0,0,1000,1000 The point widget = window1 file + 1 = x='45' y='85' width='100' height='30' file + 3 = <text x='66' y='104' font-family='sans' font-style='regular' font-size='12' fill='black' font-weight='normal'>Button_2</text> widget text = Button_2 hugline$[3] = BUTTON,Button_2,45,85,100,30 The point widget = Button_2 Pointer = 2 SDATA = ,0,0,0;Button_2;0;0;Button_2 widget first values = ,0,0,0 callback first value = 0 callback second value = 0
file + 1 = x='195' y='95' width='100' height='30' file + 3 = <text x='216' y='114' font-family='sans' font-style='regular' font-size='12' fill='black' font-weight='normal'>Button_3</text> widget text = Button_3 hugline$[3] = BUTTON,Button_3,195,95,100,30 The point widget = Button_3 Pointer = 3 SDATA = ,0,0,0;Button_3;0;0;Button_3 widget first values = ,0,0,0 callback first value = 0 callback second value = 0
file + 1 = x='180' y='15' width='100' height='30' file + 3 = <text x='200' y='28' font-family='sans' font-style='regular' font-size='12' fill='black' font-weight='normal'>Combo_4</text> widget text = Combo_4 hugline$[3] = COMBO,Combo_4,180,15,100,30 The point widget = Combo_4 Pointer = 4 SDATA = ,0,0,0;Combo_4;0;0;Combo_4 widget first values = ,0,0,0 callback first value = 0 callback second value = 0
List found Combo_4,item 1,itme 3
Converting '/home/alexfish/Jvap/Projects/build/democode.bac'... done. Compiling '/home/alexfish/Jvap/Projects/build/democode.bac'... done. Program '/home/alexfish/Jvap/Projects/build/democode' ready.
file=/home/alexfish/J-vap/Projects/test528
LOADING CHECK =window1 LOADING CHECK =Button_2 LOADING CHECK =Button_3 LOADING CHECK =Button_4
loaded= Main Block loaded ensub = 1 Main Block loaded 2 Main Block loaded 3 Main Block loaded 4 fcount=27
Path=/home/alexfish/J-vap/Projects/
THE TOP COUNT =0 WIDGET COUNT=4 DONE
|
|
|
Post by alexfish on Oct 26, 2012 20:33:31 GMT 1
Well this is strange the compiled 28 beta now getting Write errors in the sdata file , same as bacon 27, this happened after 3 or 4 save and reloads.
see screen shot
top ones are correct , then the bottom one shows , nothing if there is nothing in the sdata then all sdata is null, so the executor will crash, I can trap this , but why can't it write data like this
sdat:,0,0,0;Button_2;0;0;Button_2 sdat:,0,0,0;Button_3;0;0;Button_3
when a jvap is compiled with bacon26 can ? ADDED the ERROR
at Main loop file + 1 = x='0' y='0' width='130' height='115' file + 3 = <text x='25' y='1500' font-family='sans' font-style='regular' font-size='12' fill='black' font-weight='normal'>Main</text> widget text = Main hugline$[3] = WINDOW,window1,0,0,1000,1000 The point widget = window1 file + 1 = x='30' y='85' width='100' height='30' file + 3 = <text x='51' y='104' font-family='sans' font-style='regular' font-size='12' fill='black' font-weight='normal'>Button_2</text> widget text = Button_2 hugline$[3] = BUTTON,Button_2,30,85,100,30 The point widget = Button_2 Pointer = 2 SDATA = null widget first values = null Segmentation fault
Regards
Alex
ADDED , the thing that comes to mind , when trying to put the code.bac into the /tmp/ there where write errors , IE: Button_2 changed to Button.2 , but some of the data showed as "Button_2" so got compile errors from
Button.2=BUTTON("Button_2",100,30) ATTACH(Window1,Button_2,0,0)
got over that one by putting code in the home directory.
had commented on this in previous post.
Updated :Think found one problem in the compile with 28 the save sdata is failing . this is the code
PRINT "save 5" nfile4$=CONCAT$(f_open$,".bsd") OPEN nfile4$ FOR WRITING AS myfile4 FOR z = 0 TO widget_counter ck = INSTR(sdata_vals$[z],"null") IF ck = 0 THEN ck = INSTR(sdata_vals$[z],"deleted") IF ck=0 THEN reg=REGEX(sdata_vals$[z], "[[:alnum:]]") IF reg=1 THEN PRINT "sdat",sdata_vals$[z] txt4$=CONCAT$("sdat:",sdata_vals$[z]) WRITELN txt4$ TO myfile4 END IF END IF END IF NEXT CLOSE FILE myfile4 Should get logged if writing to file , possible cause is use of ck = "used" two times but works in compile with 26. will do some testing tomorrow. this is the output
save 1 save 4 save 5
it should Print the <PRINT "sdat",sdata_vals$[z]>
Regards
Alex
|
|
|
Post by alexfish on Oct 26, 2012 20:35:10 GMT 1
the screen-shot
|
|
|
Post by alexfish on Oct 26, 2012 22:28:33 GMT 1
Changed the code to REM ----------------------------------------------- PRINT "save 5" nfile4$=CONCAT$(f_open$,".bsd") OPEN nfile4$ FOR WRITING AS myfile4 FOR z = 0 TO widget_counter ck = INSTR(sdata_vals$[z],"null") IF ck = 0 THEN ckd = INSTR(sdata_vals$[z],"deleted") IF ckd=0 THEN reg=REGEX(sdata_vals$[z], "[[:alnum:]]") PRINT "regex = ",reg IF reg=1 THEN PRINT "sdat",sdata_vals$[z] txt4$=CONCAT$("sdat:",sdata_vals$[z]) WRITELN txt4$ TO myfile4 END IF END IF END IF NEXT CLOSE FILE myfile4 REM ----------------------------------------------- Seems REGEX was return 1 in bacon compile with bacon 26 save 1 save 4 save 5 regex = 1 sdat,0,0,0;Button_2;0;0;Button_2 regex = 1 sdat,0,0,0;Button_3;0;0;Button_3 regex = 1 sdat,0,0,0;Button_4;0;0;Button_4
compile with bacon 28 beta save 1 save 4 save 5 regex = 2 regex = 2 regex = 2 regex = 2 can easy fix this by >0 , but why the diff ?
|
|
|
Post by alexfish on Oct 27, 2012 0:38:54 GMT 1
pkg installer ,
have done some mods to the arrays , hope overcome array problem + fix for the REGEX
this one will install Bacon beta 28 , it seems to be stable remember the bacon 28 beta will be installed in the /usr/bin if necessary back up previous version, think bigbass did a howto on this
now time for some Zzzzzzzzzzzzzzzzzzzzzzzzzz.
Regards
Alex
|
|
|
Post by Pjot on Oct 27, 2012 8:37:13 GMT 1
|
|
|
Post by alexfish on Oct 27, 2012 10:53:35 GMT 1
I remember seeing it .... Now ;;;;;;;;; Nice feature , a bomber when one forgets ! Dank U Regards Alex
|
|
|
Post by alexfish on Oct 28, 2012 13:39:23 GMT 1
noticed the Canvas link not working in the widgets
have updated jvap image files + hugrad*.bac
see Attachments
unpack the tarfile then from the terminal as root cd to the /usr/share/jvap
then
./install.sh
Regards
Alex
|
|
|
Post by alexfish on Oct 29, 2012 16:55:05 GMT 1
BUG PATCH:
bug in pkg download
IN the main code raddemo3.bac
GOTO : LINE
"SUB SAVE_PROJECTS(NUMBER dialog, int button)"
FIND :
REM ----------------------------------------------- '@ save subs save_subs IF enlist = 1 THEN nfile5$=CONCAT$(f_open$,".ltd") OPEN nfile5$ FOR WRITING AS myfile WRITELN List_Store$ TO myfile CLOSE FILE myfile '@ save the list type widgets nfile6$=CONCAT$(f_open$,".ltl") OPEN nfile6$ FOR WRITING AS myfile WRITELN list$ TO myfile CLOSE FILE myfile END IF
CHANGE TO :
REM ----------------------------------------------- '@ save subs IF enlist = 1 THEN nfile5$=CONCAT$(f_open$,".ltd") OPEN nfile5$ FOR WRITING AS myfile WRITELN List_Store$ TO myfile CLOSE FILE myfile '@ save the list type widgets nfile6$=CONCAT$(f_open$,".ltl") OPEN nfile6$ FOR WRITING AS myfile WRITELN list$ TO myfile CLOSE FILE myfile END IF
save and exit then recompile.
What's next ,
Stock has been added Full path to J-vap, save project code as named.bac , + save executable as named
Regards
Alex
|
|
|
Post by vovchik on Oct 29, 2012 17:11:44 GMT 1
Dear Alex,
Please never post bits of code that you have to replace, but just the corrected source - complete. That is normal. takes a few minutes, but spares 100s of people of doing some unnecsseary work. Please - just clean code.
With kind regards, vovchik
|
|
|
Post by alexfish on Oct 29, 2012 17:31:02 GMT 1
Happy to oblige.
Regards
Alex
|
|
|
Post by alexfish on Oct 30, 2012 12:16:21 GMT 1
J-vap rad demo 4 Released
download the tarfile in attachment
extract the contents
cd to the /J-vap-4/usr/share/jvap
from the terminal as root
./install.sh after install exit the root terminal exit
first time call must be from the user terminal
./jvap
the program may balk at first compile , if so call try again
the window grip still not implemented , best to leave auto window on and place FRAME , left click bottom right of frame to resize. middle button click to set . move widget is right click ,set with middle button
to call the stock buttons , click on the BUTTON widget then select stock widget in the LIST to change stock widget repeat the process.
on Init there should be a J-vap folder in the home directory, all compiles take place there.
Known bugs , if file select is null then it will balk.
Remember this will install bacon 28 beta , if neccessary can back up previous version then can reinstall it later.
Have fun
Regards
Alex
|
|
|
Post by alexfish on Oct 30, 2012 12:40:18 GMT 1
Almost forgot
the callback function is automatic , to edit callbacks click on the Procs button , then edit , save after edits Same applies to Lists Combo list will also be in the Lists
STOCK buttons : To change type , try Editing the Text
Editing widgets ; Remember to Middle mouse click on widget to enter edits
User code use the "User code"
If a wiget is deleted , the sub or function will not be deleted and should not show on compile
Remember the project compiled code is also saved as a complete .bac in the J-vap folder Then can use the Bacon GUI to edit... remember the Bacon GUI has a " Save as " .
Regards
Alex
|
|
|
Post by alexfish on Oct 30, 2012 13:19:30 GMT 1
Making use of the Editors and the GSR
see screen shot
Regards
Alex
|
|