Giter Club home page Giter Club logo

Comments (12)

caclark avatar caclark commented on September 2, 2024 1

I created a file - /tmp/test-geany/test.c which contains the single line #include "test-include.h"

The executable is generated from the clones of geany and geany-plugins.
geany -V gives geany 2.1 (git >= 9bf5769f5) (built on 2024-07-02 with GTK 3.24.41, GLib 2.80.0)

GeanyGenDoc is the only plugin enabled.

Opening the test file in Geany and selecting either Document Current Symbol or Document All Symbols results in a crash.

The backtrace is attached.

If you do not see the same result, I will create a more realistic setup.

[Changing the line to be #xxxinclude "test-include.h -> no crash, but with the Status message No valid tag at line 0.]

test-geany-backtrace-1.txt

from geany-plugins.

b4n avatar b4n commented on September 2, 2024 1

@caclark OK I can reproduce with the file containing only a single include, I'll look into it.

from geany-plugins.

elextr avatar elextr commented on September 2, 2024

Try running Geany under gdb and get a backtrace.

from geany-plugins.

b4n avatar b4n commented on September 2, 2024

Maybe it is #1294?

from geany-plugins.

caclark avatar caclark commented on September 2, 2024

Thanks for the quick responses, but I think it is a system configuration problem.
I cloned geany and the geany-plugins, and executed the usual sudo make install.
Geanygendoc was not included because the version of ctpl in Ubuntu 24.04 was not new enough.
I cloned and installed the latest ctpl.
The crash still occurs.

However if I run ./src/geany from the cloned geany directory geanygendoc works correctly.

I am not sure how to resolve this (although I have found a roundabout way of getting it to run).

Maybe this issue should be closed, as it is probably not a geany problem.

from geany-plugins.

b4n avatar b4n commented on September 2, 2024

If you install Geany from source, we recommend you uninstall the distribution packages because it's a little too easy to run the wrong binary, or worse, have one version load bits from the other. In theory it should work, but we've seen both users getting slightly confused, and distros making things hard on us (I didn't say Ubuntu, did I? 😁). Alternatively, make sure you're running the Geany version you expect (e.g. check the version numbers), just in case.

Geanygendoc was not included because the version of ctpl in Ubuntu 24.04 was not new enough.

Looking at packages.ubuntu.com it's definitely new enough, are you sure you had the libctpl-dev package installed?

from geany-plugins.

caclark avatar caclark commented on September 2, 2024

Thanks for the advice.

I have cleaned the unneeded files, installed libctpl-dev, re-cloned and recompiled.
If I select Tools/Documentation Generator/Document All Symbols, there is still a crash.

However if I select a single function there is no crash, but whether or not text is generated depends on the function parameters.

I now see that the problem occurs only if I select a function with an anonymous parameter e.g.
void collect_manager_notify_cb(FileData *fd, NotifyType type, gpointer)

The Status pane of Geany shows something similar to No setting applies to symbol "anon_parameter_5" of type "local" at line 1094.

I could not find anything in the Geany documentation regarding anonymous or unnamed parameters.
Have I missed something?

from geany-plugins.

b4n avatar b4n commented on September 2, 2024

The type being "local" really suggests if you have a crash it ought to be the issue from the mentioned PR… I'll try and reproduce later tonight though.

from geany-plugins.

b4n avatar b4n commented on September 2, 2024

I can't seem to reproduce, but:

  • if the signature you report is a prototype, OK, I see the issue. It sounds like a bug in the C parser (why generate a local tag for a prototype??), but there is probably also an issue in the plugin as the rule local.policy = FORWARD should make it ignore it… at any rate, by default there's no generation for prototypes.
  • could you try and give a backtrace, to share the exact setup that causes the crash? (e.g. the source code + plugin config)

from geany-plugins.

elextr avatar elextr commented on September 2, 2024

Can someone who can reproduce please run Geany under gdb and get a backtrace.

from geany-plugins.

b4n avatar b4n commented on September 2, 2024

@caclark you can give #1365 a try, it should fix it properly.

from geany-plugins.

caclark avatar caclark commented on September 2, 2024

Thanks.

That solves the problems.

from geany-plugins.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.