You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As the transcript below demonstrates ford version 6.2.4 crashes when a type-bound procedure binding doesn't include a double colon (::) and the procedure is a specific binding referenced by a generic binding on the same type. The crash disappears if either a double-colon is added to the procedure binding (procedure :: total) or if the generic binding is removed.
% tree
.
├── ford.md
└── src
└── subdomain_m.f90
1 directory, 2 files
% cat ford.md
---
project: Reproducer
% cat src/subdomain_m.f90
module subdomain_m
type subdomain_t
contains
procedure total
generic :: operator(+) => total
end type
interface
module function total(lhs, rhs)
class(subdomain_t), intent(in) :: lhs, rhs
type(subdomain_t) total
end function
end interface
end module
% ford --version
ford version 6.2.4
% ford ford.md
Reading file src/subdomain_m.f90
Processing documentation comments...
Correlating information from different parts of your project...
Creating HTML documentation...
Creating search index: 0%| | 0/4 [00:00<?, ?/s]Error rendering page '/Users/rouson/Repositories/ford-reproducer/doc/type/subdomain_t.html'
Creating search index: 0%| | 0/4 [00:00<?, ?/s]
Traceback (most recent call last):
File "/opt/homebrew/Cellar/ford/HEAD-69c2084/libexec/lib/python3.11/site-packages/ford/output.py", line 290, in html
return self.render(self.data, self.proj, self.obj)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/Cellar/ford/HEAD-69c2084/libexec/lib/python3.11/site-packages/ford/output.py", line 424, in render
return template.render(data, project=project, **{self.payload_key: object})
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/Cellar/ford/HEAD-69c2084/libexec/lib/python3.11/site-packages/jinja2/environment.py", line 1301, in render
self.environment.handle_exception()
File "/opt/homebrew/Cellar/ford/HEAD-69c2084/libexec/lib/python3.11/site-packages/jinja2/environment.py", line 936, in handle_exception
raise rewrite_traceback_stack(source=source)
File "/opt/homebrew/Cellar/ford/HEAD-69c2084/libexec/lib/python3.11/site-packages/ford/templates/type_page.html", line 1, in top-level template code
{% extends "base.html" %}
File "/opt/homebrew/Cellar/ford/HEAD-69c2084/libexec/lib/python3.11/site-packages/ford/templates/base.html", line 151, in top-level template code
{% block body %}
^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/Cellar/ford/HEAD-69c2084/libexec/lib/python3.11/site-packages/ford/templates/type_page.html", line 92, in block 'body'
{{ macros.bound_info(bp) }}
^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/Cellar/ford/HEAD-69c2084/libexec/lib/python3.11/site-packages/jinja2/runtime.py", line 777, in _invoke
rv = self._func(*arguments)
^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/Cellar/ford/HEAD-69c2084/libexec/lib/python3.11/site-packages/ford/templates/macros.html", line 351, in template
{{ binding_summary(bind) }}
^^^^^^^^^^^^^^^
File "/opt/homebrew/Cellar/ford/HEAD-69c2084/libexec/lib/python3.11/site-packages/jinja2/runtime.py", line 777, in _invoke
rv = self._func(*arguments)
^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/Cellar/ford/HEAD-69c2084/libexec/lib/python3.11/site-packages/ford/templates/macros.html", line 284, in template
{{ proc_line(proc, proto=proto) }}
^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/Cellar/ford/HEAD-69c2084/libexec/lib/python3.11/site-packages/jinja2/runtime.py", line 777, in _invoke
rv = self._func(*arguments)
^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/Cellar/ford/HEAD-69c2084/libexec/lib/python3.11/site-packages/ford/templates/macros.html", line 428, in template
{{ deprecated(proc) }}
^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/Cellar/ford/HEAD-69c2084/libexec/lib/python3.11/site-packages/jinja2/runtime.py", line 777, in _invoke
rv = self._func(*arguments)
^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/Cellar/ford/HEAD-69c2084/libexec/lib/python3.11/site-packages/ford/templates/macros.html", line 156, in template
{%- if entity.meta['deprecated'] -%}
^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/Cellar/ford/HEAD-69c2084/libexec/lib/python3.11/site-packages/jinja2/environment.py", line 466, in getitem
return obj[argument]
~~~^^^^^^^^^^
jinja2.exceptions.UndefinedError: 'str object' has no attribute 'meta'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/opt/homebrew/bin/ford", line 8, in <module>
sys.exit(run())
^^^^^
File "/opt/homebrew/Cellar/ford/HEAD-69c2084/libexec/lib/python3.11/site-packages/ford/__init__.py", line 648, in run
main(proj_data, proj_docs, md)
File "/opt/homebrew/Cellar/ford/HEAD-69c2084/libexec/lib/python3.11/site-packages/ford/__init__.py", line 632, in main
docs = ford.output.Documentation(proj_data, proj_docs_, project, page_tree)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/Cellar/ford/HEAD-69c2084/libexec/lib/python3.11/site-packages/ford/output.py", line 189, in __init__
self.tipue.create_node(p.html, p.loc, p.meta)
^^^^^^
File "/opt/homebrew/Cellar/ford/HEAD-69c2084/libexec/lib/python3.11/site-packages/ford/output.py", line 292, in html
raise RuntimeError(
RuntimeError: Error rendering 'subdomain_t.html' for 'subdomain_t' : 'str object' has no attribute 'meta'
The text was updated successfully, but these errors were encountered:
As the transcript below demonstrates
ford
version 6.2.4 crashes when a type-bound procedure binding doesn't include a double colon (::
) and the procedure is a specific binding referenced by a generic binding on the same type. The crash disappears if either a double-colon is added to the procedure binding (procedure :: total
) or if the generic binding is removed.The text was updated successfully, but these errors were encountered: