You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have been working on serialization logic in my app last week and i found an asynchronous crashes in one of these two functions - serialize()/deserialize(). It somehow related to amount of requests and amount of data, which goes through socket. Because, if i send few data using my Client/Server modules, it works fine. So, on a high level i have a Server and Client modules, which do the job. Here is a server side:
include("../src/ImportFolders.jl")
import Config
import Server
import Connection
import Event
import Helper
functiononBeforeResponse(sock::Base.TCPSocket, cmd::Connection.Command, ans::Connection.Answer)
# this is response data for client
ans.data =Array{Float64, 1}(100)
# just server to client requests with some custom (Helper.Point) data to produce the issuefor i =1:1000 Server.request(sock, 1, Helper.Point(rand(1:200), rand(1:200))) endend
con = Server.create(ip"127.0.0.1", 2000)
Event.on(con.observer, Server.EVENT_BEFORE_RESPONSE, onBeforeResponse)
Server.run(con)
I run it in command line like this:
julia -i --color=yes tmp\AppServerTest.jl
The client:
include("../src/ImportFolders.jl")
import Config
import Client
import Connection
import Event
import Helper
function_onBeforeResponse(data::Connection.Command, ans::Connection.Answer)
# just some answer data for server
ans.data =Array{Int, 1}(20)
end
con = Client.create(ip"127.0.0.1", Config.val(:CONNECTION_SERVER_PORT))
Event.on(con.observer, Client.EVENT_BEFORE_RESPONSE, _onBeforeResponse)
I run this using this command line:
julia -i --color=yes tmp\AppClientTest.jl
After correct running of client and server i use this commands on a client side:
julia> WARNING: Server._answer(): BoundsError(Any[Symbol,Int8,UInt8,Int16,UInt16,Int32,UInt32,Int64,UInt64,Int128,UInt128,Float32,Float64,Char,Ptr{T},DataType,Union,Function,Tuple,Array{T,N
},Expr,Symbol,Tuple,Expr,LineNumberNode,SymbolNode,LabelNode,GotoNode,QuoteNode,TopNode,TypeVar,Box,LambdaStaticData,Module,Symbol,Task,ASCIIString,UTF8String,UTF16String,UTF32String,Float1
6,SimpleVector,Symbol,:reserved11,:reserved12,(),Bool,Any,:Any,Union{},:reserved21,:reserved22,Type{T},:Array,:TypeVar,:Box,:lambda,:body,:return,:call,:(::),:(=),:null,:gotoifnot,:A,:B,:C,
:M,:N,:T,:S,:X,:Y,:a,:b,:c,:d,:e,:f,:g,:h,:i,:j,:k,:l,:m,:n,:o,:p,:q,:r,:s,:t,:u,:v,:w,:x,:y,:z,:add_int,:sub_int,:mul_int,:add_float,:sub_float,:mul_float,:unbox,:box,:eq_int,:slt_int,:sle
_int,:ne_int,:arrayset,:arrayref,:Core,:Base,svec(),Tuple{},:reserved17,:reserved18,:reserved19,:reserved20,false,true,nothing,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,
24,25,26,27,28,29,30,31,32],(0,))
BoundsError: attempt to access 157-element Array{Any,1}:
Symbol
Int8
UInt8
Int16
UInt16
Int32
UInt32
Int64
UInt64
Int128
UInt128
Float32
Float64
Char
Ptr{T}
DataType
Union
Function
Tuple
Array{T,N}
Expr
?
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
at index [0]WARNING: Server._answer(): MethodError(convert,(Tuple{Vararg{Int64}},symbol("")))
MethodError: `convert` has no method matching convert(::Type{Tuple{Vararg{Int64}}}, ::Symbol)
This may have arisen from a call to the constructor Tuple{Vararg{Int64}}(...),
since type constructors fall back to convert methods.
Closest candidates are:
call{T}(::Type{T}, ::Any)
convert{T}(::Type{Tuple{Vararg{T}}}, ::Tuple)
To be onest, there are many related to bugs to current, but this one is a most common. The same error sometimes occures on a client as well.
Good evening.
I have been working on serialization logic in my app last week and i found an asynchronous crashes in one of these two functions - serialize()/deserialize(). It somehow related to amount of requests and amount of data, which goes through socket. Because, if i send few data using my Client/Server modules, it works fine. So, on a high level i have a Server and Client modules, which do the job. Here is a server side:
I run it in command line like this:
The client:
I run this using this command line:
After correct running of client and server i use this commands on a client side:
They produce these errors on a server side.
To be onest, there are many related to bugs to current, but this one is a most common. The same error sometimes occures on a client as well.
You may checkout my repo from https://github.com/tmptrash/jevo. I've tested this on a commit: da420f8e5f681ffcb2e291f16a770b06847aaf19
Thanks.
The text was updated successfully, but these errors were encountered: