Opened 9 years ago

Closed 8 years ago

Last modified 6 years ago

#7038 closed bug (fixed)

Network Settings fails on VirtualBox

Reported by: yahd Owned by: axeld
Priority: normal Milestone: R1
Component: Preferences/Network Version: R1/Development
Keywords: Network, VirtualBox, Ethernet Cc:
Blocked By: Blocking: #5957, #7455
Has a Patch: yes Platform: x86

Description

How to reproduce:

  1. Set VirtualBox Network Card to NAT mode
  2. In Haiku execute Preferences-Network Preferences
  3. Error message is shown
The application: /boot/system/preferences/Network has encountered an error <...>

Additional info:

[tcsetpgrp failed in terminal_inferior: Invalid Argument]
[Switching to team   /boot/system/preferences/Network  (563) thread Network(563)]
0x00209022 in EthernetSettingsView::_ShowConfiguration()

Attachments (4)

Network_Preferences_bad_interface_no_crash.diff (633 bytes ) - added by jscipione 8 years ago.
Checks to see if your first adapter exists before trying to load it, fixes crash, window opens with nothing filled in
Screen shot of empty network preferences window.png (40.8 KB ) - added by jscipione 8 years ago.
Screen shot of the network preferences window after applying my patch
Network_Preferences_bad_interface_no_crash_2.diff (859 bytes ) - added by jscipione 8 years ago.
Put check for missing settings in _ShowConfiguration(). Check against NULL explicitly
Screenshot of Network preferences no adapter fixed.png (10.4 KB ) - added by jscipione 8 years ago.
Screenshot of network preferences dialog with no adapter after Axel fixed it in hrev42196

Download all attachments as: .zip

Change History (14)

comment:1 by xray7224, 9 years ago

I can confirm the same bug with the hrev39962 nighly build. Go to open network settings and it crashes before the window appears.

comment:2 by yahd, 9 years ago

Forgot to mention, I has r39964 nighly build.

comment:3 by diver, 9 years ago

Component: Network & InternetPreferences/Network
Owner: changed from nobody to axeld

I can reproduce it in VirtualBox 3.0.12 when I disable network adapter or if I switch to an unsupported one (e.g. PCnet based). When network card is detected Network preflet doesn't crash. So it seems that absence of NIC is not handled properly.

Thread 224 caused an exception: Segment violation
[...]
[Switching to team /boot/system/preferences/Network (224) thread Network (224)]
0x00209022 in EthernetSettingsView::_ShowConfiguration ()
(gdb) bt
#0  0x00209022 in EthernetSettingsView::_ShowConfiguration ()
#1  0x00209900 in EthernetSettingsView::AttachedToWindow ()
#2  0x0038b8aa in BView::_Attach () from /boot/system/lib/libbe.so
#3  0x003929aa in BView::_AddChild () from /boot/system/lib/libbe.so
#4  0x0032784e in BLayout::AddItem () from /boot/system/lib/libbe.so
#5  0x0032179f in BGroupLayout::AddItem () from /boot/system/lib/libbe.so
#6  0x003279e3 in BLayout::AddView () from /boot/system/lib/libbe.so
#7  0x003217e9 in BGroupLayout::AddView () from /boot/system/lib/libbe.so
#8  0x00326ad8 in BLayout::AddView () from /boot/system/lib/libbe.so
#9  0x0032180c in BGroupLayout::AddView () from /boot/system/lib/libbe.so
#10 0x00207edc in NetworkWindow::NetworkWindow ()
#11 0x00207c45 in NetworkApp::ReadyToRun ()
#12 0x002d08f9 in BApplication::DispatchMessage ()
   from /boot/system/lib/libbe.so
#13 0x002db2c4 in BLooper::task_looper () from /boot/system/lib/libbe.so
#14 0x002d0eb4 in BApplication::Run () from /boot/system/lib/libbe.so
#15 0x00207d81 in main ()
(gdb)

BTW: Several network drivers somehow appeared in Preferences -> Network component in Trac.

by jscipione, 8 years ago

Checks to see if your first adapter exists before trying to load it, fixes crash, window opens with nothing filled in

comment:4 by jscipione, 8 years ago

Has a Patch: set

by jscipione, 8 years ago

Screen shot of the network preferences window after applying my patch

comment:5 by jscipione, 8 years ago

Blocking: 7492 added

comment:6 by kallisti5, 8 years ago

Blocking: 7492 removed

Duplicate #7492 closed.

Last edited 8 years ago by kallisti5 (previous) (diff)

comment:7 by kallisti5, 8 years ago

Resolution: fixed
Status: newclosed

Committed in hrev41412. While this isn't a final solution (funky NAT Ethernet device not working needs a separate ticket), it will at least prevent an unexpected crash.

by jscipione, 8 years ago

Put check for missing settings in _ShowConfiguration(). Check against NULL explicitly

comment:8 by axeld, 8 years ago

Redone the fix a bit nicer in hrev42196.

by jscipione, 8 years ago

Screenshot of network preferences dialog with no adapter after Axel fixed it in hrev42196

comment:9 by phoudoin, 8 years ago

Blocking: 7455 added

comment:10 by diver, 6 years ago

Blocking: 5957 added
Note: See TracTickets for help on using tickets.