Review Request 130245: Fix Crash on JoyStick Config when js device did not contain regular joystick button

TOM Harrison via Review Board noreply at kde.org
Thu Sep 21 00:55:35 BST 2017



> On 九月 16, 2017, 9:19 a.m., Albert Astals Cid wrote:
> > Are you sure this fixes anything?
> > 
> > Just before the lines you changed we have
> > 
> > 
> > if ( ! buttonTbl->item(number, 0) )
> >       buttonTbl->setItem(number, 0, new QTableWidgetItem());
> >       
> > Which will create the item, no?
> > 
> > Or is it because number is a negative value somehow?
> 
> TOM Harrison wrote:
>     no, It still NULL after that.
>     
>     I think because "btnx keyboard" is not a real joystick, so It may not accept any button.
> 
> Albert Astals Cid wrote:
>     Can you please check what is the value of number? Because what you're saying kind of falls on the "can't be" territory. We just set an item, it can't be null just on the next line.
> 
> TOM Harrison wrote:
>     number is 0, it did has execute the setItem. but still null after that.
> 
> TOM Harrison wrote:
>     I found every button is all execute setItem, but still null after that.
> 
> Albert Astals Cid wrote:
>     i'm going to guess this has not worked in a long time and needs a buttonTbl->setColumnCount(1) after buttonTbl->setRowCount(joydev->numButtons());?
>     
>     Does that fix it?
> 
> TOM Harrison wrote:
>     Not fix. still crash after add buttonTbl->setColumnCount(1)
> 
> TOM Harrison wrote:
>     I have test a real joystick. It working. It only not working on "btnx Keyboard" which is generated by btnx.
> 
> Albert Astals Cid wrote:
>     What is btnx?
> 
> TOM Harrison wrote:
>     A kind of mouse key re-routing software. I use for define custom hotkey for extra mouse key.
>     Its github: https://github.com/cdobrich/btnx
> 
> Albert Astals Cid wrote:
>     Would you share the configuration you're using that makes this crash so i can try to reproduce it?
> 
> TOM Harrison wrote:
>     https://www.mediafire.com/file/95k5d81s2qi5un2/btnx.tar
>     btnx.tar contain directly btnx directory under /etc. I do not know that it will working or not. btnx has remember productID and vendorID in config.
> 
> Albert Astals Cid wrote:
>     The problem is that btnx reports a negative number of buttons, so https://phabricator.kde.org/D7900 is the proper fix.
> 
> Albert Astals Cid wrote:
>     Please close this request review since D7900 already landed for Plasma 5.11

OK, thanks for reply


- TOM


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/130245/#review103704
-----------------------------------------------------------


On 九月 16, 2017, 7:07 a.m., TOM Harrison wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/130245/
> -----------------------------------------------------------
> 
> (Updated 九月 16, 2017, 7:07 a.m.)
> 
> 
> Review request for kde-workspace.
> 
> 
> Repository: plasma-desktop
> 
> 
> Description
> -------
> 
> This patch will fix the joystick config when detect "btnx keyboard" as joystick, It will crash.
> Due to Btnx keyboard is not a regular joystick.
> Just add one more if to fix this crash.
> 
> 
> Diffs
> -----
> 
>   kcms/hardware/joystick/joywidget.cpp 6007d867 
> 
> 
> Diff: https://git.reviewboard.kde.org/r/130245/diff/1/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> TOM Harrison
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20170920/23da57bb/attachment.htm>


More information about the kde-core-devel mailing list