Menu

#205 undefined token error when opening project with fitted curve

1.20
closed
General (153)
4normal
2017-08-08
2011-05-07
Balazs Rudd
No

If I open a scidavid project containing fits I get the error message found in the attachment and the fitted curves disappear from my graphs, I have to refit them all. I also receive the same error if I try to manipulate a fit: e.g. I have a data set ranging from x=0 to x=50, I do a linear fit to the region x=[25,40] and later through edit function I want to make the fitted line to be displayed from x=[10,40] instead of drawing the line longer I am greeted with the same "undefined token" message. Same behaviour on kubuntu 11.04 and recent mageia (mandriva). As I have been using scidavis 2.4 without any problems in mandriva 2010.1 I think this is a problem with some newer qt library scidavis depends on. Same error messages in recent qtiplot too. If anybody with knowledge about scidavis program internals points me in the right direction I would be glad to help hunting down the cause.
Thanks!

Discussion

1 2 > >> (Page 1 of 2)
  • Balazs Rudd

    Balazs Rudd - 2011-05-07
     
  • Balazs Rudd

    Balazs Rudd - 2011-05-07
    • assigned_to: nobody --> knut_f
     
  • Fellype

    Fellype - 2011-05-11
    • labels: --> General
     
  • Fellype

    Fellype - 2011-05-11

    The problem when opening projects with fits occurs only if you are using muParser 1.34. If possible, downgrade your muParser to version 1.32. I think that only SciDAVis and QtiPlot depends on muParser in Mageia and (K/X) Ubuntu, then a downgrade will not cause other problems.

     
  • Fellype

    Fellype - 2011-05-11

    Information that was missing: SciDAVis must be recompiled with muParser 1.32 to work properly.

     
  • Balazs Rudd

    Balazs Rudd - 2011-05-12

    Hi fellype!
    Thank you! That solved it. I rebuilt the mageia rpm with muparser 1.32 and the error is gone. Just out of curiosity do we know the exact culprit? Is this a muparser bug, or has to do something with these changes?
    "Changes:
    The prefix needed for parsing hex values is now "0x" and no longer "$".
    AddValIdent reintroduced into the DLL interface."

     
  • Fellype

    Fellype - 2011-05-13

    Hi blas88!
    Sorry, but I'm not the right man to answer your question. I discovered the origin of the problem because I know that muparser is the default parsing tool used by scidavis' internal functions, and all them were working with version 1.32.

     
  • Emmanuel Favre-Nicolin

    I have the same problem here on archlinux. Just posting to get upgrade/news...

     
  • Anonymous

    Anonymous - 2011-06-14

    I tried to rebuild scidavis after downgrading libmuparser0 1.34-1 to 1.32-1, but then I get the error:

    scidavis: undefined symbol: _ZN2mu10ParserBase10DefineOprtERKSsPFdddEjNS_18EOprtAssociativityEb

    and the program crashes upon start. I had to upgrade back to 1.34-1 to get the program working again. What is the correct procedure to downgrade and recompile scidavis? I'm using Kubuntu Natty (11.04).

     
  • High Performance Coder

    • Group: v0.2.4 --> 1.D1
    • Priority: 5 --> normal
     
  • High Performance Coder

    Verified, with error message

    PolyFit1:0

    Undefined token "; a1=-0.00579127080471151; a2=6.11422720269446e-05; a0+a1x+a2x^2 " found at position 20.

     
  • High Performance Coder

    • Priority: normal --> 4normal
     
  • Diego

    Diego - 2013-11-21

    I have the same problem, and, sometimes a lost my plots
    "No LinealAjustar1:0

    Unexpected token "; b=0.0833495478230434; a*x^b " found at position 19."

     
  • High Performance Coder

    • Group: 1.D1 --> 1.D3
     
  • High Performance Coder

    • Group: 1.D3 --> 1.D5
     
  • Cunio

    Cunio - 2014-03-23

    I'm confirming, the bug is still there. I get it whenever I try to load project with at least one linear line fitted. Very frustraiting - have to refit the curves every time I load a project.

    Jacek

     
  • High Performance Coder

    • Group: 1.D5 --> next
     
  • Robert Bienert

    Robert Bienert - 2014-08-17

    If downgrading muParser does not work (e.g. using SciDAVis from a Linux distro), you can also fix the project file using a simple text editor. Search for the <formula> elements. Typically you find something like (example for a linear fit):

    B=0.0446665837245147
    A=0.00246703235712407
    
    A*x+B
    

    Replace it by inserting the coefficients into the function:

    0.00246703235712407*x+0.0446665837245147
    

    Annotation: You can also right-click on the graphic, select Add/Remove Curve and then Edit Function in the Graph contents box.

     

    Last edit: Robert Bienert 2014-08-19
  • Emmanuel Favre-Nicolin

    This bug is still valid for version 1.D8. It is also not possible to create a function with parameters, using the same syntax of custom functions obtained through the function "fit wizard".

     

    Last edit: Emmanuel Favre-Nicolin 2014-09-25
  • High Performance Coder

    As Fellype noticed, this seems to be a problem with muParser.

    In FunctionCurve::LoadData, the input function "B=???\nA=???\n\nAx+B\n" is translated into "B=???;A=???;Ax+B;" somewhere. I couldn't see the change happening within scidavis code, so I assume it is within MuParser. Then MuParser does not know what to do with the semicolons, even though ; has been defined as a statement separator.

    At this point, we need to build a debug version of muparser, and debug our way through the muparser code to figure out what is going on.

     
  • High Performance Coder

    I tracked the problem down to a bug in muParser. The real problem is that muParser incorrectly uses the term "infix operator" to refer to prefix operators, and because of this usage, someone mistakenly validated against ValidInfixOprtChars() instead of ValidOprtChars().

    I have attached a patch, which works against the latest muParser (v2.2.3).

    The question is how quickly this patch can be integrated into the muParser baseline.

     
  • High Performance Coder

    • status: open --> pending
     
  • High Performance Coder

    I have committed a workaround to the muparser bug to the scidavis SVN repository.

    I have checked that this seems to solve the problem, but haven't checked if it breaks builds against old muparser libraries.

    Hence I have marked this issue as pending, rather than closed.

     
  • Sawik

    Sawik - 2015-11-24

    I've noticed, that the same eror message appears, when during fitting I've checked an option to set a parameter as "constant", using scidavis 1.D8.

     
  • High Performance Coder

    • status: pending --> closed
    • Group: next --> 1.20
     
1 2 > >> (Page 1 of 2)

Log in to post a comment.