06 December 2020, 22:29 | #1 |
Registered User
Join Date: Aug 2018
Location: Minneapolis, USA
Posts: 301
|
Workbench.library Refusing to Close?
(Another debug frustration I'm looking for help on)
I recently had to add workbench.library to my app. I noticed that, unlike other libraries I open, it isn't closing on app exit, at least as far as I can tell from codewatcher output. (Is there another tool that lets you see which libraries were left open?). Closing the libraries is literally the last thing done before exit(0). Codewatcher output: Code:
Process/Task Address: $3B6790 The following Segments were loaded for this process: Addr: $394460 Size: 140080 Addr: $348648 Size: 1184 Addr: $364230 Size: 1060 All Files were closed. The following Locks were NOT freed: Address: $21C3D4 Type: Shared Address: $21C3D4 Type: Shared Address: $21C3D4 Type: Shared Address: $21C3D4 Type: Shared Address: $21C3D4 Type: Shared Address: $21C3D4 Type: Shared Address: $21C3D4 Type: Shared Address: $21C3D4 Type: Shared Address: $21C3D4 Type: Shared Address: $21C3D4 Type: Shared Address: $21C3D4 Type: Shared Address: $21C3D4 Type: Shared Address: $21C3D4 Type: Shared Address: $21C3D4 Type: Shared Address: $21C3D4 Type: Shared Address: $21C3D4 Type: Shared Address: $21C3D4 Type: Shared Address: $21C3D4 Type: Shared Address: $21C3D4 Type: Shared Address: $21C3D4 Type: Shared Address: $21C3D4 Type: Shared Address: $21C3D4 Type: Shared Address: $21C3D4 Type: Shared Address: $21C3D4 Type: Shared Address: $21C3D4 Type: Shared Address: $21C3D4 Type: Shared Address: $21C3D4 Type: Shared Address: $21C3D4 Type: Shared Address: $21C3D4 Type: Shared Address: $21C3D4 Type: Shared Address: $21C3D4 Type: Shared Address: $21C3D4 Type: Shared The following Fonts were accessed: Apparent.font Addr: $2D1F0A Y: 11 X: 6 Style: $0 Flag: $62 OpnCnt: 0 EspiSansBold.font Addr: $2D4462 Y: 12 X: 7 Style: $0 Flag: $62 OpnCnt: 0 Dina.font Addr: $2D308A Y: 13 X: 7 Style: $0 Flag: $42 OpnCnt: 0 All Sprites were freed. No Interrupt Servers were added. No Tasks were added. No Ports were added. The following Libraries were accessed: dos.library Addr: $20E29C OpenCnt: 0 mathieeedoubbas.library Addr: $21AAA0 OpenCnt: 0 datatypes.library Addr: $21DCA0 OpenCnt: 0 graphics.library Addr: $204CE4 OpenCnt: 0 intuition.library Addr: $209D0C OpenCnt: 0 layers.library Addr: $207FB4 OpenCnt: 0 locale.library Addr: $234330 OpenCnt: 0 utility.library Addr: $204388 OpenCnt: 0 workbench.library Addr: $2CFA6C OpenCnt: 1 diskfont.library Addr: $25FF98 OpenCnt: 0 icon.library Addr: $28BBDC OpenCnt: 0 iffparse.library Addr: $234B50 OpenCnt: 0 datatypes/ilbm.datatype Addr: $223160 OpenCnt: 0 No Devices were opened. No Resources were added to the system. The following allocations were in the process MemEntry: Addr: $2D15A0 Size: 20 Addr: $3B6790 Size: 4344 The following memory blocks were NOT freed: Addr: $62D30 Size: 248 RtnAddr: $F8EA6E Hunk: ROM Space Ofst: None Addr: $3E8A58 Size: 10 RtnAddr: $F8EA44 Hunk: ROM Space Ofst: None Addr: $2C200 Size: 248 RtnAddr: $F8E9AC Hunk: ROM Space Ofst: None Addr: $3648B8 Size: 10 RtnAddr: $F8E986 Hunk: ROM Space Ofst: None Process Priority 0 was NOT changed at exit. Traps Allocated = $0 Signals Allocated = $0 Task Disable count = -1 (normal) Interrupt Disable count = -1 (normal) The Current Directory was NOT changed at exit. The Window Pointer was NOT changed at exit. Program used approximately 2240 bytes from the stack. Program returned code 0. Code:
// close intuition and other libraries before exiting void App_CloseLibraries(void) { // close localization catalog CloseWB2KCatalog(); if (IntuitionBase) { CloseLibrary(WorkbenchBase); CloseLibrary(LocaleBase); CloseLibrary(LayersBase); CloseLibrary(DataTypesBase); CloseLibrary((struct Library*)DOSBase); CloseLibrary(GfxBase); CloseLibrary(IntuitionBase); } } I don't know how big a problem this is, but obviously would like to clean it up if possible. I didn't have any luck googling similar issues. Any hints on what kind of thing might prevent workbench.library from closing? I'm using it to launch apps, but it won't close even if I just start the application and exit immediately, without even having launched another app. OS: 3.1.4 |
07 December 2020, 04:46 | #2 |
Registered User
Join Date: Aug 2018
Location: Minneapolis, USA
Posts: 301
|
Well that was dumb. Copy/Paste error that went unnoticed.
WorkbenchBase = OpenLibrary((STRPTR)"workbench.library.library", MINVERSION); So my WorkbenchBase was what... who knows? But closing it didn't close workbench.library. No errors reported, so not sure how that ever worked. I guess something else actually opened workbench.library successfully. |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Being Screwed around over icon.library and workbench.library. | rcrook9190 | support.Hardware | 8 | 07 January 2020 07:19 |
No signals in library open/close code? | AGS | Coders. System | 10 | 29 November 2017 17:31 |
workbench.library 45.132 patch to try out | PeterK | Coders. System | 37 | 17 October 2017 13:32 |
workbench.library - Should I update it? | Amiga1992 | support.Apps | 57 | 19 August 2017 12:52 |
How to close the shell in Workbench 3.1 | rodi | support.Apps | 6 | 02 June 2008 22:05 |
|
|