NS_ASSERT failed: Attempted to dereference zero pointer in TDMA simulation

12 views
Skip to first unread message

Pratyush Sharma

unread,
Apr 26, 2025, 9:24:27 AMApr 26
to 5G-LENA-users

Hi everyone,

I'm working on setting up a basic 5G NR TDMA simulation using ns-3.42 with 5G-LENA.
I'm trying to simulate 1 gNB and 10 UEs with TDMA scheduling (NrMacSchedulerTdmaRR), UDP traffic, and periodic QoS metric collection.

However, when I run the simulation, I encounter this fatal error:

[0/2] Re-checking globbed directories...
ninja: no work to do.
 [ CellId 0, bwpId 65535] Set pattern : F|F|F|F|F|F|F|F|F|F|
 [ CellId 0, bwpId 65535] Set pattern : F|F|F|F|F|F|F|F|F|F|
 [ CellId 0, bwpId 65535] Set pattern : F|F|F|F|F|F|F|F|F|F|
 [ CellId 0, bwpId 65535] Set pattern : DL|DL|DL|DL|DL|DL|F|UL|UL|UL|
NS_ASSERT failed, cond="m_ptr", msg="Attempted to dereference zero pointer", +0.000000000s -1 file=/Users/pratyush/ns-allinone-3.42/ns-3.42/src/core/model/ptr.h, line=718
NS_FATAL, terminating
libc++abi: terminating
Command 'build/scratch/ns3.42-tdma-default' died with <Signals.SIGABRT: 6>.

It seems like a null pointer dereference happening early in the simulation.

Relevant part of my setup:

  • Using CcBwpCreator to create a 3.5 GHz, 40 MHz operation band.

  • Creating a vector of bandwidth part pointers (using band.GetBwpAt(0, 0)) and installing gNB/UE devices with it.

  • Scheduler set to "ns3::NrMacSchedulerTdmaRR".

  • Configured TDD pattern (DL|DL|DL|DL|DL|DL|F|UL|UL|UL) using Config::SetDefault.

  • Application traffic is UDP, started after 1s.

Additional context:

  • OS: macOS ARM64 (M1)

  • ns-3 version: 3.42

  • 5G-LENA version bundled with ns-3.42



Reply all
Reply to author
Forward
0 new messages