Giter VIP home page Giter VIP logo

ari's People

Contributors

andy-k-sparklight avatar cavenightingale avatar wxkj123 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

ari's Issues

Suggestions In Improving Code

I have skimmed through all your C++ source files and found some problems.


Ari/src/Main.cc

Line 116 in aafc16c

loginWindow);

Here, params is not cJSON_Delete()ed.


size_t

Here, the return value should be ssize_t, since size_t indicates unsigned.


uv_thread_join(&tx->tid);

uv_thread_join(&threads[i]->tid);

Is this really thread safe? How do you make sure worker thread don't delete tx?


uv_thread_create(

Resource Leak. C++ is not Java, you need to detach a thread if you don't want to join, or it will not release its resource and wait for other thread to join.

Webview Crashing When Performing RPC Call

终端中的日志:

 [src/sys/Init.cc:21] Initializing system.
[src/sys/Storage.cc:52] Loading config from /home/xiaopangju/.alicorn-ch/Main.kv
[src/sys/Schedule.cc:58] Setting up UV thread.
[src/sys/Schedule.cc:63] UV thread created.
[src/core/platform/Finder.cc:43] Configured base path as "/home/xiaopangju/.alicorn-ch"
[src/core/network/Download.cc:297] Setting up download sync service.
[src/sys/Init.cc:33] Finished system initializing.
[src/drivers/aria2/Aria2Driver.cc:106] Starting aria2 daemon with port 6801
[src/drivers/aria2/Aria2Driver.cc:113] Successfully started aria2 daemon with pid 9760
[src/drivers/aria2/Aria2Driver.cc:106] Starting aria2 daemon with port 6802
[src/drivers/aria2/Aria2Driver.cc:113] Successfully started aria2 daemon with pid 9772
CONSOLE LOG Hi.
CONSOLE LOG It's so good to see you again.
CONSOLE LOG I missed you.
undefined:11:24: CONSOLE JS ERROR Unhandled Promise Rejection: TypeError: undefined is not an object (evaluating 'window.external.invoke')

截图:
图片
系统信息:
图片

Frontend Occasionally Give Wrong Result

When clicking buttons, the frontend occasionally give wrong result, causing callback handler to crash.
This happens occasionally, so it needs to be confirmed.

A possible way to reproduce:

  1. Choose Launch Game.
  2. Choose any profile.
  3. If terminal outputs Configuring launch profile for launch, this is reproduced, and the game won't launch, leaving an error message.

Ari Crashes when Refreshing the Page

Step to reproduce:

  1. start Ari
  2. wait for the window
  3. click refresh
  4. see Segmentation fault
Thread 1 "Ari" received signal SIGSEGV, Segmentation fault.
0x00005555556c776c in webview::detail::gtk_webkit_engine::set_size (hints=0, height=0, width=0, this=0x20) at ../inc/webview.h:506
506         gtk_window_set_resizable(GTK_WINDOW(m_window), hints != WEBVIEW_HINT_FIXED);
(gdb) bt
#0  0x00005555556c776c in webview::detail::gtk_webkit_engine::set_size(int, int, int) (hints=0, height=0, width=0, this=0x20) at ../inc/webview.h:506
#1  webview_set_size (hints=0, height=0, width=0, w=0x20) at ../inc/webview.h:1653
#2  operator() (__closure=0x0, seq=<optimized out>, arg=0x555555a79e30, req=<optimized out>) at ../src/Main.cc:73
#3  _FUN(char const*, char const*, void*) () at ../src/Main.cc:77
#4  0x00005555556cd284 in std::function<void (std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, void*)>::operator()(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, void*) const (__args#2=<optimized out>, __args#1="[1946,1317,1167,790]", __args#0="1", this=0x5555558c51f0)
    at /usr/include/c++/12/bits/std_function.h:591
#5  webview::webview::on_message(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) (this=<optimized out>, msg=<optimized out>)
    at ../inc/webview.h:1610
#6  0x00005555556cb1d8 in webview::detail::gtk_webkit_engine::gtk_webkit_engine(bool, void*)::{lambda(_WebKitUserContentManager*, _WebKitJavascriptResult*, void*)#2}::operator()(_WebKitUserContentManager*, _WebKitJavascriptResult*, void*) const (__closure=0x0, arg=0x555555788340, r=<optimized out>) at /usr/include/c++/12/bits/basic_string.tcc:238
#7  webview::detail::gtk_webkit_engine::gtk_webkit_engine(bool, void*)::{lambda(_WebKitUserContentManager*, _WebKitJavascriptResult*, void*)#2}::_FUN(_WebKitUserContentManager*, _WebKitJavascriptResult*, void*) () at ../inc/webview.h:460
#8  0x00007ffff7e7cf50 in g_closure_invoke (closure=0x555555c43670, return_value=0x0, n_param_values=2, param_values=0x7fffffffcc10, invocation_hint=0x7fffffffcb90)
    at ../../../gobject/gclosure.c:832
#9  0x00007ffff7eaad66 in signal_emit_unlocked_R.isra.0
    (node=node@entry=0x5555559585a0, detail=detail@entry=1744, instance=instance@entry=0x5555558ce420, emission_return=emission_return@entry=0x0, instance_and_params=instance_and_params@entry=0x7fffffffcc10) at ../../../gobject/gsignal.c:3796
#10 0x00007ffff7e9b17a in g_signal_emit_valist (instance=<optimized out>, signal_id=<optimized out>, detail=<optimized out>, var_args=var_args@entry=0x7fffffffcdd0)
    at ../../../gobject/gsignal.c:3549
#11 0x00007ffff7e9b403 in g_signal_emit (instance=<optimized out>, signal_id=<optimized out>, detail=<optimized out>) at ../../../gobject/gsignal.c:3606
#12 0x00007ffff3d5b39f in ScriptMessageClientGtk::didPostMessage(WebKit::WebPageProxy&, WebKit::FrameInfoData&&, API::ContentWorld&, WebCore::SerializedScriptValue&) ()
    at ./Source/WebKit/UIProcess/API/glib/WebKitUserContentManager.cpp:239
#13 0x00007ffff3defd5b in WebKit::WebUserContentControllerProxy::didPostMessage(WTF::ObjectIdentifier<WebKit::WebPageProxyIdentifierType>, WebKit::FrameInfoData&&, unsigned long, WTF::Span<unsigned char const, 18446744073709551615ul> const&, WTF::CompletionHandler<void (WTF::Span<unsigned char const, 18446744073709551615ul> const&, WTF::String const&)>&&) () at ./Source/WebKit/UIProcess/UserContent/WebUserContentControllerProxy.cpp:343
#14 0x00007ffff39c858a in IPC::callMemberFunctionImpl<WebKit::WebUserContentControllerProxy, void (WebKit::WebUserContentControllerProxy::*)(WTF::ObjectIdentifier<WebKit::WebPageProxyIdentifierType>, WebKit::FrameInfoData&&, unsigned long, WTF::Span<unsigned char const, 18446744073709551615ul> const&, WTF::CompletionHandler<void (WTF::Span<unsigned char const, 18446744073709551615ul> const&, WTF::String const&)>&&), void (WTF::Span<unsigned char const, 18446744073709551615ul> const&, WTF::String const&), std::tuple<WTF::ObjectIdentifier<WebKit::WebPageProxyIdentifierType>, WebKit::FrameInfoData, unsigned long, WTF::Span<unsigned char const, 18446744073709551615ul> >, 0ul, 1ul, 2ul, 3ul>(WebKit::WebUserContentControllerProxy*, void (WebKit::WebUserContentControllerProxy::*)(WTF::ObjectIdentifier<WebKit::WebPageProxyIdentifierType>, WebKit::FrameInfoData&&, unsigned long, WTF::Span<unsigned char const, 18446744073709551615ul> const&, WTF::CompletionHandler<void (WTF::Span<unsigned char const, 18446744073709551615ul> const&, WTF::String const&)>&&), WTF::CompletionHandler<void (WTF::Span<unsigned char const, 18446744073709551615ul> const&, WTF::String const&)>&&, std::tuple<WTF::ObjectIdentifier<WebKit::WebPageProxyIdentifierType>, WebKit::FrameInfoData, unsigned long, WTF::Span<unsigned char const, 18446744073709551615ul> >&&, std::integer_sequence<unsigned long, 0ul, 1ul, 2ul, 3ul>) ()
    at ./Source/WebKit/Platform/IPC/HandleMessage.h:145
#15 IPC::callMemberFunction<WebKit::WebUserContentControllerProxy, void (WebKit::WebUserContentControllerProxy::*)(WTF::ObjectIdentifier<WebKit::WebPageProxyIdentifierType>, WebKit::FrameInfoData&&, unsigned long, WTF::Span<unsigned char const, 18446744073709551615ul> const&, WTF::CompletionHandler<void (WTF::Span<unsigned char const, 18446744073709551615ul> const&, WTF::String const&)>&&), void (WTF::Span<unsigned char const, 18446744073709551615ul> const&, WTF::String const&), std::tuple<WTF::ObjectIdentifier<WebKit::WebPageProxyIdentifierType>, WebKit::FrameInfoData, unsigned long, WTF::Span<unsigned char const, 18446744073709551615ul> >, std::integer_sequence<unsigned long, 0ul, 1ul, 2ul, 3ul> >(std::tuple<WTF::ObjectIdentifier<WebKit::WebPageProxyIdentifierType>, WebKit::FrameInfoData, unsigned long, WTF::Span<unsigned char const, 18446744073709551615ul> >&&, WTF::CompletionHandler<void (WTF::Span<unsigned char const, 18446744073709551615ul> const&, WTF::String const&)>&&, WebKit::WebUserContentControllerProxy*, void (WebKit::WebUserContentControllerProxy::*)(WTF::ObjectIdentifier<WebKit::WebPageProxyIdentifierType>, WebKit::FrameInfoData&&, unsigned long, WTF::Span<unsigned char const, 18446744073709551615ul> const&, WTF::CompletionHandler<void (WTF::Span<unsigned char const, 18446744073709551615ul> const&, WTF::String const&)>&&)) ()
    at ./Source/WebKit/Platform/IPC/HandleMessage.h:151
#16 IPC::handleMessageAsync<Messages::WebUserContentControllerProxy::DidPostMessage, WebKit::WebUserContentControllerProxy, void (WebKit::WebUserContentControllerProxy::*)(WTF::ObjectIdentifier<WebKit::WebPageProxyIdentifierType>, WebKit::FrameInfoData&&, unsigned long, WTF::Span<unsigned char const, 18446744073709551615ul> const&, WTF::CompletionHandler<void (WTF::Span<unsigned char const, 18446744073709551615ul> const&, WTF::String const&)>&&)>(IPC::Connection&, IPC::Decoder&, WebKit::WebUserContentControllerProxy*, void (WebKit::WebUserContentControllerProxy::*)(WTF::ObjectIdentifier<WebKit::WebPageProxyIdentifierType>, WebKit::FrameInfoData&&, unsigned long, WTF::Span<unsigned char const, 18446744073709551615ul> const&, WTF::CompletionHandler<void (WTF::Span<unsigned char const, 18446744073709551615ul> const&, WTF::String const&)>&&)) ()
    at ./Source/WebKit/Platform/IPC/HandleMessage.h:353
#17 0x00007ffff39c7e38 in WebKit::WebUserContentControllerProxy::didReceiveMessage(IPC::Connection&, IPC::Decoder&) ()
    at DerivedSources/WebKit/WebUserContentControllerProxyMessageReceiver.cpp:79
#18 0x00007ffff3bb5aa8 in IPC::MessageReceiverMap::dispatchMessage(IPC::Connection&, IPC::Decoder&) () at ./Source/WebKit/Platform/IPC/MessageReceiverMap.cpp:129
#19 0x00007ffff3c6b4d6 in WebKit::WebProcessProxy::didReceiveMessage(IPC::Connection&, IPC::Decoder&) () at ./Source/WebKit/UIProcess/WebProcessProxy.cpp:832
#20 0x00007ffff3baeac5 in IPC::Connection::dispatchMessage(std::unique_ptr<IPC::Decoder, std::default_delete<IPC::Decoder> >) ()
    at ./Source/WebKit/Platform/IPC/Connection.cpp:1150
--Type <RET> for more, q to quit, c to continue without paging--
#21 0x00007ffff3bb0ddf in IPC::Connection::dispatchIncomingMessages() () at ./Source/WebKit/Platform/IPC/Connection.cpp:1254
#22 0x00007ffff2d187a5 in WTF::Function<void ()>::operator()() const () at ./Source/WTF/wtf/Function.h:82
#23 WTF::RunLoop::performWork() () at ./Source/WTF/wtf/RunLoop.cpp:133
#24 0x00007ffff2d76f0d in operator() () at ./Source/WTF/wtf/glib/RunLoopGLib.cpp:80
#25 _FUN() () at ./Source/WTF/wtf/glib/RunLoopGLib.cpp:82
#26 0x00007ffff2d777f3 in operator() () at ./Source/WTF/wtf/glib/RunLoopGLib.cpp:53
#27 _FUN() () at ./Source/WTF/wtf/glib/RunLoopGLib.cpp:56
#28 0x00007ffff791c43f in g_main_dispatch (context=0x5555557d6970) at ../../../glib/gmain.c:3444
#29 g_main_context_dispatch (context=0x5555557d6970) at ../../../glib/gmain.c:4162
#30 0x00007ffff79713c8 in g_main_context_iterate.constprop.0 (context=0x5555557d6970, block=<optimized out>, dispatch=1, self=<optimized out>) at ../../../glib/gmain.c:4238
#31 0x00007ffff791baef in g_main_loop_run (loop=0x555555bc2ec0) at ../../../glib/gmain.c:4438
#32 0x00007ffff724756d in gtk_main () at ../../../../gtk/gtkmain.c:1329
#33 0x00005555555a4c96 in webview::detail::gtk_webkit_engine::run() (this=0x555555788340) at ../inc/webview.h:490
#34 webview_run (w=0x555555788340) at ../inc/webview.h:1631
#35 main(int, char**) (argc=1, argv=<optimized out>) at ../src/Main.cc:185

Build Script Is Not POSIX Shell Compatible

shigure is actually a bash script but declared as #!/bin/sh, which will link to an installed POSIX-compatible shell.
This works on BSD, macOS or ArchLinux since their default /bin/sh implementation is bash .
However, on modern Debian-based distribution, the default /bin/sh implementation has switched to dash to improve performance.
shigure use lots of non-POSIX syntax, such as arrays, which lead to crash on modern Debian and other people who use shell other than bash as /bin/sh implementation, so shigure should be declared as #!/bin/bash instead of #!/bin/sh.

Windows Not Displaying On OSX

It seems that seperated natives might cause game not to work.
Need to be confirmed, but we really need a module smarter than 'scan and unpack'.

It turns out that one extra argument cause game to crash.
However, we've updated the natives resolution module too.

Ari Crash During Startup

[src/sys/Init.cc:28] Initializing system.
[src/sys/Storage.cc:52] Loading config from /home/billy/.alicorn-ch/Main.kv
[src/sys/Schedule.cc:60] Setting up UV thread.
[src/sys/Schedule.cc:65] UV thread created.
[src/core/platform/Finder.cc:43] Configured base path as "/home/billy/.alicorn-ch"
[src/core/network/Download.cc:314] Setting up download sync service.
[src/sys/Init.cc:45] Finished system initializing.
[src/extra/mod/provider/Modrinth.cc:250] Modrinth RPC server is listening.
[src/drivers/aria2/Aria2Driver.cc:106] Starting aria2 daemon with port 6801
[src/drivers/aria2/Aria2Driver.cc:113] Successfully started aria2 daemon with pid 2978954
非法指令 (核心已转储)

Some further research is needed.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.