Problem with relative addressing

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
33 messages Options
12
Reply | Threaded
Open this post in threaded view
|

Problem with relative addressing

Philip
I just installed Version: 2.2.0-rc1 for Windows.  There is a problem with relative addressing.  When specifying a negative distance I get a Syntax Error.

For example, I select the line tool, 2 point.  Select my first position by snap or absolute position. Then if I want to move downward (@0,-5) I get the error.  If I want to move to the left (@-3,0) I get the error.  Positive amounts work normally (@2,6, @0,3) but not the negative.

Any suggestions.  
Reply | Threaded
Open this post in threaded view
|

Re: Problem with relative addressing

Philip
The same is true with polar addressing: negative numbers not allowed.  @1<-90 gets an error but @1<270 works.
Reply | Threaded
Open this post in threaded view
|

Re: Problem with relative addressing

dellus
I cannot reproduce this, works as it should, Windows version too.
Reply | Threaded
Open this post in threaded view
|

Re: Problem with relative addressing

Gary S
I can create the same error as mentioned above.  In a new drawing I created a two point line starting at 0,0 and attempted to complete it with @2,-5 and then again with @2<-90.  Both result in the error:
Command line error

I also tried @2,5 and then again with @2<90 and both worked correctly and the line segment was completed.


Version: 2.2.0-rc1
Compiler: GNU GCC 6.3.0
Compiled on: Mar 13 2018
Qt Version: 5.7.1
Boost Version: 1.62.0
System: Debian GNU/Linux 9 (stretch)
Reply | Threaded
Open this post in threaded view
|

Re: Problem with relative addressing

LordOfBikes
Administrator
This works for me too, with the latest 2.2.0-rc1-19.
I tried both, negative on the alpha keys and on the num pad, both worked.
Have you tried both keys too?

Maybe it's related with language settings. Which language settings do you have?

The command line is parsed with the muparser library, where we haven't any changes for a while now. So I assume this is not related to recent source code changes.


Armin
investing less than half an hour into Search function can save hours or days of waiting for a solution
Reply | Threaded
Open this post in threaded view
|

Re: Problem with relative addressing

Philip
I tried both sets of keys, keypad and upper row, and had the same result.  Also, the calc command no longer works.  Returns "Unknown command."  My language is US English.  My computer is a Lenovo Ideapad 320.

I can reinstall version 2.1.3 and everythings works.
Reply | Threaded
Open this post in threaded view
|

Re: Problem with relative addressing

Gary S
I'm using "English, Canada  UTF-8" for the system and "English" within LibreCAD's application preferences.  Also, I have a second PC where I'm running 2.2.0-alpha and it generates the same errors.  I also tried setting the application preferences to german for the command line language with the same resulting errors.
 

Version: 2.2.0-alpha
Compiler: GNU GCC 5.4.0
Compiled on: May 31 2017
Qt Version: 5.5.1
Boost Version: 1.58.0
System: Linux Mint 18.3
Reply | Threaded
Open this post in threaded view
|

Re: Problem with relative addressing

LordOfBikes
Administrator
I already feared that

So I have to look if there are already some debug messages which may help or if we have to implement an error message which gives more information about the cause of this.

Armin
investing less than half an hour into Search function can save hours or days of waiting for a solution
Reply | Threaded
Open this post in threaded view
|

Re: Problem with relative addressing

LordOfBikes
Administrator
I've made a windows executable with some debug output in the command history, as I can't reproduce this.
You can use this download link: http://download.librecad.de/LibreCAD_2.2.0rc1-debug.exe

Copy the file into your LibreCAD application folder (where the regular installed files are) and run it.
Then test the relative inputs and share the output in the command history.
Copy/paste should work for this.

Armin
investing less than half an hour into Search function can save hours or days of waiting for a solution
Reply | Threaded
Open this post in threaded view
|

Re: Problem with relative addressing

Gary S
I download and compiled RC1 on Debian.  Is the debug code available on github?
Reply | Threaded
Open this post in threaded view
|

Re: Problem with relative addressing

LordOfBikes
Administrator
No, these changes will not go to github repo, it's only for bug hunting.

If you know how to work with git, you can apply this patch: RelativeDebug.patch

If you need help with git, we can give it a try.

Armin
investing less than half an hour into Search function can save hours or days of waiting for a solution
Reply | Threaded
Open this post in threaded view
|

Re: Problem with relative addressing

Gary S
No, I don't know how to use git, but Mr Google helped...

I applied the patch [xxx@debVM:~/dev/LibreCAD$ git apply ../../Downloads/RelativeDebug.patch] and then ran qmake -r.  Here is the output:

   xxx@debVM:~/dev/LibreCAD$ qmake -r
   Project MESSAGE: We will be using CPP11 features
   Reading /home/xxx/dev/LibreCAD/libraries/libraries.pro
   Project MESSAGE: Using external muparser lib
    Reading /home/xxx/dev/LibreCAD/libraries/libdxfrw/libdxfrw.pro
    Reading /home/xxx/dev/LibreCAD/libraries/jwwlib/jwwlib.pro
   Project ERROR: Unknown module(s) in QT: svg

I did compile LibreCAD successfully prior to applying the patch.
Reply | Threaded
Open this post in threaded view
|

