Giter VIP home page Giter VIP logo

Comments (5)

scartill avatar scartill commented on September 28, 2024

@4br3mm0rd Could you please also provide your log's contents and a config? Thanks!

from lds.

4br3mm0rd avatar 4br3mm0rd commented on September 28, 2024

Sure, here is the configuration file
I cannot see the logs since the crash shuts down the UI. Is there a way to have it written into a file?

encoded_type = []
log_level = ""
 
[mqtt]
  server = "tcp://localhost:1883"
  user = ""
  password = ""
  downlink_topic = "gateway/1111111111111111/event/up"
  uplink_topic = "gateway/1111111111111111/event/down"
 
[forwarder]
  nserver = ""
  nsport = ""
 
[band]
  name = "US_902_928"
 
[device]
  eui = "1111111111111111"
  address = "22222222"
  network_session_encription_key = "33333333333333333333333333333333"
  serving_network_session_integrity_key = "44444444444444444444444444444444"
  forwarding_network_session_integrity_key = "55555555555555555555555555555555"
  application_session_key = "66666666666666666666666666666666"
  marshaler = ""
  nwk_key = ""
  app_key = ""
  join_eui = ""
  mac_version = 0
  profile = "ABP"
  joined = false
  skip_fcnt_check = true
 
[gateway]
  mac = "1111111111111111"
  bridge_version = ""
 
[data_rate]
  bandwith = 125
  spread_factor = 7
  bit_rate = 0
 
[rx_info]
  channel = 0
  code_rate = ""
  crc_status = 0
  frequency = 0
  lora_snr = 0.0
  rf_chain = 0
  rssi = 0
 
[raw_payload]
  payload = ""
  use_raw = false
  script = "\n// Encode encodes the given object into an array of bytes.\n//  - fPort contains the LoRaWAN fPort number\n//  - obj is an object, e.g. {\"temperature\": 22.5}\n// The function must return an array of bytes, e.g. [225, 230, 255, 0]\nfunction Encode(fPort, obj) {\n\treturn [];\n}\n"
  use_encoder = false
  max_exec_time = 100
  js_object = ""
  fport = 0
 
[redis]
  addr = ""
  password = ""
  db = 0
 
[window]
  width = 1200
  height = 1000
 
[provisioner]
  hostname = ""
  username = ""
  password = ""
  path = ""
  Token = ""

from lds.

JohnRoesler avatar JohnRoesler commented on September 28, 2024

I am importing the lds package into an automated simulator. Prior to the loraserver v3 release it was working. Now I am seeing same fault.

I am calling device.Uplink(..) in my code, and when running debug, it hits the nil pointer dereference here: https://github.com/iegomez/lds/blob/master/lds/lds.go#L263

Connection established.
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x13d2ce7]

goroutine 1 [running]:
github.com/iegomez/lds/lds.(*Device).Uplink(0xc00012a000, 0x156f4a0, 0xc000108000, 0x14d193c, 0x12, 0x102, 0xc00012c000, 0xc0000940c0, 0xc00002a0e8, 0x8, ...)
        /Users/z001w4m/go/pkg/mod/github.com/iegomez/[email protected]/lds/lds.go:263 +0xd7

from lds.

4br3mm0rd avatar 4br3mm0rd commented on September 28, 2024

Here is another segmentation fault that I was able to reproduce:

panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x91a382]

goroutine 1 [running, locked to thread]:
github.com/iegomez/lds/lds.(*Device).SetMarshaler(0x0, 0xbb98ff, 0x8)
	/home/lora/Desktop/lds/lds/lds.go:90 +0xb2
main.beginDeviceForm()
	/home/lora/Desktop/lds/device.go:84 +0xd69
main.main()
	/home/lora/Desktop/lds/main.go:375 +0x312

This happens with the following configuration when I select "protobuf" as the Marshaler.
EDIT: this seems to be independent of the configuration, and to happen anytime I select a marshaler.

encoded_type = []
log_level = ""

[mqtt]
  server = "tcp://10.0.0.13:8000"
  user = ""
  password = ""
  downlink_topic = ""
  uplink_topic = ""

[forwarder]
  nserver = ""
  nsport = ""

[band]
  name = "US_902_928"

[device]
  eui = "1111111111111111"
  address = "22222222"
  network_session_encription_key = "33333333333333333333333333333333"
  serving_network_session_integrity_key = "44444444444444444444444444444444"
  forwarding_network_session_integrity_key = "55555555555555555555555555555555"
  application_session_key = "66666666666666666666666666666666"
  marshaler = ""
  nwk_key = "22222222222222222222222222222222"
  app_key = "76757279736563726574"
  join_eui = ""
  mac_version = 0
  profile = "ABP"
  joined = false
  skip_fcnt_check = true

[gateway]
  mac = ""
  bridge_version = ""

[data_rate]
  bandwith = 125
  spread_factor = 7
  bit_rate = 0

[rx_info]
  channel = 0
  code_rate = ""
  crc_status = 0
  frequency = 0
  lora_snr = 0.0
  rf_chain = 0
  rssi = 0

[raw_payload]
  payload = ""
  use_raw = false
  script = "\n// Encode encodes the given object into an array of bytes.\n//  - fPort contains the LoRaWAN fPort number\n//  - obj is an object, e.g. {\"temperature\": 22.5}\n// The function must return an array of bytes, e.g. [225, 230, 255, 0]\nfunction Encode(fPort, obj) {\n\treturn [];\n}\n"
  use_encoder = false
  max_exec_time = 100
  js_object = ""
  fport = 0

[redis]
  addr = ""
  password = ""
  db = 0

[window]
  width = 1200
  height = 1000

[provisioner]
  hostname = ""
  username = ""
  password = ""
  path = ""
  Token = ""

Hope this helps :)

from lds.

scartill avatar scartill commented on September 28, 2024

Thank for reporting! At the least 4br3mm0rd's issues should be solved. If something persists, please let me know.

from lds.

Related Issues (20)

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.