But of all his glorious flops, my favorite is definitely the dark, madcap, twisted Death to Smoochy. The 2002 black comedy is about a deeply disturbed children’s TV show host (Williams) who loses his job to an upstanding performer who wears a rhinoceros costume, Sheldon Mopes (Ed Norton in the title role), after getting caught in a bribery sting. It was a critical and box office bomb. Time hasn’t been kind either. It’s the type of movie that the screenwriter groans aloud about when it’s brought up 12 years later. Jon Stewart has made the fact that his role as Williams’ sleazy associate in Smoochy is one of his major film credits a running Daily Show gag.

“I’m sure that some country, maybe France or something, will hail this as a work of genius, because it is so incredibly awful,” said Richard Roeper at the time of its release. Ebert put it this way: “Only enormously talented people could have made Death to Smoochy. Those with lesser gifts would have lacked the nerve to make a film so bad, so miscalculated, so lacking any connection with any possible audience.”

But what Ebert decries about Smoochy, which was directed by and also stars Danny DeVito, is exactly what made it such a refreshing antidote to the series of sometimes mawkish, occasionally terrible family comedies that Williams made in the 1990s—from Jack and Bicentennial Man to Flubber and even Mrs. Doubtfire.

Smoochy was a complete departure from such manipulative fare. In a typical scene, Williams’ Rainbow Randolph (the names in this film are terrific) tricks Smoochy into performing at a banquet for, Rainbow Randolph claims, “Parents for Decency in Children’s Television.” The event is actually a Neo-Nazi rally that will be raided by police. The sight of a beloved children’s character performing songs about friendship and getting interrupted by the unfurling of giant swastika banners and guys in Nazi uniforms chanting “Heil Smoochy” gets me every time.

The buildup to that scene is Williams nervously twitching, swearing, and shouting obscenities in a Scottish accent as he tries to get Smoochy to admit to stealing his job. It’s a classically frenetic, over-the-top Williams performance, complete with an absurd accent. But this one is also full of sadness and rage. In another scene, he threatens to hunt down Smoochy, making an elephant-trumpet noise to indicate that he’s “going on safari, motherfucker.”

Ebert, in this case, was wrong: There was an audience for this movie. It was the audience that only vaguely remembered seeing old clips of Williams’ stand-up from the ’70s and hearing about how sarcastic and edgy Williams was before he started cranking out kid’s movies. Smoochy contained the promise of that younger Williams. In one of the movie’s bleakest scenes, Rainbow Randolph announces before a circling Times Square crowd that Smoochy has taken away everything from him, “but the one thing he can’t do, is take away my life—only I have the power to do that.” Randolph douses himself in gasoline, lights a match, and tells the crowd of bystanders “don’t try to talk me out of this.” The joke is that the crowd of New Yorkers is so callous that none of them will—they’re just there to watch the spectacle of a man destroying himself.

The scene’s sadness is cut when an angelic little girl comes up to Randolph and says “What you doing Rainbow Randolph?” She blows the match out and gently adds, “It’s OK.” This melts Williams’ heart in a way we’re more used to seeing in something like Jumanji, but the sweetness feels entirely earned.

At that point, someone shouts “Smoochy!” Mopes has arrived in his limo, and everyone who was watching Randolph’s attempted self-destruction and his salvation by that little girl flees in order to see the real star. Even the little girl is swept off in Smoochy-mania. When Williams shouts “God, what does it all mean!” as the camera zooms in on him, the villain of the movie has transformed into a cosmic victim, one you are both rooting for and feeling terribly sad for.

There’s a happy ending: Randolph redeems himself and finds a renewed purpose in life as a hero. But it’s in the darker moments that this mess of a movie, beloved by only a few, brings out a quality in Williams that was sometimes overlooked, and was essential to his wide and remarkably enduring appeal.