nus-cs2103-AY2425S1 / forum

12 stars 0 forks source link

Looking for helpful classmates to test .jar file! #300

Open yizhong187 opened 4 days ago

yizhong187 commented 4 days ago

Hi all,

I'm looking for anyone who is keen to help me test my .jar file, particular on a Windows machine! Steps are as listed below:

  1. Download the casper.jar file from here.
  2. Navigate to the folder where you downloaded the .jar file.
  3. Run the application using the following command:
    java -jar casper.jar
  4. A command prompt will open, allowing you to enter commands such as list, sort, find, and more. Here are some example commands you can try: list: Lists all tasks. todo buy milk: Adds a new todo task with the description “buy milk”. mark 1: Marks the first task as complete.

Feel free to refer to my user guide for all features and leave a comment below to let me know if it works well or not!

Thank you!

nus-se-bot commented 4 days ago

Tagging a few other students (randomly selected) who have completed related increments, in case they can pitch in: @muhdbhz @kaixuan477 @Green-Tea-123 @lm-44 @KennethTeo2002 @Chronoxy @samuelthen @T1duS @waihin26 @maahir-garg Others are welcome to pitch in too.

Chronoxy commented 4 days ago

HI @yizhong187

I am a windows user. I've tried testing the product and everything seems to work as per intended. However, at some point when i try to mark and unmark certain tasks, the textfield does not work as intended. Attempt to send the command would fail.

https://github.com/user-attachments/assets/735d0f6a-df08-4914-84af-dc7317a58cf5

maahir-garg commented 4 days ago

@yizhong187 I (Mac User here) tried the same tasks as @Chronoxy and was able to replicate the issue, I think it might have something to do with your deadline not working properly? I might be mistaken tho!

Green-Tea-123 commented 4 days ago

Hi @yizhong187,

I have tested your application on windows and it runs. Here is a screenshot of how it's looking on my PC. image However, I also encountered the bug @Chronoxy found, in which I could not mark or unmark the task that was third in the list. In my case, the task was a todo, so I think it might be something to do with mark/unmark and the tasklist. I tried to delete the third task and it worked.

yizhong187 commented 4 days ago

Oh goodness, thanks for the help y'all. I need to fix that ASAP.

Green-Tea-123 commented 4 days ago

I found the exception caused in my cmd's stack trace, just sending it here for your view:

