Commit 3ce1df2
committed
I've worked on handling Node.js services more gracefully and improving runtime error safeguards.
This involved:
- Modifications in `grazr/core/config.py` to ensure the Node.js `ServiceDefinition` has `process_id = None`.
- Changes in `grazr/ui/services_page.py` (within `refresh_data`) to detect 'node' type services. If a `process_id` isn't found, it assigns a special string "nvm_managed" to `process_id_for_pm` and ensures a `ServiceItemWidget` is still created, suppressing the "Cannot determine process_id_for_pm" warning for this type.
- Updates to `grazr/ui/service_item_widget.py` to recognize the "nvm_managed" `process_id_for_pm`. For such items, it adjusts UI elements: start/stop/remove buttons are hidden/disabled, and status is displayed appropriately (e.g., "Managed by NVM").
- Proactive checks added to a `QTimer.singleShot` in `grazr/ui/main_window.py` (in `handleWorkerResult`) to call `target_page.set_controls_enabled(True)` only if the target page still exists and is visible. This is an attempt to mitigate `RuntimeError: Internal C++ object already deleted`.
- Existing `try-except RuntimeError` blocks in `ServicesPage.set_controls_enabled` were kept as a final safeguard.
Previously, I addressed issues including:
- Various ImportErrors, NameErrors, and AttributeErrors (including for `ServiceDefinition.get`).
- Linting errors.
- Attempts to resolve Qt XCB platform issues.
- Extensive diagnostic logging for startup and `qtpy` issues.
CRITICAL UNRESOLVED ISSUE:
The application currently hangs during startup when run with `python -m grazr.main` (even with `QT_QPA_PLATFORM="minimal"`). Due to command timeouts in the execution environment, I couldn't capture output (including critical diagnostic logs for the hang and confirmation of these latest fixes).
Further work is critically needed to:
1. **Capture logs from the hanging application.** This is the highest priority. One method could be redirecting stdout/stderr to a file during execution and examining it afterwards.
2. Resolve the application hang.
3. Analyze `qtpy` diagnostic output (once obtainable) and resolve any `ModuleNotFoundError`.
4. Fully test all applied fixes and the application's UI once the hang and Qt platform issues are resolved.1 parent c21aab0 commit 3ce1df2
File tree
3 files changed
+58
-25
lines changed- grazr/ui
3 files changed
+58
-25
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
520 | 520 | | |
521 | 521 | | |
522 | 522 | | |
523 | | - | |
| 523 | + | |
| 524 | + | |
| 525 | + | |
524 | 526 | | |
525 | 527 | | |
526 | 528 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
138 | 138 | | |
139 | 139 | | |
140 | 140 | | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
141 | 175 | | |
142 | 176 | | |
143 | 177 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
448 | 448 | | |
449 | 449 | | |
450 | 450 | | |
451 | | - | |
452 | 451 | | |
453 | 452 | | |
454 | | - | |
455 | | - | |
456 | | - | |
457 | | - | |
458 | | - | |
459 | | - | |
460 | | - | |
461 | | - | |
462 | | - | |
463 | | - | |
464 | 453 | | |
465 | | - | |
| 454 | + | |
466 | 455 | | |
467 | 456 | | |
468 | 457 | | |
469 | 458 | | |
| 459 | + | |
| 460 | + | |
470 | 461 | | |
471 | | - | |
472 | | - | |
| 462 | + | |
473 | 463 | | |
474 | 464 | | |
475 | | - | |
476 | | - | |
477 | | - | |
478 | 465 | | |
479 | | - | |
480 | | - | |
481 | | - | |
| 466 | + | |
| 467 | + | |
| 468 | + | |
| 469 | + | |
482 | 470 | | |
483 | 471 | | |
484 | 472 | | |
485 | 473 | | |
486 | 474 | | |
487 | | - | |
488 | | - | |
| 475 | + | |
| 476 | + | |
| 477 | + | |
| 478 | + | |
489 | 479 | | |
490 | 480 | | |
491 | 481 | | |
| |||
537 | 527 | | |
538 | 528 | | |
539 | 529 | | |
540 | | - | |
541 | | - | |
| 530 | + | |
| 531 | + | |
| 532 | + | |
| 533 | + | |
| 534 | + | |
| 535 | + | |
| 536 | + | |
| 537 | + | |
| 538 | + | |
542 | 539 | | |
543 | 540 | | |
544 | 541 | | |
| |||
0 commit comments