Opened 11 years ago
Closed 11 years ago
#10186 closed bug (fixed)
Devices application crashes
Reported by: | kallisti5 | Owned by: | nobody |
---|---|---|---|
Priority: | high | Milestone: | R1/beta1 |
Component: | Applications/Devices | Version: | R1/Development |
Keywords: | Cc: | korli, pieter@… | |
Blocked By: | Blocking: | ||
Platform: | All |
Description
thread 944: Devices (main) state: Exception (Segment violation) Frame IP Function Name ----------------------------------------------- 0x7ff30d4d1150 0x6850e0b465 DevicesView::CreateCategoryMap() + 0x59
Complete tracefile attached. Tested on x86 and x86_64
Attachments (5)
Change History (17)
by , 11 years ago
Attachment: | Devices-944-debug-10-11-2013-02-47-26.report added |
---|
comment:1 by , 11 years ago
Priority: | normal → high |
---|
comment:3 by , 11 years ago
can-do. I don't have a ton of free time now-a-days and wanted to get this one documented somewhere.
follow-up: 5 comment:4 by , 11 years ago
Cc: | added |
---|
From a quick look, and assuming I've interpreted the disassembly correctly, it would appear that the call to GetCategory() at http://cgit.haiku-os.org/haiku/tree/src/apps/devices/DevicesView.cpp#n148 returned 0xff, which is well outside the range of the kCategoryString's bounds. Would be interesting to know what kind of device caused that.
follow-up: 6 comment:5 by , 11 years ago
Replying to anevilyak:
From a quick look, and assuming I've interpreted the disassembly correctly, it would appear that the call to GetCategory() at http://cgit.haiku-os.org/haiku/tree/src/apps/devices/DevicesView.cpp#n148 returned 0xff, which is well outside the range of the kCategoryString's bounds. Would be interesting to know what kind of device caused that.
One has to check the kCategoryString's bounds anyway and print a message in such a case.
by , 11 years ago
Attachment: | Devices-852-debug-11-11-2013-05-15-27.report added |
---|
Crash report w/debug
comment:6 by , 11 years ago
Replying to korli:
One has to check the kCategoryString's bounds anyway and print a message in such a case.
That one was me (author of Devices), it's been a while since I've worked on this... I'm working on a patch for the above omission.
In the mean time, Alex, could you please execute listdev -d and post the results? I checked my code and the only reasonable location where fCategory can be outside of the array is when it comes from the DEVICE_TYPE attribute. This attribute which originates from the haiku Device Manager through the syscalls. This attribute will show up under "device/type" attribute when you do listdev -d.
comment:7 by , 11 years ago
Cc: | added |
---|
by , 11 years ago
Attachment: | 0001-Devices-Fix-crash-for-devices-that-returned-unexpect.patch added |
---|
Patch that checks the array bounds and should fix the crash
comment:8 by , 11 years ago
patch: | 0 → 1 |
---|
comment:9 by , 11 years ago
Please try out the patch, should fix the issue. It is my first time using git, hope I did it right.
comment:11 by , 11 years ago
Thanks for the commit. I'm curious to know if it has been fixed for Alex.
comment:12 by , 11 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
fixed here as of hrev46552. Thanks!
Can I suggest attaching a crash report from running a debug build of Devices? It would yield more useful information. Furthermore, the output of listdev or lspci could be of interest, since this seems to be hardware-specific in some way. It's at least it's not reproducible over here.