[Scilab-users] Scilab 6.0.1 crashes with printf command

classic Classic list List threaded Threaded
6 messages Options
Rafael Guerra Rafael Guerra
Reply | Threaded
Open this post in threaded view
|

[Scilab-users] Scilab 6.0.1 crashes with printf command

Dear Scilabers,

Any clues on why the following command totally crashes Scilab 6.0.1 on Win7:
--> printf("A = B ./(C+%%eps)   (to avoid division by 0)\n");

while in Scilab 5.5.2 escapes % and outputs properly:
 A = B ./(C+%eps)   (to avoid division by 0)

How to escape % in Scilab 6.0.1's printf?

PS:
one workaround is to: printf("A = B ./(C+%seps)   (to avoid division by 0)\n","%")
but it looks weird...

Regards,
Rafael

_______________________________________________
users mailing list
[hidden email]
http://lists.scilab.org/mailman/listinfo/users
Heinz Nabielek-3 Heinz Nabielek-3
Reply | Threaded
Open this post in threaded view
|

Re: Scilab 6.0.1 crashes with printf command

On 03.09.2018, at 22:30, Rafael Guerra <[hidden email]> wrote:
>
> printf("A = B ./(C+%%eps)   (to avoid division by 0)\n");

Same on Mac OS X Scilab 6.0.1....
Heinz


"Scilb quit unexpectedly"
Process:               scilab-bin [985]
Path:                  /Applications/scilab-6.0.1.app/Contents/MacOS/bin/scilab-bin
Identifier:            org.scilab.modules.jvm.Scilab
Version:               0
Code Type:             X86-64 (Native)
Parent Process:        ??? [939]
Responsible:           scilab-bin [985]
User ID:               501

Date/Time:             2018-09-03 22:35:11.218 +0200
OS Version:            Mac OS X 10.14 (18A377a)

_______________________________________________
users mailing list
[hidden email]
http://lists.scilab.org/mailman/listinfo/users
Philippe Roux Philippe Roux
Reply | Threaded
Open this post in threaded view
|

Re: Scilab 6.0.1 crashes with printf command

In reply to this post by Rafael Guerra
Le 03/09/2018 à 22:30, Rafael Guerra a écrit :
> Dear Scilabers,
>
> Any clues on why the following command totally crashes Scilab 6.0.1 on Win7:
> --> printf("A = B ./(C+%%eps)   (to avoid division by 0)\n");


first note that printf is obsolete in scilab-6.0.0 and will be removed
in scilab-6.1.0. But I confirm this the same behavior  with mprintf and
scilab-6.0.1 in ubuntu 18.04.1. Additional console message below if this
can help.

Best regards,

Philippe

Une erreur fatale a été détectée par Scilab.
Veuillez vérifier les fonctions définies par l'utilisateur (ou celles
des modules externes), elles devraient apparaître dans le suivi de la pile.
Ou sinon, vous pouvez reporter un bug sur http://bugzilla.scilab.org/ avec :
  * un simple code qui reproduit le problème
  * le résultat de [a, b] = getdebuginfo()
  * l'information suivante :
[jenny-a-03:05851] Signal: Erreur de segmentation (11)
[jenny-a-03:05851] Signal code:  (128)
[jenny-a-03:05851] Failing at address: (nil)

Pile d'appel :
   1: 0x8f260b <JVM_handle_linux_signal>
(/usr/lib/jvm/java-8-openjdk-amd64/jre/lib/amd64/server/libjvm.so)
   2: 0x8e5318 < >
(/usr/lib/jvm/java-8-openjdk-amd64/jre/lib/amd64/server/libjvm.so)
   3: 0x12890  < >
(/lib/x86_64-linux-gnu/libpthread.so.0)
   4: 0x387b9c <scilab_sprintf(std::__cxx11::basic_string<char,
std::char_traits<char>, std::allocator<char> > const&, wchar_t const*,
std::vector<types::InternalType*, std::allocator<types::InternalType*>
>&, int*, int*)> (/usr/lib/scilab/libscilab-cli.so.6)
   5: 0x37c2cb <sci_mprintf(std::vector<types::InternalType*,
std::allocator<types::InternalType*> >&, int,
std::vector<types::InternalType*, std::allocator<types::InternalType*>
>&)> (/usr/lib/scilab/libscilab-cli.so.6)
   6: 0x48be3a
