Hello,
I am using FreeRDP to make RDP functions available without installation on
the web.
I'm Java Developer.
Therefore, you configure the FreeRDP Headless Client and connect it using
the JNI.
It receives DNS address and account information from the web, uses it to
connect to RDP using FreeRDP on the Java server, sends events, and receives
screen data.
The RDP function was created by drawing the received screen data again
using canvas on the web.
The Freerdp internal configuration referenced the Android version, and
Guacamole for sending events and receiving screen data.
The development server uses Mac M1 and the production server uses RedHat
Linux, and both have the same problem.
Intermittent error during connection.
---------------
[11:43:57:989] [80548:29d2b000] [ERROR][com.freerdp.utils] - Caught signal
'Bus error: 10' [10]
[11:43:57:147] [80548:29d2b000] [ERROR][com.freerdp.utils] - 0: 0
libwinpr3.3.0.0.dylib 0x0000000141d63a2c winpr_backtrace + 128
[11:43:57:147] [80548:29d2b000] [ERROR][com.freerdp.utils] - 1: 1
libwinpr3.3.0.0.dylib 0x0000000141d63c48
winpr_log_backtrace_ex + 32
[11:43:57:147] [80548:29d2b000] [ERROR][com.freerdp.utils] - 2: 2
libwinpr3.3.0.0.dylib 0x0000000141d63c1c winpr_log_backtrace
+ 44
[11:43:57:147] [80548:29d2b000] [ERROR][com.freerdp.utils] - 3: 3
libfreerdp3.3.0.0.dylib 0x0000000146b11898 fatal_handler + 208
[11:43:57:147] [80548:29d2b000] [ERROR][com.freerdp.utils] - 4: 4
libsystem_platform.dylib 0x00000001a03f54c4 _sigtramp + 56
[11:43:57:147] [80548:29d2b000] [ERROR][com.freerdp.utils] - 5: 5 ???
0x000000010a35fc68 0x0 + 4466277480
[11:43:57:147] [80548:29d2b000] [ERROR][com.freerdp.utils] - 6: 6 ???
0x0000000109ce1e18 0x0 + 4459470360
[11:43:57:147] [80548:29d2b000] [ERROR][com.freerdp.utils] - 7: 7 ???
0x0000000109ce1e18 0x0 + 4459470360
[11:43:57:147] [80548:29d2b000] [ERROR][com.freerdp.utils] - 8: 8 ???
0x000000010a47e3b8 0x0 + 4467450808
[11:43:57:147] [80548:29d2b000] [ERROR][com.freerdp.utils] - 9: 9
libjvm.dylib 0x0000000101a714e8
_ZN9JavaCalls11call_helperEP9JavaValueRK12methodHandleP17JavaCallArgumentsP10JavaThread
+ 908
[11:43:57:147] [80548:29d2b000] [ERROR][com.freerdp.utils] - 10: 10
libjvm.dylib 0x0000000101a70504
_ZN9JavaCalls12call_virtualEP9JavaValueP5KlassP6SymbolS5_P17JavaCallArgumentsP10JavaThread
+ 284
[11:43:57:147] [80548:29d2b000] [ERROR][com.freerdp.utils] - 11: 11
libjvm.dylib 0x0000000101a705d0
_ZN9JavaCalls12call_virtualEP9JavaValue6HandleP5KlassP6SymbolS6_P10JavaThread
+ 100
[11:43:57:147] [80548:29d2b000] [ERROR][com.freerdp.utils] - 12: 12
libjvm.dylib 0x0000000101b23e50
_ZL12thread_entryP10JavaThreadS0_ + 196
[11:43:57:147] [80548:29d2b000] [ERROR][com.freerdp.utils] - 13: 13
libjvm.dylib 0x0000000101f1462c
_ZN10JavaThread17thread_main_innerEv + 308
[11:43:57:147] [80548:29d2b000] [ERROR][com.freerdp.utils] - 14: 14
libjvm.dylib 0x0000000101f12f54
_ZN6Thread8call_runEv + 296
[11:43:57:147] [80548:29d2b000] [ERROR][com.freerdp.utils] - 15: 15
libjvm.dylib 0x0000000101dbb344
_ZL19thread_native_entryP6Thread + 344
[11:43:57:147] [80548:29d2b000] [ERROR][com.freerdp.utils] - 16: 16
libsystem_pthread.dylib 0x00000001a03de26c _pthread_start + 148
[11:43:57:147] [80548:29d2b000] [ERROR][com.freerdp.utils] - 17: 17
libsystem_pthread.dylib 0x00000001a03d908c thread_start + 8
------------------
Because this error kill JVM, Freerdp is also forced to shut down and
exception handling is not working, so I couldn't find out where the problem
was.
I created a dynamic library file according to the sample client form of
freeRDP, and the screen data compresses pixel data to the local drive with
jpg and sends binary data to c->(jni) java -> webserver using the File
function.
Is there any way to guess or determine the cause of this error during this
process?
There's nothing wrong with all the events and the logic of drawing the
screen, and I think it's probably about memory management, but... It's just
a prediction.
Over the past few months, I've had a hard time learning C , JNI and
analyzing FreeRDP.
Through that time, I understood the structure of FreeRDP, understood C, and
learned how to use jni.
And the moment I thought that I had completed the function that I had
thought of, this error threatened stability and made it unusable.
I couldn't find the relevant data.
I am sending this email because I want to hear your advice if someone has
experienced the same problem by creating the same function as me.