open et contexte

Xcas devel: interface utilisateur/user interface

Modérateur : xcasadmin

frederic han
Messages : 1137
Inscription : dim. mai 20, 2007 7:09 am
Localisation : Paris
Contact :

open et contexte

Message par frederic han » dim. nov. 14, 2010 9:26 pm

Salut,

Je ne sais pas si c'est ma compilation ou bien si c'est du a un changement.

J'ai compile une version 32bits en vue de l'utiliser comme xcas_user.

J'arrive a sauver et charger ce que j'ai sauve, ouvrir un ancien fichier en recovery, mais pas un ancien fichier fait avec la version debian d'octobre, ni par exemple newton.xws

C'est normal ou c'est ma version ou le fait d'essayer de la ranger ailleurs?


Merci

Fred

./xcas.bin.orig ~/newton.xws

// Using locale /home/fred/xcas090/share/locale
// fr_FR
// /home/fred/xcas090/share/locale
// giac
// UTF-8
GSL error handler off
// Using help file aide_cas
// root dir /home/fred/xcas090/
// Read 1202 entries from cache /home/fred/xcas090/doc/fr/html_mtt
// Read 1609 entries from cache /home/fred/xcas090/doc/fr/html_mall
// Read 1083 entries from cache /home/fred/xcas090/doc/fr/html_vall
// Using keyword file /home/fred/xcas090/doc/fr/keywords
Help file /home/fred/xcas090/doc/fr/aide_cas not found
Added 159 synonyms
// Using menu file /home/fred/xcas090/doc/fr/xcasex
// Using menu file /home/fred/xcas090/doc/fr/xcasmenu
// Unable to find config file /root/xcas090/share/giac//xcas.rc
// Reading config file /home/fred/.xcasrc
[widget_size([0,12,40,10],29,49,952,728,0,1,0,[88,255,60,255,216,255,56,255,56,2
55,49],"/usr/bin/firefox",0,0,"",""),cas_setup(1,0,0,1,1,[1e-10,1e-15],10,[1,50,
1,25],0,0,0),xcas_mode(0),xyztrange(-10.0,10.0,-10.0,10.0,-10.0,10.0,-10.0,10.0,
-10.0,10.0,-1.4,1.1,1,0.0,1.0,3)]
// User configuration done
// Maximum number of parallel threads 1
Threads allowed 1
Using hash_map_namespace
Mpz_class allowed 1
// Success
// Success
// Success
// Success
Cas_setup Vector [0.0000000000e+00,0.0000000000e+00,0.0000000000e+00,1.000000000
0e+00,0.0000000000e+00,[1.0000000000e-10,1.0000000000e-15],1.2000000000e+01,[1.0
000000000e+00,5.0000000000e+01,0.0000000000e+00,2.5000000000e+01],0.0000000000e+
00,1.0000000000e+00,0.0000000000e+00]
terminate called after throwing an instance of 'std::runtime_error'
what(): End of stream Error: Bad Argument Type
Abandon

parisse
Messages : 5731
Inscription : mar. déc. 20, 2005 4:02 pm
Contact :

Re: open et contexte

Message par parisse » lun. nov. 15, 2010 2:11 pm

salut!

il n'y a pas assez d'infos pour voir d'ou vient le probleme (faudrait voir avec gdb), ceci dit je suis en train de faire pas mal de modifs dans les structures de base pour pouvoir diminuer le nombre d'initialisations statiques au lancement de xcas, tu as peut-etre interet a faire un rm -f *.o et recompiler avec le source que je mets a jour maintenant (incluant ta modif pour __CONCAT) avant de lancer gdb.

frederic han
Messages : 1137
Inscription : dim. mai 20, 2007 7:09 am
Localisation : Paris
Contact :

Re: open et contexte

Message par frederic han » mar. nov. 16, 2010 12:47 am

Bizarre, le nouveau source me donne a la compil:

make[2]: Entering directory `/root/giac-0.9.0/src'
/bin/sh ../libtool --tag=CXX --mode=compile g++-4.1 -DHAVE_CONFIG_H -I. -I.. -DIN_GIAC -I. -I.. -I. -I.. -g -O2 -fno-strict-aliasing -MT plot.lo -MD -MP -MF .deps/plot.Tpo -c -o plot.lo plot.cc
libtool: compile: g++-4.1 -DHAVE_CONFIG_H -I. -I.. -DIN_GIAC -I. -I.. -I. -I.. -g -O2 -fno-strict-aliasing -MT plot.lo -MD -MP -MF .deps/plot.Tpo -c plot.cc -fPIC -DPIC -o .libs/plot.o
plot.cc:12198: error: cannot convert 'const giac::unary_function_ptr' to 'const long unsigned int' in initialization
plot.cc:12198: error: cannot convert 'const giac::unary_function_ptr' to 'const long unsigned int' in initialization
plot.cc:12198: error: cannot convert 'const giac::unary_function_ptr' to 'const long unsigned int' in initialization
plot.cc:12198: error: cannot convert 'const giac::unary_function_ptr' to 'const long unsigned int' in initialization
plot.cc:12198: error: cannot convert 'const giac::unary_function_ptr' to 'const long unsigned int' in initialization
make[2]: *** [plot.lo] Error 1
make[2]: Leaving directory `/root/giac-0.9.0/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/root/giac-0.9.0'