Re: Problem with relative addressing

LordOfBikes
Administrator
Running qmake -r doesn't use any source files, only the pro files. And pro files were not touched by the patch.

This looks like an issue with Qt. Maybe you have uninstalled accidentally the Qt SVG libs or switched to another Qt version?

Here is a solution for the library issue: https://stackoverflow.com/questions/21098805/unknown-modules-in-qt-svg/21100312

You can check the Qt version used with:
qmake -version

Many thanks for your efforts.

Armin
investing less than half an hour into Search function can save hours or days of waiting for a solution
Reply | Threaded
Open this post in threaded view
|

Re: Problem with relative addressing

Philip
In reply to this post by LordOfBikes
LordOfBikes wrote
I've made a windows executable with some debug output in the command history, as I can't reproduce this.
You can use this download link: http://download.librecad.de/LibreCAD_2.2.0rc1-debug.exe

Copy the file into your LibreCAD application folder (where the regular installed files are) and run it.
Then test the relative inputs and share the output in the command history.
Copy/paste should work for this.

Armin
I downloaded the file and then copied it to C:\Program Files (x86)\LibreCAD.  When I ran it, it could not find some DLL files.  For example, QT5Cored.dll.  I copied QT5Core.dll and named it QT5Cored.dll.  I did this for several DLL files.  Then I ran the program.  Nothing happened.  I started LibreCAD (version 2.2.0rc1) and I did not notice any difference.  Did I do something wrong?
Reply | Threaded
Open this post in threaded view
|

Re: Problem with relative addressing

Gary S
In reply to this post by LordOfBikes
Yeah, I broke my Qt install when I attempted an update a while back.  So now that I've fixed that...

I recompiled it, ran it and the output at the command line is:
   li
   Command: li (line)
   0,0
   10,10
   @2,5
   relative cartesian input detected: [40322c35]
   comma: 2  X 2 [ok]  Y 5 [ok]
   @-5,2
   relative cartesian input detected: [402d352c32]
   comma: 3  X 0 [fail]  Y 2 [ok]
   Expression Syntax Error: no relative coordinate input
   @5,-2
   relative cartesian input detected: [40352c2d32]
   comma: 2  X 5 [ok]  Y 0 [fail]
   Expression Syntax Error: no relative coordinate input
Reply | Threaded
Open this post in threaded view
|

Re: Problem with relative addressing

LordOfBikes
Administrator
@Philip, the QT5Cored.dll is the debug version of QT5Core.dll, seems to be my fault, I sent you a debug exe file. I surely switched something to release build, but don't know what now.

@Gary_S, well done! Sadly, this is not what I hoped to see. This eliminates issues in LibreCAD code, as everything looks fine, no character code issue. Have to dig deeper into muparser library then.

Armin
investing less than half an hour into Search function can save hours or days of waiting for a solution
Reply | Threaded
Open this post in threaded view
|

Re: Problem with relative addressing

Philip
LordOfBikes wrote
@Philip, the QT5Cored.dll is the debug version of QT5Core.dll, seems to be my fault, I sent you a debug exe file. I surely switched something to release build, but don't know what now.

@Gary_S, well done! Sadly, this is not what I hoped to see. This eliminates issues in LibreCAD code, as everything looks fine, no character code issue. Have to dig deeper into muparser library then.

Armin
I did not receive a new file.  Will it be by email, message, etc?  I have checked my spam folder.
Reply | Threaded
Open this post in threaded view
|

Re: Problem with relative addressing

LordOfBikes
Administrator
I didn't sent you a new file. I meant the file download contains a debug exe file. That's why it missed Qt5Cored.dll.

As Gary_S posted what I was looking for, I didn't make a new windows file for you.
I don't expect different result from windows executable.

We can give it a new try when I've added some more output in muparser library.
I'll give you a note here when it is ready.

Armin
investing less than half an hour into Search function can save hours or days of waiting for a solution
Reply | Threaded
Open this post in threaded view
|

Re: Problem with relative addressing

Philip
OK.  I misread your post.  Thank you for all the work you put into this.
Reply | Threaded
Open this post in threaded view
|

Re: Problem with relative addressing

Gary S
This post was updated on .
In reply to this post by LordOfBikes
FWIW...

I noted when I compiled LibreCAD that it was "Using external muparser".  I looked at the last modified date of muparser (/usr/lib/x86_64-linux-gnu//usr/lib/x86_64-linux-gnu/libmuparser.so.2.2.3) and it is 23 Aug 2015.  I used a previous version of LibreCAD (prior to 2.2.0 alpha/RC1 - what was/is available via the Ubuntu PPA, 2.1.x maybe), but that was certainly a version released since 2015.  The earlier version of LibreCAD doesn't have this problem.

Update: I removed the 2.2.0 alpha and reinstalled the version from the repository (v 2.0.9).  Removing 2.2.0 also removed muparser. (I check the lib directory before and after), and installing v2.0.9 re-installed the muparser library with the same date of 23 Aug 2015.  I was able to run LibreCAD and drew a few lines with no errors:
   li
   Command: li (line)
   10,10
   @10,10
   @-5,5
   @-5,-5
12