View Single Post
Old 06 December 2020, 22:29   #1
Warty
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.
Library-closey code:
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);
	}
}
(opposite order they were opened)

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
Warty is offline  
 
Page generated in 0.04331 seconds with 11 queries