La version d'hier donne avec gdb lorsque j'essaye d'ouvrir newton.xws

This GDB was configured as "i486-linux-gnu"...
(gdb) r
Starting program: /home/fred/xcas090/xcas.bin.orig
[Thread debugging using libthread_db enabled]
// Using locale /home/fred/xcas090/share/locale
// fr_FR
// /home/fred/xcas090/share/locale
// giac
// UTF-8
GSL error handler off
[New Thread 0xb6a5e9c0 (LWP 10420)]
// Using help file aide_cas
// root dir /home/fred/xcas090/
// Read 1202 entries from cache /home/fred/xcas090/doc/fr/html_mtt
// Read 1609 entries from cache /home/fred/xcas090/doc/fr/html_mall
// Read 1083 entries from cache /home/fred/xcas090/doc/fr/html_vall
// Using keyword file /home/fred/xcas090/doc/fr/keywords
Help file /home/fred/xcas090/doc/fr/aide_cas not found
Added 159 synonyms
// Using menu file /home/fred/xcas090/doc/fr/xcasex
// Using menu file /home/fred/xcas090/doc/fr/xcasmenu
// Unable to find config file /root/xcas090/share/giac//xcas.rc
// Reading config file /home/fred/.xcasrc
[widget_size([0,12,40,10],29,49,952,728,0,1,0,[88,255,60,255,216,255,56,255,56,255,49],"/usr/bin/firefox",0,0,"",""),cas_setup(1,0,0,1,1,[1e-10,1e-15],10,[1,50,1,25],0,0,0),xcas_mode(0),xyztrange(-10.0,10.0,-10.0,10.0,-10.0,10.0,-10.0,10.0,-10.0,10.0,-1.4,1.1,1,0.0,1.0,3)]
// User configuration done
// Maximum number of parallel threads 1
Threads allowed 1
Using hash_map_namespace
Mpz_class allowed 1
0
// Success
// Success
// Success
// Success
Cas_setup Vector [0.0000000000e+00,0.0000000000e+00,0.0000000000e+00,1.0000000000e+00,0.0000000000e+00,[1.0000000000e-10,1.0000000000e-15],1.2000000000e+01,[1.0000000000e+00,5.0000000000e+01,0.0000000000e+00,2.5000000000e+01],0.0000000000e+00,1.0000000000e+00,0.0000000000e+00]
terminate called after throwing an instance of 'std::runtime_error'
what(): End of stream Error: Bad Argument Type

Program received signal SIGABRT, Aborted.
[Switching to Thread 0xb6a5e9c0 (LWP 10420)]
0xb7f2a424 in __kernel_vsyscall ()

Fred

parisse
Messages : 5731
Inscription : mar. déc. 20, 2005 4:02 pm
Contact :

Re: open et contexte

Message par parisse » mar. nov. 16, 2010 7:55 am

T'es en 32 ou 64 bits? Je n'ai pas encore vérifié mes changements en 64. Sinon pour gdb, il faudrait que tu fasses la commande bt (backtrace) pour voir les fonctions appelantes, et peut-etre aussi des p quelque chose pour voir la valeur des variables.

frederic han
Messages : 1137
Inscription : dim. mai 20, 2007 7:09 am
Localisation : Paris
Contact :

Re: open et contexte

Message par frederic han » mar. nov. 16, 2010 10:12 am

Salut,

je suis en 32bits

voila ce que donne bt


