Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem processing repeated calls #60

Open
jal-frezie opened this issue Aug 7, 2023 · 3 comments
Open

Problem processing repeated calls #60

jal-frezie opened this issue Aug 7, 2023 · 3 comments

Comments

@jal-frezie
Copy link

I noticed a bug in Simile when the application's Prolog executable is built with the current gprolog. When dragging a link onscreen to reroute it, the movement stops before the end of the drag. During the drag, each mouse event generates a call to a Prolog predicate to update the link route, and after a few thousand in succession they start failing when they should succeed.

Due to the nature of the problem it's almost impossible to debug it analytically, but I have done a git bisect to find the point at which the bug appeared. Here's the result:

35eb271 is the first bad commit
commit 35eb271
Author: Daniel Diaz [email protected]
Date: Tue May 23 16:42:00 2023 +0200

More improvement on dynamic predicate support. Add option OPTIM_FIRST_FOR_SCAN and
improve pl2wam compiler accordingly (read_file.pl).

src/BipsPl/dynam_supp.c | 564 ++++++++++++++++++++++++++---------------------
src/BipsPl/dynam_supp.h | 21 +-
src/BipsPl/t.pl | 90 ++++++--
src/Linedit/terminal.c | 3 +-
src/Pl2Wam/read_file.pl | 19 +-
src/Pl2Wam/read_file.wam | 300 +++++++++++++------------
6 files changed, 569 insertions(+), 428 deletions(-)

Not sure where to go from here, any suggestions? Meanwhile I will be building Simile for Linux with the last commit before this one (test done on x86_64, Ubuntu Lunar)

@didoudiaz
Copy link
Owner

didoudiaz commented Aug 7, 2023

(I'm currently on holidays so I answer quickly)
Try to change in BipsPl/dynam_supp.h:40 the #if 1 by #if 0 then (in src/):

make clean
make

If the bug persists, modify BipsPl/dynam_supp.c:72 to increase MAX_SKIP_BEFORE_CLEAN, for instance 10000. Again

make clean
make

@jal-frezie
Copy link
Author

Thanks very much, the first change you suggested worked!

Just as well because I don't see any reference to MAX_SKIP_BEFORE_CLEAN in BipsPl/dynam_supp.h

@didoudiaz
Copy link
Owner

It is in dynam_supp.c (updated)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants