[GSoC 2023] Next up: Add reference images

Blog post by Zardshard on Thu, 2023-06-01 08:39

I have fixed three memory leaks. Before, leak_analyser.sh found 75 leaks from simply opening and closing Icon-O-Matic. It now reports only 27.

I am now planning to implement a new shape type called “reference images”. This implements ticket #2748. As discussed in the ticket, having a reference image in the background greatly assists in vectorizing it. Reference images are just for reference. They will not be exported to the final HVIF file.

[GSoC 2023] First course of action: fix memory leaks

Blog post by Zardshard on Mon, 2023-05-29 09:03

The coding period has started today! In the last blog post related to GSOC, I said “Here are the plans that I currently have. As with all plans, they are subject to change.” They did indeed change since I found a tool to find memory leaks.

Before I was accepted into GSOC, I had been thinking about porting AddressSanitizer to Haiku to find memory leaks. I decided against it. During the community bonding period, I found a file called leak_analyser.sh, which was made for finding memory leaks, exactly like AddressSanitizer! It was a good thing I had decided against porting AddressSanitizer to Haiku. I now want to work on getting rid of the memory leaks from Icon-O-Matic.

How to find memory leaks

Blog post by Zardshard on Tue, 2023-05-23 10:44

In 2010-2011, mmlr created a new memory allocator: the guarded heap memory allocator. This allocator helps detect various bugs such as writing past the end of allocated memory, reading uninitialized memory, and freeing freed memory. These uses are detailed in “Using malloc_debug to Find Memory Related Bugs”. Later, in 2015, mmlr had a new project: updating the memory allocator to be able to report memory leaks.

To use this feature, start by loading libroot_debug.so instead of libroot.so. This can be done using the LD_PRELOAD environment variable. Once loaded, the MALLOC_DEBUG environment variable can be used to set various options. PulkoMandy added some notes to the end of “Using malloc_debug to Find Memory Related Bugs” describing what options are available. Relevant to finding memory leaks are enabling the guarded heap with g, dumping memory that is still allocated on exit (most of which should have been freed before the program exited and are memory leaks) with e, and telling it to show a stack trace with up to 50 items with s50. Putting it all together, the command to run a program with memory leak detection is LD_PRELOAD=libroot_debug.so MALLOC_DEBUG=ges50 program.

The Icon Sets Proposed in the Icon Contest

Blog post by Zardshard on Thu, 2023-05-11 10:01

In 2006, an contest was held to create an original icon set for Haiku to replace the BeOS R5 icons. With the passage of time, much of the content surrounding the event has rotted away, including images of the proposed icon sets. Luckily, the Internet Archive has backups! The Stipi icon set won, with Honey, zuMi and Mc Clintock trailing close behind.

575

Alba

Deborah

Dropline Neu

[GSoC 2023] Plans for improving Icon-O-Matic

Blog post by Zardshard on Fri, 2023-05-05 14:07

Icon-O-Matic is the editor for HVIF files, the format that Haiku’s icons are in. It’s a relatively simple but impressive aplication. It does have room for improvement, however.

There are three things I am planning to do during GSoC: fix bugs, refactor the code, and improve the UI. There is a list of known bugs that Icon-O-Matic has over on Trac. You can help, too, by reporting bugs in Icon-O-Matic over there. Less obviously, you can also vote for tickets that you would like to be resolved. To do this, click on the ticket that interests you, then click one of the buttons highlighted by the arrow: The buttons are in the upper-right hand corner among the navigation links