I’ve got three bits of feedback I’d like to get as directions for JUCE 8.
Aside from the regular feature/performance improvements I’d love it it you looked at:
- Error handling: improving result codes from functions
- No unnecessary deprecations
- Debugging features
Error handling
This is the big one.
When an error occurs please pass as much information as possible back to the caller. I’ll give two examples. We have an app that scans folders for MP3s. In the MP3 decode there is an assert:
{
jassertfalse; // This means the file is using "free format". Apparently very few decoders
// support this mode, and this one certainly doesn't handle it correctly!
frameSize = 0;
return ParseSuccessful::no;
}
This then gets converted to -1 as a value returned from the MP3Decoder, and then even this already minimal error information is thrown away by AudioFormatReader::read as far as I can tell. To support a user who says their MP3 isn’t loading we’d have to get a copy of their MP3 and run the app inside a debugger.
The same is true of almost every network call. Network calls are even harder to debug as you can’t replicate the users environment. The operating system provides detailed and useful error information, e.g. Windows has GetLastError and you can tell whether you’ve got an SSL certificate problem, or a DNS problem. But JUCE just drops all this information, leaving us with just the ability to tell the user ‘Operation Failed’ with no further useful diagnostic information.
Please add a mechanism for getting extended error information and start using it everywhere. I’d settle for an out-of-band solution like GetLastError, it’d be ok.
Unnecessary deprecations
Can you stop deprecating old stuff that will never need to be updated. Sure, add MathConstants<double>::pi
. but there’s no need to mark double_Pi
as deprecated. That’s just making work for no reason.
Debugging features
Please add as many debugging tools as possible to JUCE.
I’ve got some examples in my juce toys repo, e.g. ComponentDebugger (which shows your component tree and helps answer questions about why components aren’t visible), a ValueTree browser, and scripts for Windows debuggers and LLDB to show information about JUCE objects.
It would be great to get higher quality versions of this stuff into the library, plus tools for helping debug repaint areas, repaint performance measurement, mouse clicks, keyboard stuff, focus issues and so on.
It’d save hours of peoples time if you could see instantly which components were getting events, why components weren’t visible.
It’d be even better if I could turn on loads of debugging information in JUCE debug builds without recompiling!
Cheers! Jim.