Bug 362019 - Freeze when click 'show uses' of functions or macros
Summary: Freeze when click 'show uses' of functions or macros
Status: RESOLVED WORKSFORME
Alias: None
Product: kdevelop
Classification: Applications
Component: Language Support: CPP (old) (show other bugs)
Version: git master
Platform: Compiled Sources Linux
: NOR normal
Target Milestone: ---
Assignee: kdevelop-bugs-null
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-04-21 04:32 UTC by Soaph
Modified: 2022-11-23 05:16 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
Running a code having arbitrary functions (449.07 KB, image/png)
2016-04-25 18:39 UTC, Akshay
Details
Screen Record of Bug Reproducing (2.97 MB, application/octet-stream)
2016-04-28 04:30 UTC, Soaph
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Soaph 2016-04-21 04:32:46 UTC
The whole UI would freeze when I click 'show uses' of functions or macros in the editor, until I switch to another application window and wait for a few seconds.

Reproducible: Sometimes

Steps to Reproduce:
1. Write an arbitrary function or macro
2. Move cursor over it, and click 'show uses'
3. It freezes

Actual Results:  
The UI freezes for a few seconds and then comes back normal.

Expected Results:  
No freezing.

It happens when I click 'show uses' of a GLEW macros glClearColor(), glClear(), functions glewInit(), glViewport() and some other macros or functions.

printf() has no bugs.
Comment 1 Kevin Funk 2016-04-21 07:05:33 UTC
Can you disclose the project this is happening on?
Comment 2 Akshay 2016-04-25 18:39:01 UTC
Created attachment 98592 [details]
Running a code having arbitrary functions

this screenshot shows that it works smoothly for the code that has arbitrary function calls in it and it works totally fine on my kdevelop environment
Comment 3 Akshay 2016-04-25 18:40:53 UTC
this is the code I used from cplusplus.com as an example:
it works perfectly fine when I do
Move cursor over it, and click 'show uses'


//code from here
// function example
#include <iostream>     // std::cout
#include <functional>   // std::function, std::negate

// a function:
int half(int x) {return x/2;}

// a function object class:
struct third_t {
  int operator()(int x) {return x/3;}
};

// a class with data members:
struct MyValue {
  int value;
  int fifth() {return value/5;}
};

int main () {
  std::function<int(int)> fn1 = half;                    // function
  std::function<int(int)> fn2 = &half;                   // function pointer
  std::function<int(int)> fn3 = third_t();               // function object
  std::function<int(int)> fn4 = [](int x){return x/4;};  // lambda expression
  std::function<int(int)> fn5 = std::negate<int>();      // standard function object

  std::cout << "fn1(60): " << fn1(60) << '\n';
  std::cout << "fn2(60): " << fn2(60) << '\n';
  std::cout << "fn3(60): " << fn3(60) << '\n';
  std::cout << "fn4(60): " << fn4(60) << '\n';
  std::cout << "fn5(60): " << fn5(60) << '\n';

  // stuff with members:
  std::function<int(MyValue&)> value = &MyValue::value;  // pointer to data member
  std::function<int(MyValue&)> fifth = &MyValue::fifth;  // pointer to member function

  MyValue sixty {60};

  std::cout << "value(sixty): " << value(sixty) << '\n';
  std::cout << "fifth(sixty): " << fifth(sixty) << '\n';

  return 0;
}
Comment 4 Soaph 2016-04-26 05:01:14 UTC
Maybe I did not emphasize the condition.
In my desktop environment, it freezes when I click 'show uses' to the OpenGL glfw functions or macros, maybe you could try it out in a OpenGL project.

For your example, I got no freezing as well, so it may be the problem of some specific projects on specific libraries.

(In reply to Akshay from comment #3)
> this is the code I used from cplusplus.com as an example:
> it works perfectly fine when I do
> Move cursor over it, and click 'show uses'
> 
> 
> //code from here
> // function example
> #include <iostream>     // std::cout
> #include <functional>   // std::function, std::negate
> 
> // a function:
> int half(int x) {return x/2;}
> 
> // a function object class:
> struct third_t {
>   int operator()(int x) {return x/3;}
> };
> 
> // a class with data members:
> struct MyValue {
>   int value;
>   int fifth() {return value/5;}
> };
> 
> int main () {
>   std::function<int(int)> fn1 = half;                    // function
>   std::function<int(int)> fn2 = &half;                   // function pointer
>   std::function<int(int)> fn3 = third_t();               // function object
>   std::function<int(int)> fn4 = [](int x){return x/4;};  // lambda expression
>   std::function<int(int)> fn5 = std::negate<int>();      // standard
> function object
> 
>   std::cout << "fn1(60): " << fn1(60) << '\n';
>   std::cout << "fn2(60): " << fn2(60) << '\n';
>   std::cout << "fn3(60): " << fn3(60) << '\n';
>   std::cout << "fn4(60): " << fn4(60) << '\n';
>   std::cout << "fn5(60): " << fn5(60) << '\n';
> 
>   // stuff with members:
>   std::function<int(MyValue&)> value = &MyValue::value;  // pointer to data
> member
>   std::function<int(MyValue&)> fifth = &MyValue::fifth;  // pointer to
> member function
> 
>   MyValue sixty {60};
> 
>   std::cout << "value(sixty): " << value(sixty) << '\n';
>   std::cout << "fifth(sixty): " << fifth(sixty) << '\n';
> 
>   return 0;
> }
Comment 5 Kevin Funk 2016-04-26 05:30:01 UTC
@Soaph: Please provide a minimal working example so we can reproduce your issue.

See: http://stackoverflow.com/help/mcve
Comment 6 Soaph 2016-04-28 04:30:43 UTC
Created attachment 98654 [details]
Screen Record of Bug Reproducing
Comment 7 Soaph 2016-04-28 04:35:13 UTC
The newly added attachment is the screen record of the bug reproducing.

In the video, the example project is a normal terminal project.

1. added include search folder of the glfw header files.
2. the bug emitting function is actually a macro.
Comment 8 Akshay 2016-05-03 23:32:28 UTC
I tried writing a sample code as you demonstrated I did not find any problem in that maybe it varies with operating system I am using ubuntu 14.04
Comment 9 Soaph 2016-05-04 07:17:28 UTC
(In reply to Akshay from comment #8)
> I tried writing a sample code as you demonstrated I did not find any problem
> in that maybe it varies with operating system I am using ubuntu 14.04

Maybe, I compiled it from git, and I am using Arch Linux.
Comment 10 Justin Zobel 2022-10-24 00:46:55 UTC
Thank you for reporting this bug in KDE software. As it has been a while since this issue was reported, can we please ask you to see if you can reproduce the issue with a recent software version?

If you can reproduce the issue, please change the status to "REPORTED" when replying. Thank you!
Comment 11 Bug Janitor Service 2022-11-08 05:10:12 UTC
Dear Bug Submitter,

This bug has been in NEEDSINFO status with no change for at least
15 days. Please provide the requested information as soon as
possible and set the bug status as REPORTED. Due to regular bug
tracker maintenance, if the bug is still in NEEDSINFO status with
no change in 30 days the bug will be closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

If you have already provided the requested information, please
mark the bug as REPORTED so that the KDE team knows that the bug is
ready to be confirmed.

Thank you for helping us make KDE software even better for everyone!
Comment 12 Bug Janitor Service 2022-11-23 05:16:37 UTC
This bug has been in NEEDSINFO status with no change for at least
30 days. The bug is now closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

Thank you for helping us make KDE software even better for everyone!