Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Warning fixes for json-c json_object_array_length #1439

Closed
wants to merge 2 commits into from
Closed

Warning fixes for json-c json_object_array_length #1439

wants to merge 2 commits into from

Conversation

mariusor
Copy link
Contributor

A better patch for quieting the warnings related to json_object_array_length
This grants some future-proofing for the next json-c version which contains this API breaking change.

Marius Orcsik added 2 commits October 27, 2017 15:15
Remove the version contraint on the json-c dependency
This will future proof the code, as it seems
that the next release of json-c will return size_t array lengths
@ddevault
Copy link
Contributor

Did you verify this works on both versions of json-c?

@mariusor
Copy link
Contributor Author

Nope, not yet.

With the master version it crashes a lot and behaves quite weirdly. I need to look into it further, as I'm not sure if they made other changes which might be the cause.

@mariusor
Copy link
Contributor Author

So, I'm not sure what to do, using sway with the master version of json-c does not work. This is the log and the stack trace from changing the workspace for example. I'm not too sure what to make of it or how to debug further, but to me it looks like an internal issue with json-c.

Log

10/29/17 14:15:19 - [commands.c:425] Handling command 'workspace 1:一'
10/29/17 14:15:19 - [commands.c:469] Running on container '1:一'
10/29/17 14:15:19 - [ipc-client.c:50] Unable to receive IPC response

Stack trace

Process 18564 (sway) of user 1001 dumped core.
       
       Stack trace of thread 18564:
       #0  0x00007f13a1646b0b _int_malloc (libc.so.6)
       #1  0x00007f13a164967a __libc_calloc (libc.so.6)
       #2  0x00007f13a2ceac94 json_object_new_int (libjson-c.so.3)
       #3  0x000055bfbda2894c ipc_json_describe_container (sway)
       #4  0x000055bfbda2a909 ipc_get_workspaces_callback (sway)
       #5  0x000055bfbda223c5 container_map (sway)
       #6  0x000055bfbda223c5 container_map (sway)
       #7  0x000055bfbda2bd0d n/a (sway)
       #8  0x000055bfbda2c49f ipc_client_handle_readable (sway)
       #9  0x00007f13a2adc9b2 wl_event_loop_dispatch (libwayland-server.so.0)
       #10 0x00007f13a2adb14c wl_display_run (libwayland-server.so.0)
       #11 0x00007f13a33ceefd wlc_run (libwlc.so.0)
       #12 0x000055bfbda0fdda main (sway)
       #13 0x00007f13a15e6f6a __libc_start_main (libc.so.6)
       #14 0x000055bfbda0ffca _start (sway)
       
       Stack trace of thread 18578:
       #0  0x00007f139ec3538d pthread_cond_wait@@GLIBC_2.3.2 (libpthread.so.0)
       #1  0x00007f1398b4adac n/a (radeonsi_dri.so)
       #2  0x00007f1398b4acb8 n/a (radeonsi_dri.so)
       #3  0x00007f139ec2f08a start_thread (libpthread.so.0)
       #4  0x00007f13a16bc24f __clone (libc.so.6)
       
       Stack trace of thread 18575:
       #0  0x00007f139ec3538d pthread_cond_wait@@GLIBC_2.3.2 (libpthread.so.0)
       #1  0x00007f1398b4adac n/a (radeonsi_dri.so)
       #2  0x00007f1398b4acb8 n/a (radeonsi_dri.so)
       #3  0x00007f139ec2f08a start_thread (libpthread.so.0)
       #4  0x00007f13a16bc24f __clone (libc.so.6)
       
       Stack trace of thread 18572:
       #0  0x00007f139ec3538d pthread_cond_wait@@GLIBC_2.3.2 (libpthread.so.0)
       #1  0x00007f1398b4adac n/a (radeonsi_dri.so)
       #2  0x00007f1398b4acb8 n/a (radeonsi_dri.so)
       #3  0x00007f139ec2f08a start_thread (libpthread.so.0)
       #4  0x00007f13a16bc24f __clone (libc.so.6)
       
       Stack trace of thread 18579:
       #0  0x00007f139ec3538d pthread_cond_wait@@GLIBC_2.3.2 (libpthread.so.0)
       #1  0x00007f1398b4adac n/a (radeonsi_dri.so)
       #2  0x00007f1398b4acb8 n/a (radeonsi_dri.so)
       #3  0x00007f139ec2f08a start_thread (libpthread.so.0)
       #4  0x00007f13a16bc24f __clone (libc.so.6)
       
       Stack trace of thread 18574:
       #0  0x00007f139ec3538d pthread_cond_wait@@GLIBC_2.3.2 (libpthread.so.0)
       #1  0x00007f1398b4adac n/a (radeonsi_dri.so)
       #2  0x00007f1398b4acb8 n/a (radeonsi_dri.so)
       #3  0x00007f139ec2f08a start_thread (libpthread.so.0)
       #4  0x00007f13a16bc24f __clone (libc.so.6)
       
       Stack trace of thread 18577:
       #0  0x00007f139ec3538d pthread_cond_wait@@GLIBC_2.3.2 (libpthread.so.0)
       #1  0x00007f1398b4adac n/a (radeonsi_dri.so)
       #2  0x00007f1398b4acb8 n/a (radeonsi_dri.so)
       #3  0x00007f139ec2f08a start_thread (libpthread.so.0)
       #4  0x00007f13a16bc24f __clone (libc.so.6)
       
       Stack trace of thread 18573:
       #0  0x00007f139ec3538d pthread_cond_wait@@GLIBC_2.3.2 (libpthread.so.0)
       #1  0x00007f1398b4adac n/a (radeonsi_dri.so)
       #2  0x00007f1398b4acb8 n/a (radeonsi_dri.so)
       #3  0x00007f139ec2f08a start_thread (libpthread.so.0)
       #4  0x00007f13a16bc24f __clone (libc.so.6)
       
       Stack trace of thread 18576:
       #0  0x00007f139ec3538d pthread_cond_wait@@GLIBC_2.3.2 (libpthread.so.0)
       #1  0x00007f1398b4adac n/a (radeonsi_dri.so)
       #2  0x00007f1398b4acb8 n/a (radeonsi_dri.so)
       #3  0x00007f139ec2f08a start_thread (libpthread.so.0)
       #4  0x00007f13a16bc24f __clone (libc.so.6)

@ddevault
Copy link
Contributor

See if you can make a minimum reproducable test case.

@mariusor
Copy link
Contributor Author

OK, will try, but I feel like this is a bit more than I can chew. It might take a while. Is it OK to close the PR and come back to it when I've made more progress?

@ddevault
Copy link
Contributor

I would rather just leave it open, no big deal

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants