Seems to be a bug to me, but I can’t believe nobody else would have stumbled on it so keeping an open mind.
Using this code will not return any categories but it should:
{exp:channel:category_archive channel="test" show_empty="no" style="linear"}
{categories}
{category_name}
{/categories}
{/exp:channel:category_archive}
Changing style to nested returns categories as expected.
Turning on debug gives the following errors:
A PHP Error was encountered
Severity: Notice
Message: Undefined variable: channel_id
Filename: channel/mod.channel.php
Line Number: 5566
A PHP Error was encountered
Severity: Warning
Message: implode() [function.implode]: Invalid arguments passed
Filename: channel/mod.channel.php
Line Number: 5566
A PHP Error was encountered
Severity: Warning
Message: Cannot modify header information - headers already sent by (output started at /home/xm360/cmsadmin/codeigniter/system/core/Exceptions.php:170)
Filename: core/Common.php
Line Number: 409
I produced the above with 2.4.0, with an basic template new channel etc.
Just reproduced this on a different 2.4 install on a different server with the same result.
Appears to be an exact replica of this bug https://support.ellislab.com/bugs/detail/13485
Thanks