Exception in thread "JavaFX Application Thread" java.lang.RuntimeException: java.lang.reflect.InvocationTargetException
        at javafx.fxml.FXMLLoader$MethodHandler.invoke(FXMLLoader.java:1857)
        at javafx.fxml.FXMLLoader$ControllerMethodEventHandler.handle(FXMLLoader.java:1724)
        at com.sun.javafx.event.CompositeEventHandler.dispatchBubblingEvent(CompositeEventHandler.java:86)
        at com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(EventHandlerManager.java:234)
        at com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(EventHandlerManager.java:191)
        at com.sun.javafx.event.CompositeEventDispatcher.dispatchBubblingEvent(CompositeEventDispatcher.java:59)
        at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:58)
        at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
        at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56)
        at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
        at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56)
        at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
        at com.sun.javafx.event.EventUtil.fireEventImpl(EventUtil.java:74)
        at com.sun.javafx.event.EventUtil.fireEvent(EventUtil.java:49)
        at javafx.event.Event.fireEvent(Event.java:198)
        at javafx.scene.Node.fireEvent(Node.java:8792)
        at com.sun.javafx.scene.control.behavior.TextFieldBehavior.fire(TextFieldBehavior.java:154)
        at com.sun.javafx.scene.control.behavior.TextInputControlBehavior.lambda$keyMapping$62(TextInputControlBehavior.java:332)
        at com.sun.javafx.scene.control.inputmap.InputMap.handle(InputMap.java:274)
        at com.sun.javafx.event.CompositeEventHandler$NormalEventHandlerRecord.handleBubblingEvent(CompositeEventHandler.java:247)
        at com.sun.javafx.event.CompositeEventHandler.dispatchBubblingEvent(CompositeEventHandler.java:80)
        at com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(EventHandlerManager.java:234)
        at com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(EventHandlerManager.java:191)
        at com.sun.javafx.event.CompositeEventDispatcher.dispatchBubblingEvent(CompositeEventDispatcher.java:59)
        at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:58)
        at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
        at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56)
        at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
        at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56)
        at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
        at com.sun.javafx.event.EventUtil.fireEventImpl(EventUtil.java:74)
        at com.sun.javafx.event.EventUtil.fireEvent(EventUtil.java:54)
        at javafx.event.Event.fireEvent(Event.java:198)
        at javafx.scene.Scene$KeyHandler.process(Scene.java:4105)
        at javafx.scene.Scene.processKeyEvent(Scene.java:2156)
        at javafx.scene.Scene$ScenePeerListener.keyEvent(Scene.java:2630)
        at com.sun.javafx.tk.quantum.GlassViewEventHandler$KeyEventNotification.run(GlassViewEventHandler.java:218)
        at com.sun.javafx.tk.quantum.GlassViewEventHandler$KeyEventNotification.run(GlassViewEventHandler.java:150)
        at java.base/java.security.AccessController.doPrivileged(AccessController.java:399)
        at com.sun.javafx.tk.quantum.GlassViewEventHandler.lambda$handleKeyEvent$1(GlassViewEventHandler.java:250)
        at com.sun.javafx.tk.quantum.QuantumToolkit.runWithoutRenderLock(QuantumToolkit.java:424)
        at com.sun.javafx.tk.quantum.GlassViewEventHandler.handleKeyEvent(GlassViewEventHandler.java:249)
        at com.sun.glass.ui.View.handleKeyEvent(View.java:548)
        at com.sun.glass.ui.View.notifyKey(View.java:972)
        at com.sun.glass.ui.win.WinApplication._runLoop(Native Method)
        at com.sun.glass.ui.win.WinApplication.lambda$runLoop$3(WinApplication.java:184)
        at java.base/java.lang.Thread.run(Thread.java:833)
Caused by: java.lang.reflect.InvocationTargetException
        at jdk.internal.reflect.GeneratedMethodAccessor21.invoke(Unknown Source)
        at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.base/java.lang.reflect.Method.invoke(Method.java:568)
        at com.sun.javafx.reflect.Trampoline.invoke(MethodUtil.java:77)
        at jdk.internal.reflect.GeneratedMethodAccessor20.invoke(Unknown Source)
        at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.base/java.lang.reflect.Method.invoke(Method.java:568)
        at com.sun.javafx.reflect.MethodUtil.invoke(MethodUtil.java:275)
        at com.sun.javafx.fxml.MethodHelper.invoke(MethodHelper.java:84)
        at javafx.fxml.FXMLLoader$MethodHandler.invoke(FXMLLoader.java:1854)
        ... 46 more
Caused by: java.lang.ArrayIndexOutOfBoundsException: Index 3 out of bounds for length 3
        at casper.components.Storage.editLineInFile(Storage.java:57)
        at casper.components.Storage.editTaskInSavedTasks(Storage.java:90)
        at casper.components.Processor.handleTaskModification(Processor.java:149)
        at casper.components.Processor.processInput(Processor.java:59)
        at casper.Casper.getResponse(Casper.java:67)
        at casper.MainWindow.handleUserInput(MainWindow.java:67)
        ... 56 more
Chronoxy commented 4 days ago

Oh goodness, thanks for the help y'all. I need to fix that ASAP.

One thing to note tho, as shown in the video. even though the GUI is not updated, the list storage will be updated

yizhong187 commented 4 days ago

@Green-Tea-123 Thanks a lot! This is the runtime error that's showing for the issue when replicated on my end. (There are currently 6 tasks in the task list)

image

I'll do some debugging and figure out what's wrong. Meanwhile if anyone has any suggestions do let me know also. Thanks!

yizhong187 commented 4 days ago

I've fixed the issue! The problem lies in some of my storage function adding extra lines into the local file, pushing some of the entries down some lines and hence going out of range.

Please check out the updated .jar file here!

Much thanks to everyone who helped on the way :))