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

[WRAPPER] Added more gtk functions #849

Merged
merged 2 commits into from
Jun 21, 2023
Merged

[WRAPPER] Added more gtk functions #849

merged 2 commits into from
Jun 21, 2023

Conversation

ksco
Copy link
Collaborator

@ksco ksco commented Jun 21, 2023

for #838, but it still not working... I haven't found out why.

Logs:

ksco@Asahi:~/Downloads/spotube -$ BOX64_ROLLING_LOG=1 ./spotube
Rolling log, showing last 16 function call on signals
Dynarec for ARM64, with extension: ASIMD AES CRC32 PMULL ATOMICS PageSize:16384 Running on Blizzard-M2 Avalanche-M2 with 8 Cores
Params database has 24 entries
Box64 with Dynarec v0.2.3 0cef7f27 built on Jun 21 2023 19:21:42
Using default BOX64_LD_LIBRARY_PATH: ./:lib/:lib64/:x86_64/:bin64/:libs64/
Using default BOX64_PATH: ./:bin/
Counted 72 Env var
Looking for ./spotube
Rename process to "spotube"
Using emulated /home/ksco/Downloads/spotube/lib/libaudioplayers_linux_plugin.so
Using emulated /home/ksco/Downloads/spotube/lib/libcatcher_plugin.so
Using emulated /home/ksco/Downloads/spotube/lib/libscreen_retriever_plugin.so
Using emulated /home/ksco/Downloads/spotube/lib/liburl_launcher_linux_plugin.so
Using emulated /home/ksco/Downloads/spotube/lib/libwindow_manager_plugin.so
Using emulated /home/ksco/Downloads/spotube/lib/libwindow_size_plugin.so
Using emulated /home/ksco/Downloads/spotube/lib/libflutter_linux_gtk.so
Using native(wrapped) libgtk-3.so.0
Using native(wrapped) libgdk-3.so.0
Using native(wrapped) libgobject-2.0.so.0
Using native(wrapped) libglib-2.0.so.0
Using native(wrapped) libgio-2.0.so.0
Using native(wrapped) libgmodule-2.0.so.0
Using native(wrapped) libgdk_pixbuf-2.0.so.0
Using native(wrapped) libpangocairo-1.0.so.0
Using native(wrapped) libpango-1.0.so.0
Using native(wrapped) libharfbuzz.so.0
Using native(wrapped) libatk-1.0.so.0
Using native(wrapped) libcairo-gobject.so.2
Using native(wrapped) libcairo.so.2
Using emulated /lib/x86_64-linux-gnu/libstdc++.so.6
Using native(wrapped) libm.so.6
Using emulated /lib/x86_64-linux-gnu/libgcc_s.so.1
Using native(wrapped) libc.so.6
Using native(wrapped) ld-linux-x86-64.so.2
Using native(wrapped) libpthread.so.0
Using native(wrapped) libdl.so.2
Using native(wrapped) libutil.so.1
Using native(wrapped) libresolv.so.2
Using native(wrapped) librt.so.1
Using native(wrapped) libgstapp-1.0.so.0
Using native(wrapped) libgstbase-1.0.so.0
Using native(wrapped) libgstreamer-1.0.so.0
Using emulated /home/ksco/Downloads/spotube/lib/libepoxy.so.0
Warning: Global Symbol OPENSSL_memory_alloc not found, cannot apply R_X86_64_GLOB_DAT @0x102eebbb8 ((nil)) in /home/ksco/Downloads/spotube/lib/libflutter_linux_gtk.so
Warning: Global Symbol OPENSSL_memory_free not found, cannot apply R_X86_64_GLOB_DAT @0x102eebbc0 ((nil)) in /home/ksco/Downloads/spotube/lib/libflutter_linux_gtk.so
Warning: Global Symbol sdallocx not found, cannot apply R_X86_64_GLOB_DAT @0x102eebbc8 ((nil)) in /home/ksco/Downloads/spotube/lib/libflutter_linux_gtk.so
Warning: Global Symbol OPENSSL_memory_get_size not found, cannot apply R_X86_64_GLOB_DAT @0x102eebbd0 ((nil)) in /home/ksco/Downloads/spotube/lib/libflutter_linux_gtk.so
Warning: Global Symbol _ZTHN4dart8OSThread18current_vm_thread_E not found, cannot apply R_X86_64_GLOB_DAT @0x102eebbe8 ((nil)) in /home/ksco/Downloads/spotube/lib/libflutter_linux_gtk.so
Warning: Weak Symbol OPENSSL_memory_alloc not found, cannot apply R_X86_64_JUMP_SLOT @0x102eecea8 (0xe161e6)
Warning: Weak Symbol OPENSSL_memory_free not found, cannot apply R_X86_64_JUMP_SLOT @0x102eeceb0 (0xe161f6)
Warning: Weak Symbol sdallocx not found, cannot apply R_X86_64_JUMP_SLOT @0x102eeceb8 (0xe16206)
Warning: Weak Symbol OPENSSL_memory_get_size not found, cannot apply R_X86_64_JUMP_SLOT @0x102eecec0 (0xe16216)
Warning: Weak Symbol _ZTHN4dart8OSThread18current_vm_thread_E not found, cannot apply R_X86_64_JUMP_SLOT @0x102eed0c8 (0xe16626)
Last calls
40646|0x1018025fd: Calling my_g_object_new (./spotube)(0x36A94A50, 0x101803004, 0x101803013, ...) => return 0x36AB0E80
40646|PltResolver "g_type_class_peek_parent" => return 0x0
40646|0x10180265c: Calling my_g_type_class_peek_parent (./spotube)(0x36AA7DD0, 0x0, 0x101803013, ...) => return 0x35AF4C18
40646|PltResolver "g_application_get_type" => return 0x35AF4C18
40646|0x101802680: Calling g_application_get_type (/usr/lib/libgio-2.0.so.0)(0x36AA7DD0, 0x0, 0x101803013, ...) => return 0x36615360
40646|PltResolver "g_type_check_class_cast" => return 0x36615360
40646|0x10180268e: Calling g_type_check_class_cast (/usr/lib/libgobject-2.0.so.0)(0x36AA7DD0, 0x36615360, 0x101803013, ...) => return 0x36AA7DD0
40646|0x1018026a7: Calling g_type_check_class_cast (/usr/lib/libgobject-2.0.so.0)(0x36AA7DD0, 0x36615360, 0x101803013, ...) => return 0x36AA7DD0
40646|0x1018026c2: Calling g_type_check_class_cast (/usr/lib/libgobject-2.0.so.0)(0x36AA7DD0, 0x50, 0x101803013, ...) => return 0x36AA7DD0
40646|PltResolver "g_type_check_instance_cast" => return 0x36A94A50
40646|0x10180248e: Calling g_type_check_instance_cast (/usr/lib/libgobject-2.0.so.0)(0x36AB0E80, 0x36A94A50, 0x101803013, ...) => return 0x36AB0E80
40646|0x101802496: Calling g_application_get_type (/usr/lib/libgio-2.0.so.0)(0x36AB0E80, 0x36A94A50, 0x101803013, ...) => return 0x36615360
40646|0x1018024a1: Calling g_type_check_instance_cast (/usr/lib/libgobject-2.0.so.0)(0x36AB0E80, 0x36615360, 0x101803013, ...) => return 0x36AB0E80
40646|PltResolver "g_application_run" => return 0x36AB0E80
40646|0x1018024ae: Calling g_application_run (/usr/lib/libgio-2.0.so.0)(0x36AB0E80, 0x1, 0x10200F448, ...) => return 
40646|PltResolver "g_object_new" => return 0x0
40646|SIGILL @0x101802930 (???(0x101802930)) (x64pc=0x80313/???:"???", rsp=0x10200f3f8, stack=0x101810000:0x102010000 own=(nil) fp=0x1), for accessing 0x101802930 (code=1/prot=87), db=(nil)((nil):(nil)/(nil):(nil)/???:clean, hash:0/0) handler=(nil)
RSP-0x20:0x0000000000030080 RSP-0x18:0x0000000000000001 RSP-0x10:0x000000003659b7d0 RSP-0x08:0x0000000000000001
RSP+0x00:0x00000001018024ae RSP+0x08:0x0000000000000000 RSP+0x10:0x0000000000000000 RSP+0x18:0x000000010200f420
RAX:0x0000000036ab0e80 RCX:0x0000000101802a20 RDX:0x000000010200f448 RBX:0x0000000036ab0e80 
RSP:0x000000010200f3f8 RBP:0x0000000000000001 RSI:0x0000000000000001 RDI:0x0000000036ab0e80 
 R8:0x0000000000000020  R9:0x0000000000000000 R10:0x000000010311c780 R11:0x0000000000000000 
