# Pl-fli.c line 2556 error

**URL:** <https://swi-prolog.discourse.group/t/pl-fli-c-line-2556-error/4748>\
**Category:** Help!\
**Created:** [December 11, 2021, 10:59pm UTC](https://swi-prolog.discourse.group/t/pl-fli-c-line-2556-error/4748 "2021-12-11T22:59:19Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![ferdasonmez](https://yyz2.discourse-cdn.com/free1/user_avatar/swi-prolog.discourse.group/ferdasonmez/32/3578_2.png) [@ferdasonmez](https://swi-prolog.discourse.group/u/ferdasonmez)\
**Post date:** [December 11, 2021, 10:59pm UTC](https://swi-prolog.discourse.group/t/pl-fli-c-line-2556-error/4748/1 "2021-12-11T22:59:19Z")

</div>

Hi,  
In order to use the latest web related additions to the software I reinstalled the swipl last week. Now I am getting this error in pl-fli.c file on line 2556. Version is 8.5.3  
I thought this is a debug code, but not sure. Is there anybody who can create a new build which would not cause this error?

Line 2555 → else  
Line 2556 → assert(0);

Kind Regards,  
Ferda

---

<div class="post-metadata">

**Author:** ![jan](https://yyz2.discourse-cdn.com/free1/user_avatar/swi-prolog.discourse.group/jan/32/4_2.png) [@jan](https://swi-prolog.discourse.group/u/jan)\
**Post date:** [December 12, 2021, 8:20am UTC](https://swi-prolog.discourse.group/t/pl-fli-c-line-2556-error/4748/2 "2021-12-12T08:20:26Z")

</div>

It seems something is calling PL\_put\_chars() with an invalid value for `flags`. On many systems it produces a stack trace which should give a fair indication where the problem is.

---

<div class="post-metadata">

**Author:** ![ferdasonmez](https://yyz2.discourse-cdn.com/free1/user_avatar/swi-prolog.discourse.group/ferdasonmez/32/3578_2.png) [@ferdasonmez](https://swi-prolog.discourse.group/u/ferdasonmez)\
**Post date:** [December 12, 2021, 12:22pm UTC](https://swi-prolog.discourse.group/t/pl-fli-c-line-2556-error/4748/3 "2021-12-12T12:22:01Z")

</div>

Hello Jan,  
This prolog call of mine was working all right, I didn’t change a bit both in the call and in the pl file.  
This is the line where I get the error  
prolog.consult(’./graph\_traversal.pl’)  
I temporarily returned to an earlier version (left the web version) to be able to run something.  
Do you have an idea? Please help…  
Kind Regards,  
Ferda

---

<div class="post-metadata">

**Author:** ![ferdasonmez](https://yyz2.discourse-cdn.com/free1/user_avatar/swi-prolog.discourse.group/ferdasonmez/32/3578_2.png) [@ferdasonmez](https://swi-prolog.discourse.group/u/ferdasonmez)\
**Post date:** [December 12, 2021, 1:14pm UTC](https://swi-prolog.discourse.group/t/pl-fli-c-line-2556-error/4748/4 "2021-12-12T13:14:31Z")

</div>

Hello Again,  
I return to the web version again. Using the PrologMQI, now I can consult with the very same file. Not getting this error (pl-fli.c ). This is why I don’t think it is a pl file problem.  
Cause, as I mentioned before installing latest swipl, this pl file was also working when called using the prolog class(not mqi).

I had a problem with MQI version, I will ask this in another question.

Kind Regards,  
Ferda

---

<div class="post-metadata">

**Author:** ![jan](https://yyz2.discourse-cdn.com/free1/user_avatar/swi-prolog.discourse.group/jan/32/4_2.png) [@jan](https://swi-prolog.discourse.group/u/jan)\
**Post date:** [December 12, 2021, 3:00pm UTC](https://swi-prolog.discourse.group/t/pl-fli-c-line-2556-error/4748/5 "2021-12-12T15:00:15Z")

</div>

There are two likely problems. If you upgraded from a rather old version you probably have to rebuild the MQI interface (`?- pack_rebuild(mqi).`) If that doesn’t sole it, a bug in the MQI code is the most likely cause. Anyway, to get help we’d need the old version of Prolog for which it worked and the OS to give further hints.

---

<div class="post-metadata">

**Author:** ![ferdasonmez](https://yyz2.discourse-cdn.com/free1/user_avatar/swi-prolog.discourse.group/ferdasonmez/32/3578_2.png) [@ferdasonmez](https://swi-prolog.discourse.group/u/ferdasonmez)\
**Post date:** [December 12, 2021, 3:25pm UTC](https://swi-prolog.discourse.group/t/pl-fli-c-line-2556-error/4748/6 "2021-12-12T15:25:23Z")

</div>

Hi,  
The thing is pl file was working in the old version (which I uninstalled). Unfortunetely I do not know the version, I didn’t saved the set-up file.

Nevertheless, in its current form it works when I call with MQI, but not running using the Prolog.consult method (I returned to this form temporarily to execute the code for some numbers).  
For me, currently, I am trying to convert everything to the MQI version so that I would not need to call the Prolog.consult again. Hopefully it works.  
**I think this error on line 2556 is not due to specific pl file but something else**. This pl was working before the latest installation using the Prolog.consult and it still works using the MQI. Anyway, may be you can check when you have time.  
Kind Regards,  
Ferda

---

<div class="post-metadata">

**Author:** ![jan](https://yyz2.discourse-cdn.com/free1/user_avatar/swi-prolog.discourse.group/jan/32/4_2.png) [@jan](https://swi-prolog.discourse.group/u/jan)\
**Post date:** [December 12, 2021, 3:39pm UTC](https://swi-prolog.discourse.group/t/pl-fli-c-line-2556-error/4748/7 "2021-12-12T15:39:47Z")

</div>

> [@ferdasonmez](#):
>
> **I think this error on line 2556 is not due to specific pl file but something else**

You still didn’t share the error, nor the OS you are using. But yes, assuming this is a crash on an assertion error, the reason is probably a broken foreign extension, probably from the MQI package. The full crash message might reveal a clue.

---

<div class="post-metadata">

**Author:** ![ferdasonmez](https://yyz2.discourse-cdn.com/free1/user_avatar/swi-prolog.discourse.group/ferdasonmez/32/3578_2.png) [@ferdasonmez](https://swi-prolog.discourse.group/u/ferdasonmez)\
**Post date:** [December 21, 2021, 6:35pm UTC](https://swi-prolog.discourse.group/t/pl-fli-c-line-2556-error/4748/8 "2021-12-21T18:35:06Z")

</div>

Hi Jan,  
I returned to the working version. Sorry, I am writing late. You can take this issue as resolved, cause there is not way I can reproduce it now.

Kind Regards,  
Ferda