<types::Callable::invoke(std::vector<types::InternalType*,
std::allocator<types::InternalType*> >&,
std::unordered_map<std::__cxx11::basic_string<wchar_t,
std::char_traits<wchar_t>, std::allocator<wchar_t> >,
types::InternalType*, std::hash<std::__cxx11::b>
(/usr/lib/scilab/libsciast.so.6)
   7: 0x1c23fd
<ast::RunVisitorT<ast::ExecVisitor>::visitprivate(ast::CallExp const&)>
(/usr/lib/scilab/libsciast.so.6)
   8: 0x1be9ff
<ast::RunVisitorT<ast::ExecVisitor>::visitprivate(ast::SeqExp const&)>
(/usr/lib/scilab/libsciast.so.6)
   9: 0x1a17c2 <StaticRunner::launch()>
(/usr/lib/scilab/libscilab-cli.so.6)
  10: 0x19a52a <RunScilabEngine>
(/usr/lib/scilab/libscilab-cli.so.6)
  11: 0x19ac   <main>                           (/usr/bin/scilab-bin)
  12: 0x21b97  <__libc_start_main>
(/lib/x86_64-linux-gnu/libc.so.6)
  13: 0x24ca   < >                              (/usr/bin/scilab-bin)
Fin de la pile


_______________________________________________
users mailing list
[hidden email]
http://lists.scilab.org/mailman/listinfo/users
mottelet mottelet
Reply | Threaded
Open this post in threaded view
|

Re: Scilab 6.0.1 crashes with printf command

In reply to this post by Rafael Guerra
Le 03/09/2018 à 22:30, Rafael Guerra a écrit :

> Dear Scilabers,
>
> Any clues on why the following command totally crashes Scilab 6.0.1 on Win7:
> --> printf("A = B ./(C+%%eps)   (to avoid division by 0)\n");
>
> while in Scilab 5.5.2 escapes % and outputs properly:
>   A = B ./(C+%eps)   (to avoid division by 0)
>
> How to escape % in Scilab 6.0.1's printf?
>
> PS:
> one workaround is to: printf("A = B ./(C+%seps)   (to avoid division by 0)\n","%")
> but it looks weird...
>
> Regards,
> Rafael
>
> _______________________________________________
> users mailing list
> [hidden email]
> https://antispam.utc.fr/proxy/1/c3RlcGhhbmUubW90dGVsZXRAdXRjLmZy/lists.scilab.org/mailman/listinfo/users
Hello,

This is http://bugzilla.scilab.org/show_bug.cgi?id=15441, it has been
fixed on branch-6.0 and master:

http://gitweb.scilab.org/?p=scilab.git;a=commit;h=dd4dd2c315bbb4989ed25f631d7e887b0ed70c44

S.
_______________________________________________
users mailing list
[hidden email]
http://lists.scilab.org/mailman/listinfo/users
Rafael Guerra Rafael Guerra
Reply | Threaded
Open this post in threaded view
|

Re: Scilab 6.0.1 crashes with printf command

Stephane,

Thanks for the bugzilla reference, which I was surprised to see as I have searched there before posting, with search strings like %% but it produced no results...
This raises my next question: how to seach Bugzilla for "%%" string?

Regards,
Rafael

_______________________________________________
users mailing list
[hidden email]
http://lists.scilab.org/mailman/listinfo/users
Rafael Guerra Rafael Guerra
Reply | Threaded
Open this post in threaded view
|

Re: Scilab 6.0.1 crashes with printf command

The answer to my last question is Samuel's magic uman:
-->  uman -wb "%%"

Forgot to install it in Scilab 6.0, what a mistake.

Regards,
Rafael

-----Original Message-----
From: users <[hidden email]> On Behalf Of Rafael Guerra
Sent: Tuesday, September 04, 2018 7:45 AM
To: Users mailing list for Scilab <[hidden email]>
Subject: Re: [Scilab-users] Scilab 6.0.1 crashes with printf command

Stephane,

Thanks for the bugzilla reference, which I was surprised to see as I have searched there before posting, with search strings like %% but it produced no results...
This raises my next question: how to seach Bugzilla for "%%" string?

Regards,
Rafael


_______________________________________________
users mailing list
[hidden email]
http://lists.scilab.org/mailman/listinfo/users