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