<div style="line-height:1.7;color:#000000;font-size:14px;font-family:Arial"><div>Thank you very much for your help.</div><div>I added a while loop at the end of the main() to fix the problem.</div><br><br><pre><br>ÔÚ 2016-06-24 16:45:39£¬"Pekka Paalanen" <ppaalanen@gmail.com> дµÀ£º
>On Fri, 24 Jun 2016 11:15:32 +0800 (CST)
>Ô¬¼Îΰ <yuanjw1025@163.com> wrote:
>
>> ÔÚ 2016-06-23 21:13:28£¬"Pekka Paalanen" <ppaalanen@gmail.com> дµÀ£º
>
>> >Hi,
>> >
>> >sorry, but I can't make sense from the spaghetti above, nor do I have
>> >time to debug your application for you, especially when it has huge
>> >parts outside of my expertise (everything about SurfaceManager). If you
>> >can create a stand-alone C program that shows the problem, then it
>> >might be possible to take a look, but no promises.
>> >
>> >Also signals will be delivered to random threads unless you
>> >specifically block them.
>> >
>> >I have no idea why wl_display_connect() from a secondary thread would
>> >block.
>> >
>> >
>> >Thanks,
>> >pq
>>
>> Hi£º
>> I have created a stand-alone C program, which could show the problem.
>> It was blocked in wl_display_dispatch this time.I was very helpless.
>> I hope you might take a look if you have time.
>
>Hi,
>
>I could only take a very quick peek for now, but this look a bit
>odd to me, as your main() is:
>
>int
>main(int argc, char **argv)
>{
> pthread_t lifeThread;
> pthread_create(&lifeThread, NULL, &renderFrames, NULL);
>
> return 0;
>}
>
>You are not waiting for the thread to finish, or even to start,
>before you already return from main(). pthread_create() manual says:
>
> The new thread terminates in one of the following ways:
>...
> * Any of the threads in the process calls exit(3), or the main thread
> performs a return from main(). This causes the termination of all
> threads in the process.
>
>So in that light, your program should just quit and not really do
>anything. The strange thing is that the thread does not seem to get
>terminated, but maybe that is because it is blocked in a polling
>call.
>
>Could you fix it to wait for the thread to finish before returning
>from main()?
>
>
>Thanks,
>pq
</pre></div><br><br><span title="neteasefooter"><p> </p></span>