My Java app sometimes completely freezes without exceptions or logs. I suspect two threads are blocking each other. How should I debug and fix this?
Digiaru posted 3 months ago
My Java application crashes with NullPointerException in unexpected cases—even after supposedly initializing objects. What causes these NPEs and how do I prevent them?
Digiaru posted 3 months ago
My Java application occasionally hangs or throws OutOfMemoryError when multiple threads update a shared HashMap. I can’t reliably reproduce it and debugging is difficult. What might be happening?
Digiaru posted 3 months ago
In a heavily concurrent application using HashMap, the program sometimes crashes with OutOfMemoryError, or iteration behaves incorrectly. What’s causing it, and how do I fix it?
Kar posted 3 months ago
In my multi-threaded application, a thread sleeping inside a loop gets interrupted, but the interrupt flag is ignored or swallowed. The thread doesn’t stop and continues looping—leading to runaway execution or resource leaks. What’s wrong, and how sh...
Kar posted 3 months ago
I implemented a singleton pattern using double checked locking without declaring the instance variable as volatile. In multithreaded environments, occasionally two threads create separate instances or one receives an incompletely initialized object....
Kar posted 3 months ago
Using virtual threads heavily in Java 19, my application gradually consumes native memory and freezes, even though thread counts are low. What’s happening?
Kar posted 3 months ago
When evolving a Java class, I occasionally encounter InvalidClassException or unexpected behavior after deserializing older serialized objects. What’s causing this and how do I correct it?
Kar posted 3 months ago
I have a Java class that overrides finalize() for cleanup. Under high object allocation rates, the JVM becomes slow or crashes with OutOfMemoryError. Why is this happening and how should I fix it?
Kar posted 3 months ago
In a React useEffect, I call an async function but forget to await or return it. If it throws, I get an unlogged rejection or erratic component behavior.
Digiaru posted 3 months ago
Functions with infinite recursion crash with “Maximum call stack exceeded,” but infinite loops using while(true) just hang/crash without stack errors. Why?
Digiaru posted 3 months ago
My debounced function isn’t acting on the latest input or has undefined variables—especially when the handler needs access to current input values.
Digiaru posted 3 months ago
Implementing autocomplete: users type fast, sending multiple fetch calls. Sometimes, results from an earlier request replace the newer ones, causing wrong suggestions to display.
Digiaru posted 3 months ago
Why doesn’t this wait, and how do I correctly handle async logic in loops?
Digiaru posted 3 months ago
My Node.js app launches multiple shell commands via child_process.spawn() in parallel. It's slow, causes spikes in memory and CPU, and sometimes crashes. What alternatives can help avoid these slowdowns?
Kar posted 3 months ago
Some APIs in my Node.js/Express app respond slowly occasionally—responses take several seconds even though CPU & memory usage look normal and DB calls are fast. Distributing load across PM2 cluster doesn't help. What might be causing this slowdown?
Kar posted 3 months ago
When processing a large number of files (e.g. reading or watching directories with thousands of files), Node.js throws: arduino Copy code Error: EMFILE: too many open files Even though .readFile() or .watch() is used, the process crashes. How can...
Kar posted 3 months ago
My Node.js service consumes more memory over time—even without increased load—and eventually crashes with heap out of memory. What's likely causing this leak?
Digiaru posted 3 months ago
I configured a custom Undici Agent with very large timeouts (e.g. headersTimeout: 3,000,000), but long-running fetch calls still fail after several minutes with TypeError: fetch failed caused by HeadersTimeoutError.
Digiaru posted 3 months ago
When using built-in fetch() in Node.js (v18+), requests occasionally fail with: php Copy code TypeError: fetch failed cause: ConnectTimeoutError (code: 'UND_ERR_CONNECT_TIMEOUT') Even using AbortSignal.timeout(…) set to a high value (e.g. 20 s)...
Digiaru posted 3 months ago