Program received signal SIGABRT, Aborted.
[Switching to Thread 0xb6a706c0 (LWP 2967)]
0xb7f2c424 in __kernel_vsyscall ()
(gdb) bt
#0 0xb7f2c424 in __kernel_vsyscall ()
#1 0xb6c6a640 in raise () from /lib/i686/cmov/libc.so.6
#2 0xb6c6c018 in abort () from /lib/i686/cmov/libc.so.6
#3 0xb6e89988 in __gnu_cxx::__verbose_terminate_handler () from libstdc++.so.6
#4 0xb6e87865 in ?? () from libstdc++.so.6
#5 0xb6e878a2 in std::terminate () from libstdc++.so.6
#6 0xb6e879da in __cxa_throw () from libstdc++.so.6
#7 0xb7837d4a in giac::settypeerr (s=@0xbfed7a54) at gen.cc:127
#8 0xb76761fb in giac::unarchive (is=@0xbfedbc9c, contextptr=0x8b9bec8)
at plot.cc:8544
#9 0xb7676556 in giac::unarchive (is=@0xbfedbc9c, contextptr=0x8b9bec8)
at plot.cc:8463
#10 0xb7677a25 in giac::unarchive_session (is=@0xbfedbc9c, level=-1,
replace=@0xbfedbdbc, contextptr=0x8b9bec8) at plot.cc:8832
#11 0xb7677ef1 in giac::unarchive_session_string (s=@0xbfedbdcc, level=-1,
replace=@0xbfedbdbc, contextptr=0x8b9bec8) at plot.cc:8848
#12 0x080c142a in xcas::Xcas_pack_insert (pack=0x8b9bb90,
chaine=0x8b9c1a4 "// fltk 7Fl_Tile 29 70 854 31 20 0\n[\n// fltk N4xcas23Comment_Multiline_InputE 29 70 854 30 20 0\nMethode de Newton pour trouver une valeur approchee de sqrt(2)\n,\n// fltk N4xcas10Log_OutputE 29 100 854 "...,
length=34132, before_position=12) at Xcas1.cc:2266
#13 0x0808d5b1 in xcas::History_Pack::insert_url (this=0x8b9bb90,
urlname0=0x8b9bf34 "newton.xws", before_position=-1) at History.cc:1716
---Type <return> to continue, or q <return> to quit---
#14 0x0806823e in load_filename (filename=0x8b9bf34 "newton.xws",
modified=false) at hist.cxx:559
#15 0x0806bfd3 in cb_Insert_Example (w=0x89928b8) at hist.cxx:632
#16 0x081c1469 in Fl_Menu_::picked ()
#17 0x081c1765 in Fl_Menu_Bar::handle ()
#18 0x081b2634 in send ()
#19 0x081b2a2d in Fl_Group::handle ()
#20 0x081ac2a4 in send ()
#21 0x081accd5 in Fl::handle ()
#22 0x081d74dd in fl_handle ()
#23 0x081d752e in do_queued_events ()
#24 0x081d776b in fl_wait ()
#25 0x081ad724 in Fl::wait ()
#26 0x081ad7aa in Fl::wait ()
#27 0x08074fba in Xcas_run (argc=1, argv=0xbfedca44) at hist.cxx:4997
#28 0x080766ee in main (argc=Cannot access memory at address 0xb97
) at hist.cxx:5046
(gdb)

parisse
Messages : 5731
Inscription : mar. déc. 20, 2005 4:02 pm
Contact :

Re: open et contexte

Message par parisse » mar. nov. 16, 2010 12:03 pm

bon, ca se precise, il faudrait qu'apres avoir fait bt, tu fasses f 8 (qui te place alors dans la trame d'appel no 8 ) puis utiliser la commande p (ou la commande v pour les variables de type gen) pour voir les valeurs des variables au moment de l'erreur. Chez moi, plot.cc:8544 correspond a switch(type){ case _INT_: ...
et je ne vois pas bien pourquoi ca fait une erreur a cet endroit, p type pourrait renseigner sur le type lu, mais c'est possible que chez toi ce ne soit pas cette ligne-la si plot.cc a change.

frederic han
Messages : 1137
Inscription : dim. mai 20, 2007 7:09 am
Localisation : Paris
Contact :

Re: open et contexte

Message par frederic han » jeu. nov. 18, 2010 12:35 pm

Bon j'ai recommence avec la version d'hier, la ligne a change.

C'est dans plot.cc:
unarchive_SYMB

8456 gen f=unarchive(is,contextptr)

et la 8537 vaut:

settypeer("End of stream") dans gen unarchive


Ca aide?

Fred






Starting program: /home/fred/xcas090/xcas.bin
[Thread debugging using libthread_db enabled]
// Using locale /home/fred/xcas090/share/locale
// [New Thread 0xb6a166c0 (LWP 3187)]
terminate called after throwing an instance of 'std::runtime_error'
what(): End of stream Error: Bad Argument Type

