1*1c60b9acSAndroid Build Coastguard WorkerDebugging problems 2*1c60b9acSAndroid Build Coastguard Worker================== 3*1c60b9acSAndroid Build Coastguard Worker 4*1c60b9acSAndroid Build Coastguard WorkerCheck it's still a problem with latest lws 5*1c60b9acSAndroid Build Coastguard Worker------------------------------------------ 6*1c60b9acSAndroid Build Coastguard Worker 7*1c60b9acSAndroid Build Coastguard WorkerOlder versions of lws don't attract any new work after they are released 8*1c60b9acSAndroid Build Coastguard Worker(see [the release policy](https://libwebsockets.org/git/libwebsockets/tree/READMEs/README.release-policy.md) for details); 9*1c60b9acSAndroid Build Coastguard Workerfor a while they will get backported bugfixes but that's it. 10*1c60b9acSAndroid Build Coastguard Worker 11*1c60b9acSAndroid Build Coastguard WorkerAll new work and bugfixes happen on `main` branch. 12*1c60b9acSAndroid Build Coastguard Worker 13*1c60b9acSAndroid Build Coastguard WorkerOld, old versions may be convenient for you to use for some reason. But unless 14*1c60b9acSAndroid Build Coastguard Workeryou pay for support or have contributed work to lws so we feel we owe you some 15*1c60b9acSAndroid Build Coastguard Workerconsideration, nobody else has any reason to particularly care about solving 16*1c60b9acSAndroid Build Coastguard Workerissues on ancient versions. Whereas if the problem exists on `main`, and can be 17*1c60b9acSAndroid Build Coastguard Workerreproduced by developers, it usually gets attention, often immediately. 18*1c60b9acSAndroid Build Coastguard Worker 19*1c60b9acSAndroid Build Coastguard WorkerIf the problem doesn't exist on `main`, you can either use `main` or check also 20*1c60b9acSAndroid Build Coastguard Workerthe -stable branch of the last released version to see if it was already solved 21*1c60b9acSAndroid Build Coastguard Workerthere. 22*1c60b9acSAndroid Build Coastguard Worker 23*1c60b9acSAndroid Build Coastguard WorkerLibrary is a component 24*1c60b9acSAndroid Build Coastguard Worker---------------------- 25*1c60b9acSAndroid Build Coastguard Worker 26*1c60b9acSAndroid Build Coastguard WorkerAs a library, lws is always just a component in a bigger application. 27*1c60b9acSAndroid Build Coastguard Worker 28*1c60b9acSAndroid Build Coastguard WorkerWhen users have a problem involving lws, what is happening in the bigger 29*1c60b9acSAndroid Build Coastguard Workerapplication is usually critical to understand what is going on (and where the 30*1c60b9acSAndroid Build Coastguard Workersolution lies). Sometimes access to the remote peer like server or client is also 31*1c60b9acSAndroid Build Coastguard Workernecessary to provoke the symptom. Sometimes, the problem is in lws, but 32*1c60b9acSAndroid Build Coastguard Workersometimes the problem is not in lws but in these other pieces. 33*1c60b9acSAndroid Build Coastguard Worker 34*1c60b9acSAndroid Build Coastguard WorkerMany users are able to share their sources, but others decide not to, for 35*1c60b9acSAndroid Build Coastguard Workerpresumed "commercial advantage" or whatever. (In any event, it can be painful 36*1c60b9acSAndroid Build Coastguard Workerlooking through large chunks of someone else's sources for problems when that 37*1c60b9acSAndroid Build Coastguard Workeris not the library author's responsibility.) 38*1c60b9acSAndroid Build Coastguard Worker 39*1c60b9acSAndroid Build Coastguard WorkerThis makes answering questions like "what is wrong with my code I am not 40*1c60b9acSAndroid Build Coastguard Workergoing to show you?" or even "what is wrong with my code?" very difficult. 41*1c60b9acSAndroid Build Coastguard Worker 42*1c60b9acSAndroid Build Coastguard WorkerEven if it's clear there is a problem somewhere, it cannot be understood or 43*1c60b9acSAndroid Build Coastguard Workerreproduced by anyone else if it needs user code that isn't provided. 44*1c60b9acSAndroid Build Coastguard Worker 45*1c60b9acSAndroid Build Coastguard WorkerThe biggest question is, "is this an lws problem actually"? To solve that 46*1c60b9acSAndroid Build Coastguard Workerthe best solution is to strip out all or as much user code as possible, 47*1c60b9acSAndroid Build Coastguard Workerand see if the problem is still coming. 48*1c60b9acSAndroid Build Coastguard Worker 49*1c60b9acSAndroid Build Coastguard Worker 50*1c60b9acSAndroid Build Coastguard WorkerUse the test apps / minimal examples as sanity checks 51*1c60b9acSAndroid Build Coastguard Worker----------------------------------------------------- 52*1c60b9acSAndroid Build Coastguard Worker 53*1c60b9acSAndroid Build Coastguard WorkerThe test server and client, and any more specifically relevant minimal example 54*1c60b9acSAndroid Build Coastguard Worker are extremely useful for sanity checks and debugging guidance. 55*1c60b9acSAndroid Build Coastguard Worker 56*1c60b9acSAndroid Build Coastguard Worker - **test apps work on your platform**, then either 57*1c60b9acSAndroid Build Coastguard Worker - your user code is broken, align it to how the test apps work, or, 58*1c60b9acSAndroid Build Coastguard Worker - something from your code is required to show an lws problem, provide a 59*1c60b9acSAndroid Build Coastguard Worker minimal patch on a test app so it can be reproduced 60*1c60b9acSAndroid Build Coastguard Worker 61*1c60b9acSAndroid Build Coastguard Worker - **test apps break on your platform**, but work on, eg, x86_64, either 62*1c60b9acSAndroid Build Coastguard Worker - toolchain or platform-specific (eg, OS) issue, or 63*1c60b9acSAndroid Build Coastguard Worker - lws platform support issue 64*1c60b9acSAndroid Build Coastguard Worker 65*1c60b9acSAndroid Build Coastguard Worker - **test apps break everywhere** 66*1c60b9acSAndroid Build Coastguard Worker - sounds like lws problem, info to reproduce and / or a patch is appreciated 67