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

oregano_warning popup - missing check for correct thread #194

Open
drahnr opened this issue Jun 18, 2017 · 6 comments
Open

oregano_warning popup - missing check for correct thread #194

drahnr opened this issue Jun 18, 2017 · 6 comments

Comments

@drahnr
Copy link
Owner

drahnr commented Jun 18, 2017

Make sure it is used right, and nobody will ever include X11 again as this obsolete post suggests: https://stackoverflow.com/questions/18647475/threading-problems-with-gtk/1865103

gtrentalancia added a commit to gtrentalancia/oregano that referenced this issue Jun 20, 2017
- add noise analysis (initial version: integrated noise
  only);
- add user documentation for the simulation settings (DC,
  AC and Noise);
- increase the minimum width of the simulation settings
  window in order to fit all the descriptions (labels);
- fix units of measurements for several simulation
  settings (DC and AC, from incorrect units of
  "seconds");
- properly set Pango Text Attribute Markup Language in
  oregano_error(), oregano_warning() and oregano_question();
- add auxiliary functions to schedule calls to oregano_error(),
  oregano_warning() and oregano_question() using the GLib
  function g_idle_add_full() (thanks Bernhard for the tip,
  this is a local ngspice_analysis resolution for drahnr#194);
- some style improvements here and there;
- insert the proper GNU copyright notice in new files (proper
  copyright information and full name is still missing for
  user "Michi" !);
- update authors, copyright information and contact
  details in the GUI;
- version bump.

Signed-off-by: Guido Trentalancia <[email protected]>
---
 AUTHORS
|    1
 data/xml/sim-settings.ui
|  566 +++-
 docs/user-docs/Simulation-Settings-HOWTO.md
|   30
 src/dialogs.c
|   66
 src/dialogs.h
|    5
 src/engines/netlist-helper.c
|   10
 src/engines/netlist-helper.h
|    2
 src/engines/ngspice-analysis.c
|   98
 src/engines/ngspice-watcher.c
|   23
 src/engines/ngspice-watcher.h
|   23
 src/engines/ngspice.c
|   23
 src/load-schematic.c
|   81
 src/log-interface.h
|   25
 src/plot.c
|   32
 src/save-schematic.c
|   31
 src/sim-settings-gui.c
|  401 ++-
 src/sim-settings-gui.h
|   46
 src/sim-settings.c
|   95
 src/sim-settings.h
|   37
 src/simulation.h
|    3
 src/tools/cancel-info.c
|   23
 src/tools/cancel-info.h
|   23
 src/tools/thread-pipe.c
|   29
 src/tools/thread-pipe.h
|   23
 test/test-files/test_engine_ngspice_watcher/basic/result/actual.txt
| 1176 ----------
 test/test-files/test_engine_ngspice_watcher/error/step_zero/result/actual.txt
|    5
 test/test_engine_ngspice.c
|   23
 test/test_thread_pipe.c
|   23
 test/test_update_connection_designators.c
|   24
 wscript
|    2
 30 files changed, 1394 insertions(+), 1555 deletions(-)
gtrentalancia added a commit to gtrentalancia/oregano that referenced this issue Jun 20, 2017
- add noise analysis (initial version: integrated noise
  only);
- add user documentation for the simulation settings (DC,
  AC and Noise);
- increase the minimum width of the simulation settings
  window in order to fit all the descriptions (labels);
- fix units of measurements for several simulation
  settings (DC and AC, from incorrect units of
  "seconds");
- properly set Pango Text Attribute Markup Language in
  oregano_error(), oregano_warning() and oregano_question();
- add auxiliary functions to schedule calls to oregano_error(),
  oregano_warning() and oregano_question() using the GLib
  function g_idle_add_full() (thanks Bernhard for the tip,
  this is a local ngspice_analysis resolution for drahnr#194);
- some style improvements here and there;
- insert the proper GNU copyright notice in new files (proper
  copyright information and full name is still missing for
  user "Michi" !);
- update authors, copyright information and contact
  details in the GUI;
- version bump.

Signed-off-by: Guido Trentalancia <[email protected]>
---
 AUTHORS
|    1
 data/xml/sim-settings.ui
|  566 +++-
 docs/user-docs/Simulation-Settings-HOWTO.md
|   30
 src/dialogs.c
|   66
 src/dialogs.h
|    5
 src/engines/netlist-helper.c
|   10
 src/engines/netlist-helper.h
|    2
 src/engines/ngspice-analysis.c
|   98
 src/engines/ngspice-watcher.c
|   23
 src/engines/ngspice-watcher.h
|   23
 src/engines/ngspice.c
|   23
 src/load-schematic.c
|   81
 src/log-interface.h
|   25
 src/plot.c
|   32
 src/save-schematic.c
|   31
 src/sim-settings-gui.c
|  401 ++-
 src/sim-settings-gui.h
|   46
 src/sim-settings.c
|   95
 src/sim-settings.h
|   37
 src/simulation.h
|    3
 src/tools/cancel-info.c
|   23
 src/tools/cancel-info.h
|   23
 src/tools/thread-pipe.c
|   29
 src/tools/thread-pipe.h
|   23
 test/test-files/test_engine_ngspice_watcher/basic/result/actual.txt
| 1176 ----------
 test/test-files/test_engine_ngspice_watcher/error/step_zero/result/actual.txt
|    5
 test/test_engine_ngspice.c
|   23
 test/test_thread_pipe.c
|   23
 test/test_update_connection_designators.c
|   24
 wscript
|    2
 30 files changed, 1394 insertions(+), 1555 deletions(-)
@gtrentalancia
Copy link
Contributor

I suppose this issue has been closed with my commit:

gtrentalancia@8dd76c5

and your subsequent merge:

4e8c529

Please let me know if there is anything else I can do. Also, for next time you merge, please include the full ChangeLog for the commit, so it is easier to track this sort of things (the issue resolution was stated in the original commit).

@drahnr
Copy link
Owner Author

drahnr commented Jun 21, 2017

No, this is a general problem.

There needs to be a check for those warning/logging funcs if we are in the correct thread and deal with it if not.

Otherwise this will happen again.

@MBanucu
Copy link
Contributor

MBanucu commented Jun 25, 2017

I don't understand the problem.

@gtrentalancia
Copy link
Contributor

The two functions oregano_error() and oregano_warning() should only run in the main thread. As simple as that...

gtrentalancia added a commit to gtrentalancia/oregano that referenced this issue Jun 25, 2017
drahnr#194

Reschedule interactive GUI messages internally without
requiring the use of specialised scheduling functions.
@gtrentalancia
Copy link
Contributor

Should hopefully be fixed here:

gtrentalancia@27f932e

@drahnr
Copy link
Owner Author

drahnr commented Jun 25, 2017

I was more thinking of g_thread_self checks, storing the initial thread ID and comparing all others with it. This would have the advantage to have the platform handling of glib baked in withoud any additional hassles.

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

3 participants