Program received signal SIGABRT, Aborted.
[Switching to Thread 0xb6a166c0 (LWP 3187)]
0xb7fe0424 in __kernel_vsyscall ()
(gdb) bt
#0 0xb7fe0424 in __kernel_vsyscall ()
#1 0xb6c10640 in raise () from /lib/i686/cmov/libc.so.6
#2 0xb6c12018 in abort () from /lib/i686/cmov/libc.so.6
#3 0xb6e2f988 in __gnu_cxx::__verbose_terminate_handler () from libstdc++.so.6
#4 0xb6e2d865 in ?? () from libstdc++.so.6
#5 0xb6e2d8a2 in std::terminate () from libstdc++.so.6
#6 0xb6e2d9da in __cxa_throw () from libstdc++.so.6
#7 0xb78350fa in giac::settypeerr (s=@0xbfe92884) at gen.cc:121
#8 0xb767792b in giac::unarchive (is=@0xbfe96acc, contextptr=0x99ab078)
at plot.cc:8537
#9 0xb7677c86 in giac::unarchive (is=@0xbfe96acc, contextptr=0x99ab078)
at plot.cc:8456
#10 0xb7679155 in giac::unarchive_session (is=@0xbfe96acc, level=-1,
replace=@0xbfe96bec, contextptr=0x99ab078) at plot.cc:8825
#11 0xb7679621 in giac::unarchive_session_string (s=@0xbfe96bfc, level=-1,
replace=@0xbfe96bec, contextptr=0x99ab078) at plot.cc:8841
#12 0x080c1fda in xcas::Xcas_pack_insert (pack=0x99b9738,
chaine=0x99ba0fc "// fltk 7Fl_Tile 29 70 854 31 20 0\n[\n// fltk N4xcas23Comment_Multiline_InputE 29 70 854 30 20 0\nMethode de Newton pour trouver une valeur approchee de sqrt(2)\n,\n// fltk N4xcas10Log_OutputE 29 100 854 "...,
length=34132, before_position=12) at Xcas1.cc:2266
#13 0x0808d611 in xcas::History_Pack::insert_url (this=0x99b9738,
urlname0=0x99a5abc "newton.xws", before_position=-1) at History.cc:1716
---Type <return> to continue, or q <return> to quit---
#14 0x08065afe in load_filename (filename=0x99a5abc "newton.xws",
modified=false) at hist.cxx:559
#15 0x0806c013 in cb_Insert_Example (w=0x97afca8) at hist.cxx:632
#16 0x081c16f9 in Fl_Menu_::picked ()
#17 0x081c19f5 in Fl_Menu_Bar::handle ()
#18 0x081b28c4 in send ()
#19 0x081b2cbd in Fl_Group::handle ()
#20 0x081ac534 in send ()
#21 0x081acf65 in Fl::handle ()
#22 0x081d776d in fl_handle ()
#23 0x081d77be in do_queued_events ()
#24 0x081d79fb in fl_wait ()
#25 0x081ad9b4 in Fl::wait ()
#26 0x081ada3a in Fl::wait ()
#27 0x08078e9a in Xcas_run (argc=1, argv=0xbfe97874) at hist.cxx:4997
#28 0x0807a5ce in main (argc=Cannot access memory at address 0xc73
) at hist.cxx:5046
(gdb) f 8
#8 0xb767792b in giac::unarchive (is=@0xbfe96acc, contextptr=0x99ab078)
at plot.cc:8537
8537 plot.cc: No such file or directory.
in plot.cc
(gdb) p
The history is empty.
(gdb) p type
$1 = <value optimized out>
(gdb) g
Ambiguous command "g": gcore, generate-core-file.
(gdb) p 9
$2 = 9
(gdb) f 9
#9 0xb7677c86 in giac::unarchive (is=@0xbfe96acc, contextptr=0x99ab078)
at plot.cc:8456
8456 in plot.cc
(gdb) p
$3 = 9
(gdb) p istream
Attempt to use a type name as an expression
(gdb) p is
$4 = (istream &) @0xbfe96acc: <incomplete type>
(gdb) f 8
#8 0xb767792b in giac::unarchive (is=@0xbfe96acc, contextptr=0x99ab078)
at plot.cc:8537
8537 in plot.cc
(gdb) p is
$5 = (istream &) @0xbfe96acc: <incomplete type>
(gdb)

parisse
Messages : 5731
Inscription : mar. déc. 20, 2005 4:02 pm
Contact :

Re: open et contexte

Message par parisse » jeu. nov. 18, 2010 1:59 pm

Bizarre, ca veut dire qu'il essaie de lire apres la fin du fichier.
Il y a peut-etre encore une manip que tu peux faire, c'est compiler avec -g mais pas avec -O2 pour pouvoir afficher reellement les valeurs des variables. Tu peux aussi utiliser gdb dans emacs si tu utilises emacs comme editeur ou par l'intermediaire de ddd, ca facilite le debug, mais j'ai peur que ca necessite de mettre en place un point d'arret. Une autre solution serait que tu me donnes un acces a ta machine pour que je debugue a distance.
(Chez moi newton.xws se charge).

Répondre