lws-vhost-destroy
[platform/upstream/libwebsockets.git] / README.problems.md
1 Debugging problems
2 ==================
3
4 Library is a component
5 ----------------------
6
7 As a library, lws is always just a component in a bigger application.
8
9 When users have a problem involving lws, what is happening in the bigger
10 application is usually critical to understand what is going on (and where the
11 solution lies).
12
13 Many users are able to share their sources, but others decide not to, for
14 presumed "commercial advantage" or whatever.  (In any event, it can be painful
15 looking through large chunks of someone else's sources for problems when that
16 is not the library author's responsibility.)
17
18 This makes answering questions like "what is wrong with my code I am not
19 going to show you?" or even "what is wrong with my code?" very difficult.
20
21 Even if it's clear there is a problem somewhere, it cannot be understood or
22 reproduced by anyone else if it needs user code that isn't provided.
23
24 The biggest question is, "is this an lws problem actually"?
25
26
27 Use the test apps as sanity checks
28 ----------------------------------
29
30 The test server and client are extremely useful for sanity checks and debugging
31 guidance.
32
33  - test apps work on your platform, then either
34    - your user code is broken, align it to how the test apps work, or,
35    - something from your code is required to show an lws problem, provide a
36      minimal patch on a test app so it can be reproduced
37      
38  - test apps break on your platform, but work on, eg, x86_64, either
39    - toolchain or platform-specific (eg, OS) issue, or
40    - lws platform support issue
41
42  - test apps break everywhere
43    - sounds like lws problem, info to reproduce and / or a patch is appreciated