R12:0x0000000000000000 R13:0x0000000000000000 R14:0x000000010200f448 R15:0x0000000000000000 
ES:0x002b CS:0x0033 SS:0x002b DS:0x002b GS:0x0043 FS:0x0053  opcode=41 57 41 56 41 54 53 50 (C3 00 00 00 00)
[1]    40646 illegal hardware instruction (core dumped)  BOX64_ROLLING_LOG=1 ./spotube
ksco@Asahi:~/Downloads/spotube 132$ 

@ptitSeb
Copy link
Owner

ptitSeb commented Jun 21, 2023

Error is linked to some missing wrapping maybe? wrapping issue anyway. The function call that trigger the SIGILL is g_application_run(...) so I suspect one creation of some object fail. Try to debug (or use BOX64_JITGDB=2) to see the calls, maybe it will gives you a hint on what is going on.
You can also simply try to use BOX64_SHOWBT=1, it might be enough to see the emulated & native backtrace at theSIGILL...

@ksco
Copy link
Collaborator Author

ksco commented Jun 21, 2023

(gdb) bt
#0  0x0000fffed83e4824 in clock_nanosleep () at /usr/lib/libc.so.6
#1  0x0000fffed83e9cac in nanosleep () at /usr/lib/libc.so.6
#2  0x0000fffed8413c44 in usleep () at /usr/lib/libc.so.6
#3  0x00000000349f23e4 in my_box64signalhandler (sig=4, info=0xffffc149d770, ucntx=0xffffc149d7f0)
    at /home/ksco/Developer/box64/src/libtools/signals.c:1167
#4  0x0000fffed85547d0 in <signal handler called> ()
#5  0x0000000101802930 in  ()
#6  0x0000000034a8d050 in iFpip () at /home/ksco/Developer/box64/src/wrapped/generated/wrapper.c:3341
(gdb) 

How do I know which one the iFpip is...

@ptitSeb
Copy link
Owner

ptitSeb commented Jun 21, 2023

I guess it's GO(g_application_run, iFpip)

@ksco
Copy link
Collaborator Author

ksco commented Jun 21, 2023

Yes it is, not much information is given by backtrace :( Fortunately, not many calls before the g_application_run call, I guess I have to check on them one by one.

@ksco
Copy link
Collaborator Author

ksco commented Jun 21, 2023

I pushed some fixes, but it seems not related to this issue :(

@ksco
Copy link
Collaborator Author

ksco commented Jun 21, 2023

The g_type_class_peek_parent is a complicated one, so the issue might be with it.

@ptitSeb ptitSeb merged commit 6eb72b7 into ptitSeb:main Jun 21, 2023
@ksco ksco deleted the gtk branch June 22, 2023 05:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants